diaspora / diaspora/api-documentation
Paged Data Format Update
- Dominant language
- SCSS
- Stars
- 22
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
I believe what the original design was trying to go for was the implementation of [RFC 5988](https://tools.ietf.org/html/rfc5988), the way GitHub ultimately decided to go (as described [here](https://developer.github.com/v3/#pagination)). While it's a standard I think this will make things more difficult on the receiver side. The interim implementation I have now is a more traditional implementation where endpoints with paging will return a two-part response that looks like:
```
{
links: {
//standard paging keywords like below
previous: // URL to previous,
next: // URL to previous
}
data: //whatever the return data format is
}
```
I'm thinking I'm going to go back and see how much more difficult the RFC versus over a traditional method would be in languages that would most likely have clients written in them: Java/Kotlin (for Android), Swift/Objective-C (iOS/macOS), and JavaScript. I'm sure it is possible but it's a question of cumbersomeness in cracking open the HTTP header, support for proper parsing and field handling, etc. The way the code architected switching to the RFC version shouldn't be difficult.
Contributor guide
Assessment
This issue has not been assessed yet.