-
Notifications
You must be signed in to change notification settings - Fork 6
/
response_types.go
52 lines (43 loc) · 1.63 KB
/
response_types.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package itchio
import "time"
// UploadDownloadResponse is what the API replies to when we ask to download an upload
type UploadDownloadResponse struct {
URL string `json:"url"`
}
// DownloadBuildFileResponse is what the API responds with when we
// ask to download an upload
type DownloadBuildFileResponse struct {
URL string `json:"url"`
}
// DownloadUploadBuildResponseItem contains download information for a specific
// build file
type DownloadUploadBuildResponseItem struct {
URL string `json:"url"`
}
// DownloadUploadBuildResponse is what the API responds when we want to download
// a build
type DownloadUploadBuildResponse struct {
// Patch is the download info for the wharf patch, if any
Patch *DownloadUploadBuildResponseItem `json:"patch"`
// Signature is the download info for the wharf signature, if any
Signature *DownloadUploadBuildResponseItem `json:"signature"`
// Manifest is reserved
Manifest *DownloadUploadBuildResponseItem `json:"manifest"`
// Archive is the download info for the .zip archive, if any
Archive *DownloadUploadBuildResponseItem `json:"archive"`
// Unpacked is the only file of the build, if it's a single file
Unpacked *DownloadUploadBuildResponseItem `json:"unpacked"`
}
// An APIKey grants access to the itch.io API within
// a certain scope.
type APIKey struct {
// Site-wide unique identifier generated by itch.io
ID int64 `json:"id"`
// ID of the user to which the key belongs
UserID int64 `json:"userId"`
// Actual API key value
Key string `json:"key"`
CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
SourceVersion string `json:"sourceVersion"`
}