-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevice.yml
More file actions
130 lines (123 loc) · 3.55 KB
/
Copy pathdevice.yml
File metadata and controls
130 lines (123 loc) · 3.55 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json
imports:
ids: ids.yml
service:
display-name: Device Service
auth: true
base-path: /v1/apps
endpoints:
add:
docs: |
Add Device for a User.
If a device_sid is specified, then devices will be merged if one is found.
If no device_sid is specified, then a new device will be created.
method: POST
path: /{app_id}/users/{user_id}/devices
path-parameters:
app_id:
type: ids.AppId
docs: your app identifier
user_id:
type: ids.UserId
docs: your user identifier
request: Device
response:
type: Device
docs: Returns the updated Device
examples:
- path-parameters:
app_id: my-app-id
user_id: my-user-id
request:
fcm_token: qweKu7bdTZumJpzxUqqpxe:APA91bE9FSScPK_kENPpBAj0URYDo4z0tE6aOrBtpgaA1I1OC7GBes1lR71EWRhavLGMzDMKPPLkUoqtvPHzCgq
platform: android
response:
body:
id: my-device-id
platform: android
update:
docs: Update a Device for a User.
method: PUT
path: /{app_id}/users/{user_id}/devices/{device_id}
path-parameters:
app_id:
type: ids.AppId
docs: your app identifier
user_id:
type: ids.UserId
docs: your user identifier
device_id:
type: ids.DeviceId
docs: your device identifier; the same as device_sid
request:
body:
type: Device
response:
type: Device
docs: Returns the updated Device
examples:
- path-parameters:
app_id: my-app-id
user_id: my-user-id
device_id: my-device-id
request:
fcm_token: qweKu7bdTZumJpzxUqqpxe:APA91bE9FSScPK_kENPpBAj0URYDo4z0tE6aOrBtpgaA1I1OC7GBes1lR71EWRhavLGMzDMKPPLkUoqtvPHzCgq
platform: android
response:
body:
id: my-device-id
platform: android
delete:
docs: Delete a Device for a User
method: DELETE
path: /{app_id}/users/{user_id}/devices/{device_id}
path-parameters:
app_id:
type: ids.AppId
docs: your app identifier
user_id:
type: ids.UserId
docs: your user identifier
device_id:
type: ids.DeviceId
docs: your device identifier
getDevice:
docs: Get a Device for a User
method: GET
path: /{app_id}/users/{user_id}/devices/{device_id}
path-parameters:
app_id:
type: ids.AppId
docs: your app identifier
user_id:
type: ids.UserId
docs: your user identifier
device_id:
type: ids.DeviceId
docs: your device identifier
response: Device
types:
Device:
properties:
id: optional<string>
platform: optional<Platform>
onesignal_player_id: optional<string>
xiaomi_token: optional<string>
oppo_token: optional<string>
vivo_token: optional<string>
huaweiToken: optional<string>
fcm_token:
type: optional<string>
docs: firebase device token
raven_id:
type: optional<string>
docs: user id affiliated with device
device_sid: optional<ids.DeviceId>
notifications_disabled: optional<boolean>
created_at: optional<long>
updated_at: optional<long>
Platform:
enum:
- android
- web
- ios