intercom / intercom-go

Go Bindings For Intercom
https://developers.intercom.io/reference
Other
71 stars 80 forks source link

Incorrect type returned from Users endpoint causes library to break #120

Open erskingardner opened 5 years ago

erskingardner commented 5 years ago

Because of this change to the Users endpoint (to return multiple users when more than one user exists with the email address) the type returned by the API isn't of the correct type (currently it tries to use the User object) so the library breaks.

jonbretman commented 4 years ago

@erskingardner @jonnyom Are there any plans to make a version of this lib that is compatible with v1.4 of the API?

jonnyom commented 4 years ago

Hey @jonbretman thanks for reaching out.

I'm afraid our contributors with Go expertise are a bit thin on the ground at the moment. Feel free to submit a PR to the SDK if you've the time though!

ruzaikr commented 4 years ago

I'd like to try this out. Pls assign it to me :) @jonnyom

jonnyom commented 4 years ago

Absolutely @ruzaikr ! Sorry for the delay, I've been OOO 😄 let me know if we can help 👍

catalogplus commented 2 years ago

Hi,

I'm trying to retrieve a user with an email, but when there isn't a user with the exact email, a list is returned by the API. This causes the SDK to return an empty User struct, which is not useful. I think the function should return a 404 error.

Thanks