Skip to content

get_users_in_list fails due to Iterable API returning invalid json #9

Description

@titanium-cranium

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

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions