-
Notifications
You must be signed in to change notification settings - Fork 67
/
api.go
31 lines (27 loc) · 1.14 KB
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package models
type APIResponse struct {
Data any `json:"data,omitempty"`
Pagination *APIPagination `json:"pagination,omitempty"`
Error string `json:"error,omitempty"`
Status int `json:"status,omitempty"`
Message string `json:"message,omitempty"`
Template string `json:"template,omitempty"`
Total *int `json:"total,omitempty"`
DateRange *BitsLeaderboardDateRange `json:"date_range,omitempty"`
}
type APIPagination struct {
Cursor string `json:"cursor,omitempty"`
}
type BitsLeaderboardDateRange struct {
StartedAt string `json:"started_at"`
EndedAt string `json:"ended_at"`
}
type ExtensionAPIResponse struct { // extensions/live
Data interface{} `json:"data,omitempty"`
Pagination *string `json:"pagination,omitempty"`
Error string `json:"error,omitempty"`
Status int `json:"status,omitempty"`
Message string `json:"message,omitempty"`
}