-
Notifications
You must be signed in to change notification settings - Fork 0
/
structs.go
55 lines (49 loc) · 1.33 KB
/
structs.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
53
54
55
package onesignal
// OSAddDeviceReq ...
type OSAddDeviceReq struct {
AppID string `json:"app_id"`
DeviceModel string `json:"device_model"`
DeviceOs string `json:"device_os"`
DeviceType int `json:"device_type"`
GameVersion string `json:"game_version"`
Identifier string `json:"identifier"`
Language string `json:"language"`
Tags struct {
A string `json:"a"`
Foo string `json:"foo"`
} `json:"tags"`
Timezone int `json:"timezone"`
}
// OSAddDeviceRes ...
type OSAddDeviceRes struct {
Success bool `json:"success"`
ID string `json:"id"`
}
// NotificationRequest ...
type NotificationRequest struct {
AppID string `json:"app_id"`
IncludedSegments []string `json:"included_segments"`
IncludePlayerIds []string `json:"include_player_ids"`
Data struct {
Foo string `json:"foo"`
} `json:"data"`
Headings Headings `json:"headings"`
Contents Contents `json:"contents"`
LargeIcon string `json:"large_icon"`
}
// Headings doc ...
type Headings struct {
En string `json:"en"`
Es string `json:"es"`
}
// Contents doc ...
type Contents struct {
En string `json:"en"`
Es string `json:"es"`
}
// NotificationResponse doc ...
type NotificationResponse struct {
ID string `json:"id"`
Recipients int `json:"recipients"`
ExternalID interface{} `json:"external_id"`
}