Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use the chimp api, response seems empty #36

Closed
lundin opened this issue Apr 20, 2015 · 1 comment
Closed

how to use the chimp api, response seems empty #36

lundin opened this issue Apr 20, 2015 · 1 comment

Comments

@lundin
Copy link

lundin commented Apr 20, 2015

Hi!
Thanks for the API wrapper looks good!
I checked out a API from mailchimp and tried the templatelist function. What am i missing ? Checked that is used the correct endpoint, but there seems to be no response unmarshaled into the listresponse.

chimp := gochimp.NewChimp("mykey", true)
    mylist := gochimp.TemplatesList{}
mylist.ApiKey = "mykey"
mylist.Filters.IncludeDragAndDrop = true
myresp, err := chimp.TemplatesList(mylist)

if err != nil {
    fmt.Print(err)
}

for _, val := range myresp.User {
    fmt.Print(val.Id)
}

 for _, val := range myresp.Gallery {
    fmt.Print(val.Id)
}
@lundin
Copy link
Author

lundin commented Apr 20, 2015

Sorry, it was my fault it was a missing param on selecting correct types (base/user) that made the trick.
Thanks!

@lundin lundin closed this as completed Apr 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant