hanzoai / gochimp3

🐒 Golang client for MailChimp API 3.0.

Home Page:https://github.com/zeekay/gochimp3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Member tags are now objects

warmans opened this issue · comments

commented

Currently the client attempts to decode members into a struct with a tags field defined as a slice of strings:

https://github.com/hanzoai/gochimp3/blob/master/members.go#L38

But actually in the API response tags are an object:

	"tags_count": 1,
	"tags": [
		{
			"id": 111111,
			"name": "foo"
		}
	],

so it fails:

json: cannot unmarshal object into Go struct field Member.members.tags of type string

Maybe this was changed at some point and mailchimp don't have strict BC for their API 🤷‍♂️

I think this is fixed with pull request #43

commented

Yep should be.