1
0
Fork 0
mirror of https://github.com/imjasonh/go-marvel synced 2026-07-18 06:47:49 +00:00

update sample

This commit is contained in:
Jason Hall 2014-05-04 12:55:40 -04:00
parent 68b02c2677
commit 3639ae8d31

View file

@ -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)
}