digitalocean / digitalocean/api-v2

Enhance /v2/actions to allow negative page numbers.

Open
#155 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
138
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Often, we want "the last ten actions". The cleanest way to do this would allow a call like, `/v2/actions/...&per_page=10&page=-1`. If we had 192 actions this would return actions 183 to 192.

The current kludge is to ask for the first action, get the number of actions from meta, play a numeric game to get the last ten or more actions on one page, then ask for that page, then filter out some items.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.