mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-09 02:17:30 -06:00
[feature] Add paging via Link header for notifications and account statuses (#629)
* test link headers * page get account statuses properly * page get notifications * add util func for packaging timeline responses * return timelined stuff from accountstatusesget * rename timeline response * use new convenience function * go fmt
This commit is contained in:
parent
99fab9c6b6
commit
6f6e89e271
17 changed files with 303 additions and 98 deletions
|
|
@ -18,9 +18,11 @@
|
|||
|
||||
package model
|
||||
|
||||
// StatusTimelineResponse wraps a slice of statuses, ready to be serialized, along with the Link
|
||||
import "github.com/superseriousbusiness/gotosocial/internal/timeline"
|
||||
|
||||
// TimelineResponse wraps a slice of timelineables, ready to be serialized, along with the Link
|
||||
// header for the previous and next queries, to be returned to the client.
|
||||
type StatusTimelineResponse struct {
|
||||
Statuses []*Status
|
||||
type TimelineResponse struct {
|
||||
Items []timeline.Timelineable
|
||||
LinkHeader string
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue