Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pagination in RequestsΒ #210

@nelsonic

Description

@nelsonic

Hi! πŸ‘‹
Trying to use tentacat to retrieve a list of Org Members from GitHub. 🀞
The API endpoint for List organization members:
https://docs.github.com/en/rest/orgs/members#list-organization-members
Includes a page option to paginate the results.
We are trying to retrieve a list of members from an Org that has several hundred
and therefore we need to fetch multiple pages ...

Our reading of the Tentacat.Organizations.Members.list/2 docs/code:

@doc """
List members of a `organization`.
The response will differ if the authenticated user is also owner of the
organization.
## Example
Tentacat.Organizations.Members.list "github"
Tentacat.Organizations.Members.list client, "github"
More info at: http://developer.github.com/v3/orgs/members/#members-list
"""
@spec list(Client.t(), binary) :: Tentacat.response()
def list(client \\ %Client{}, organization) do
get("orgs/#{organization}/members", client)
end

It appears to only allow passing the client and organisation, i.e. no page ... πŸ€·β€β™‚οΈ
Can someone please confirm our understanding and inform if there is a way to request page=2 of the results? ✌️
Thanks very much! πŸ™

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