23 lines
1.4 KiB
Go
23 lines
1.4 KiB
Go
package ap
|
|
|
|
import "net/url"
|
|
|
|
type OrderedCollection struct {
|
|
Context map[string]any `json:"@context"` // Big chunk of hopefully don't give a fuck
|
|
ID url.URL `json:"id"` // URL to this resource
|
|
Type string `json:"type"` // Should always be "OrderedCollection"
|
|
TotalItems int `json:"totalItems"` // Number of resources in this collection
|
|
First url.URL `json:"first"` // Link to the first resource in this collection, an OrderedCollectionPage object
|
|
Last url.URL `json:"last"` // Link to the last resource in this collection, an OrderedCollectionPage object
|
|
}
|
|
|
|
type OrderedCollectionPage struct {
|
|
Context map[string]any `json:"@context"` // Big chunk of hopefully don't give a fuck
|
|
ID url.URL `json:"id"` // URL to this resource
|
|
PartOf url.URL `json:"partOf"` // URL to the collection this is a part of
|
|
Type string `json:"type"` // Should always be "OrderedCollectionPage"
|
|
TotalItems int `json:"totalItems"` // Number of resources in this collection
|
|
OrderedItems []map[string]any `json:"orderedItems"` // Items in this list. Should all be AP objects/actions
|
|
Previous *url.URL `json:"prev"` // Previous page
|
|
Next *url.URL `json:"next"` // Next page
|
|
}
|