-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathaccount.stone
More file actions
111 lines (85 loc) · 3.35 KB
/
Copy pathaccount.stone
File metadata and controls
111 lines (85 loc) · 3.35 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
namespace account
import account_id
import common
union DeleteProfilePhotoError
"This union is empty. The comment here is intentionally emitted to avoid indentation issues with Stone."
union PhotoSourceArg
base64_data String
"Image data in base64-encoded bytes."
example default
base64_data = "SW1hZ2UgZGF0YSBpbiBiYXNlNjQtZW5jb2RlZCBieXRlcy4gTm90IGEgdmFsaWQgZXhhbXBsZS4="
union SetProfilePhotoError
file_type_error
"File cannot be set as profile photo."
file_size_error
"File cannot exceed 10 MB."
dimension_error
"Image must be larger than 128 x 128."
thumbnail_error
"Image could not be thumbnailed."
transient_error
"Temporary infrastructure failure, please retry."
struct SetProfilePhotoArg
photo PhotoSourceArg
"Image to set as the user's new profile photo."
example default
photo = default
struct SetProfilePhotoResult
profile_photo_url String
"URL for the photo representing the user, if one is set."
example default
profile_photo_url = "https://dl-web.dropbox.com/account_photo/get/dbaphid%3AAAHWGmIXV3sUuOmBfTz0wPsiqHUpBWvv3ZA?vers=1556069330102&size=128x128"
struct AccountPhotoGetArg
dbx_account_id String
"Encoded ID of the user. Must start either with 'dbid:' or 'dbaphid:'."
size String
"A string representing the size of the photo."
circle_crop Boolean
"True if the photo should be cropped and false otherwise."
expect_account_photo Boolean
"True if we expect account photo to exist."
example default
dbx_account_id = "dbid:s0meEnc0ded1d"
size = "16x16"
circle_crop = false
expect_account_photo = true
union ThumbnailError
permanent_failure
"Indicates permanent infrastructural failure."
temporary_failure
"Indicates temporary infrastructural failure."
union AccountPhotoGetError
thumbnail_error ThumbnailError
"Indicates infrastructural failure."
account_photo_missing
"Account photo is missing (but we did not expect it to exist)."
expected_account_photo_missing
"Account photo was expected to exist, but it's missing."
struct AccountPhotoGetResult
content_type String
"The data returned by get_photo."
example default
content_type = "image/jpeg"
struct DeleteProfilePhotoArg
"This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone."
struct DeleteProfilePhotoResult
"This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone."
route set_profile_photo (SetProfilePhotoArg, SetProfilePhotoResult, SetProfilePhotoError)
"Sets a user's profile photo."
attrs
auth = "user"
scope = "account_info.write"
route delete_profile_photo (DeleteProfilePhotoArg, DeleteProfilePhotoResult, DeleteProfilePhotoError)
"Deletes the current user's profile photo."
attrs
auth = "user"
scope = "account_info.write"
route get_photo (AccountPhotoGetArg, AccountPhotoGetResult, AccountPhotoGetError)
"This lovely endpoint gets the account photo of a given user."
attrs
allow_app_folder_app = true
auth = "user"
host = "content"
scope = "account_info.read"
select_admin_mode = "whole_team"
style = "download"