mirror of
https://github.com/imjasonh/go-marvel
synced 2026-07-18 06:47:49 +00:00
update sample
This commit is contained in:
parent
68b02c2677
commit
3639ae8d31
1 changed files with 10 additions and 2 deletions
|
|
@ -24,13 +24,21 @@ var (
|
|||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
c := marvel.NewClient(*apiKey, *secret)
|
||||
c := marvel.Client{
|
||||
PublicKey: *apiKey,
|
||||
PrivateKey: *secret,
|
||||
}
|
||||
|
||||
offset := 0
|
||||
limit := 100
|
||||
imgs := []image.Image{}
|
||||
for {
|
||||
r, err := c.Series(*seriesID).Comics(marvel.ComicsParams{Offset: offset, Limit: limit})
|
||||
r, err := c.SingleSeries(*seriesID).Comics(marvel.ComicsParams{
|
||||
CommonParams: marvel.CommonParams{
|
||||
Offset: offset,
|
||||
Limit: limit,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue