Skip to content

Allow duplicate params when crafting the request #68

@pvazqu1

Description

@pvazqu1

According to the API documentation (retrieve-users), to retrieve specific users you need to specify the params like this:

usernames=cjones&usernames=mwong

On my request I've done something like this:

request.addParam("usernames", "cjones");
request.addParam("usernames", "mwong");

As a response I'm getting information about only one user. I believe the problem is that the addParam method is adding fields to a TreeMap:

private SortedMap<String, Object> params = new TreeMap<String, Object>();

Since we can't have duplicate keys, we can't search for multiple users. I've also noticed that you can set a List as value on the addParam method. Something like this:

request.addParam("username", Arrays.asList("cjones", "mwong"));

But that's also not working, the raw response is:

{"stat":"OK","response":[]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions