diff --git a/client.go b/client.go index fa127e5..d3653de 100644 --- a/client.go +++ b/client.go @@ -5,10 +5,10 @@ import ( "bitbucket.org/skobkin/dumb-http-go" "bitbucket.org/skobkin/point-api-go" "encoding/json" + "errors" "log" "net/http" "net/url" - "errors" ) // Package errors @@ -43,9 +43,9 @@ func GetPageJSON(page point.Page) (string, error) { return string(b[:]), nil } -// SendPage sends page to Point Tools crawler API gate for processing -func (c *PointToolsClient) SendPage(page point.Page) (ReceiveAllPageResponse, error) { - var response ReceiveAllPageResponse +// SendAllPage sends /all page to Point Tools crawler API gate for processing +func (c *PointToolsClient) SendAllPage(page point.Page) (SendAllPageResponse, error) { + var response SendAllPageResponse jsonStr, err := GetPageJSON(page) diff --git a/receive_all_page_response.go b/receive_all_page_response.go deleted file mode 100644 index fa73554..0000000 --- a/receive_all_page_response.go +++ /dev/null @@ -1,16 +0,0 @@ -package point_tools - -const ( - STATUS_SUCCESS string = "success" - STATUS_FAILURE string = "fail" -) - -type ReceiveAllPageResponse struct { - Status string `json:"status"` - Data ReceiveAllPageData `json:"data"` - Error ApiError `json:"error"` -} - -type ReceiveAllPageData struct { - Continue bool `json:"continue"` -} diff --git a/send_all_page_response.go b/send_all_page_response.go new file mode 100644 index 0000000..2824121 --- /dev/null +++ b/send_all_page_response.go @@ -0,0 +1,16 @@ +package point_tools + +const ( + STATUS_SUCCESS string = "success" + STATUS_FAILURE string = "fail" +) + +type SendAllPageResponse struct { + Status string `json:"status"` + Data SendAllPageResponseData `json:"data"` + Error ApiError `json:"error"` +} + +type SendAllPageResponseData struct { + Continue bool `json:"continue"` +}