Skip to content

func populatePageValues can't handle API's returning 'since' #2112

Description

@brianlangdon

API's such as the Organization ListAll can return many pages of Organizations. The pagination value is called since and holds the id of the last Org returned. A simple change to populatePageValues appears, so far, to be able to support this. Not sure if this a fault or a improvement! I'm new to golang so please forgive.

Old code in populatePageValues:

 page := q.Get("page")
if page == "" {
continue
}

proposed change to populatePageValues

 page := q.Get("page")
since := q.Get("since")
if page == "" && since == "" {
continue
}
if since != "" {
page = since
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions