Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
wb
gocrawlhq
Commits
5b231cb0
Unverified
Commit
5b231cb0
authored
May 24, 2022
by
Corentin Barreau
⚜
Browse files
Add: strategy query parameter for Feed
parent
064e0c6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
feed.go
View file @
5b231cb0
...
...
@@ -8,7 +8,7 @@ import (
"strconv"
)
func
(
c
*
Client
)
Feed
(
size
int
)
(
feedResponse
*
FeedResponse
,
err
error
)
{
func
(
c
*
Client
)
Feed
(
size
int
,
strategy
string
)
(
feedResponse
*
FeedResponse
,
err
error
)
{
expectedStatusCode
:=
200
emptyStatusCode
:=
204
feedResponse
=
new
(
FeedResponse
)
...
...
@@ -21,6 +21,7 @@ func (c *Client) Feed(size int) (feedResponse *FeedResponse, err error) {
q
:=
req
.
URL
.
Query
()
q
.
Add
(
"size"
,
strconv
.
Itoa
(
size
))
q
.
Add
(
"strategy"
,
strategy
)
req
.
URL
.
RawQuery
=
q
.
Encode
()
req
.
Header
.
Add
(
"X-Auth-Key"
,
c
.
Key
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment