Commit 277845f1 authored by Corentin Barreau's avatar Corentin Barreau
Browse files

Merge branch 'only-seencheck-discovered' into 'master'

Add seencheck only support to gocrawlhq

See merge request !3
parents 5b231cb0 34d5b93e
......@@ -7,7 +7,7 @@ import (
"net/http"
)
func (c *Client) Discovered(URLs []URL, URLType string, bypassSeencheck bool) (discoveredResponse *DiscoveredResponse, err error) {
func (c *Client) Discovered(URLs []URL, URLType string, bypassSeencheck bool, seencheckOnly bool) (discoveredResponse *DiscoveredResponse, err error) {
expectedStatusCode := 201
discoveredResponse = new(DiscoveredResponse)
......@@ -19,6 +19,7 @@ func (c *Client) Discovered(URLs []URL, URLType string, bypassSeencheck bool) (d
payload := DiscoveredPayload{
Project: c.Project,
BypassSeencheck: bypassSeencheck,
SeencheckOnly: seencheckOnly,
Type: URLType,
URLs: URLsPayload,
}
......
......@@ -12,7 +12,7 @@ var (
FinishedEndpoint *url.URL
FeedEndpoint *url.URL
Version = "1.1.4"
Version = "1.1.8"
)
func Init(key, secret, project, HQAddress string) (c *Client, err error) {
......
......@@ -25,6 +25,7 @@ type FeedResponse struct {
type DiscoveredResponse struct {
Project string `json:"project"`
Type string `json:"type"`
URLs []URL `json:"urls,omitempty"`
}
type FinishedResponse struct {
......@@ -36,6 +37,7 @@ type DiscoveredPayload struct {
Type string `json:"type"`
URLs []URL `json:"urls"`
BypassSeencheck bool `json:"bypassSeencheck"`
SeencheckOnly bool `json:"seencheckOnly"`
}
type FinishedPayload struct {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment