Hi there!
Having a similar problem to issue 2 with the get_users_in_list method.
The Iterable API returns text/plain list of email addresses separated by line feeds from the /api/lists/getUsers endpoint. As a result, the normal base api_call crashes in the same manner as was described for issue2, trying to parse JSON when it's not formatted properly.
After a bit of playing around using requests to get the data, I found the response could be parsed into an array using r.decode("utf-8").splitlines()
I'd propose the get_users_in_list endpoint simply use the export_data_api instead of api_call so that it can be used to get the response object without the .json() call.
Thoughts?
Cheers,
Brendan
Hi there!
Having a similar problem to issue 2 with the
get_users_in_listmethod.The Iterable API returns text/plain list of email addresses separated by line feeds from the
/api/lists/getUsersendpoint. As a result, the normal baseapi_callcrashes in the same manner as was described for issue2, trying to parse JSON when it's not formatted properly.After a bit of playing around using
requeststo get the data, I found the response could be parsed into an array usingr.decode("utf-8").splitlines()I'd propose the
get_users_in_listendpoint simply use the export_data_api instead of api_call so that it can be used to get the response object without the.json()call.Thoughts?
Cheers,
Brendan