diff options
Diffstat (limited to 'internal/api/activitypub/users/common.go')
-rw-r--r-- | internal/api/activitypub/users/common.go | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/internal/api/activitypub/users/common.go b/internal/api/activitypub/users/common.go index f0e4891d5..93d9ba776 100644 --- a/internal/api/activitypub/users/common.go +++ b/internal/api/activitypub/users/common.go @@ -18,12 +18,14 @@ package users -// SwaggerCollection represents an activitypub collection. +// SwaggerCollection represents an ActivityPub Collection. // swagger:model swaggerCollection type SwaggerCollection struct { - // ActivityStreams context. + // ActivityStreams JSON-LD context. + // A string or an array of strings, or more + // complex nested items. // example: https://www.w3.org/ns/activitystreams - Context string `json:"@context"` + Context interface{} `json:"@context"` // ActivityStreams ID. // example: https://example.org/users/some_user/statuses/106717595988259568/replies ID string `json:"id"` @@ -55,3 +57,25 @@ type SwaggerCollectionPage struct { // example: ["https://example.org/users/some_other_user/statuses/086417595981111564", "https://another.example.com/users/another_user/statuses/01FCN8XDV3YG7B4R42QA6YQZ9R"] Items []string `json:"items"` } + +// SwaggerFeaturedCollection represents an ActivityPub OrderedCollection. +// swagger:model swaggerFeaturedCollection +type SwaggerFeaturedCollection struct { + // ActivityStreams JSON-LD context. + // A string or an array of strings, or more + // complex nested items. + // example: https://www.w3.org/ns/activitystreams + Context interface{} `json:"@context"` + // ActivityStreams ID. + // example: https://example.org/users/some_user/collections/featured + ID string `json:"id"` + // ActivityStreams type. + // example: OrderedCollection + Type string `json:"type"` + // List of status URIs. + // example: ['https://example.org/users/some_user/statuses/01GSZ0F7Q8SJKNRF777GJD271R', 'https://example.org/users/some_user/statuses/01GSZ0G012CBQ7TEKX689S3QRE'] + Items []string `json:"items"` + // Number of items in this collection. + // example: 2 + TotalItems int +} |