appwrite 2.4.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +197 -56
- data/lib/appwrite/exception.rb +7 -7
- data/lib/appwrite/file.rb +9 -15
- data/lib/appwrite/models/attribute_boolean.rb +52 -0
- data/lib/appwrite/models/attribute_email.rb +57 -0
- data/lib/appwrite/models/attribute_enum.rb +62 -0
- data/lib/appwrite/models/attribute_float.rb +62 -0
- data/lib/appwrite/models/attribute_integer.rb +62 -0
- data/lib/appwrite/models/attribute_ip.rb +57 -0
- data/lib/appwrite/models/attribute_list.rb +32 -0
- data/lib/appwrite/models/attribute_string.rb +57 -0
- data/lib/appwrite/models/attribute_url.rb +57 -0
- data/lib/appwrite/models/bucket.rb +82 -0
- data/lib/appwrite/models/bucket_list.rb +32 -0
- data/lib/appwrite/models/collection.rb +62 -0
- data/lib/appwrite/models/collection_list.rb +32 -0
- data/lib/appwrite/models/continent.rb +32 -0
- data/lib/appwrite/models/continent_list.rb +32 -0
- data/lib/appwrite/models/country.rb +32 -0
- data/lib/appwrite/models/country_list.rb +32 -0
- data/lib/appwrite/models/currency.rb +57 -0
- data/lib/appwrite/models/currency_list.rb +32 -0
- data/lib/appwrite/models/deployment.rb +77 -0
- data/lib/appwrite/models/deployment_list.rb +32 -0
- data/lib/appwrite/models/document.rb +50 -0
- data/lib/appwrite/models/document_list.rb +36 -0
- data/lib/appwrite/models/execution.rb +72 -0
- data/lib/appwrite/models/execution_list.rb +32 -0
- data/lib/appwrite/models/file.rb +77 -0
- data/lib/appwrite/models/file_list.rb +32 -0
- data/lib/appwrite/models/function.rb +92 -0
- data/lib/appwrite/models/function_list.rb +32 -0
- data/lib/appwrite/models/health_antivirus.rb +32 -0
- data/lib/appwrite/models/health_queue.rb +27 -0
- data/lib/appwrite/models/health_status.rb +32 -0
- data/lib/appwrite/models/health_time.rb +37 -0
- data/lib/appwrite/models/index.rb +47 -0
- data/lib/appwrite/models/index_list.rb +32 -0
- data/lib/appwrite/models/language.rb +37 -0
- data/lib/appwrite/models/language_list.rb +32 -0
- data/lib/appwrite/models/locale.rb +57 -0
- data/lib/appwrite/models/log.rb +127 -0
- data/lib/appwrite/models/log_list.rb +32 -0
- data/lib/appwrite/models/membership.rb +67 -0
- data/lib/appwrite/models/membership_list.rb +32 -0
- data/lib/appwrite/models/phone.rb +37 -0
- data/lib/appwrite/models/phone_list.rb +32 -0
- data/lib/appwrite/models/preferences.rb +30 -0
- data/lib/appwrite/models/runtime.rb +57 -0
- data/lib/appwrite/models/runtime_list.rb +32 -0
- data/lib/appwrite/models/session.rb +142 -0
- data/lib/appwrite/models/session_list.rb +32 -0
- data/lib/appwrite/models/team.rb +42 -0
- data/lib/appwrite/models/team_list.rb +32 -0
- data/lib/appwrite/models/token.rb +42 -0
- data/lib/appwrite/models/user.rb +62 -0
- data/lib/appwrite/models/user_list.rb +32 -0
- data/lib/appwrite/query.rb +42 -0
- data/lib/appwrite/service.rb +0 -5
- data/lib/appwrite/services/account.rb +400 -138
- data/lib/appwrite/services/avatars.rb +188 -125
- data/lib/appwrite/services/database.rb +875 -130
- data/lib/appwrite/services/functions.rb +439 -207
- data/lib/appwrite/services/health.rb +201 -58
- data/lib/appwrite/services/locale.rb +133 -32
- data/lib/appwrite/services/storage.rb +469 -118
- data/lib/appwrite/services/teams.rb +302 -118
- data/lib/appwrite/services/users.rb +322 -127
- data/lib/appwrite.rb +57 -0
- metadata +74 -108
- data/.travis.yml +0 -16
- data/CHANGELOG.md +0 -1
- data/Gemfile +0 -4
- data/LICENSE +0 -12
- data/README.md +0 -96
- data/appwrite.gemspec +0 -11
- data/docs/examples/account/create-recovery.md +0 -15
- data/docs/examples/account/create-verification.md +0 -15
- data/docs/examples/account/delete-session.md +0 -15
- data/docs/examples/account/delete-sessions.md +0 -15
- data/docs/examples/account/delete.md +0 -15
- data/docs/examples/account/get-logs.md +0 -15
- data/docs/examples/account/get-prefs.md +0 -15
- data/docs/examples/account/get-session.md +0 -15
- data/docs/examples/account/get-sessions.md +0 -15
- data/docs/examples/account/get.md +0 -15
- data/docs/examples/account/update-email.md +0 -15
- data/docs/examples/account/update-name.md +0 -15
- data/docs/examples/account/update-password.md +0 -15
- data/docs/examples/account/update-prefs.md +0 -15
- data/docs/examples/account/update-recovery.md +0 -15
- data/docs/examples/account/update-verification.md +0 -15
- data/docs/examples/avatars/get-browser.md +0 -15
- data/docs/examples/avatars/get-credit-card.md +0 -15
- data/docs/examples/avatars/get-favicon.md +0 -15
- data/docs/examples/avatars/get-flag.md +0 -15
- data/docs/examples/avatars/get-image.md +0 -15
- data/docs/examples/avatars/get-initials.md +0 -15
- data/docs/examples/avatars/get-q-r.md +0 -15
- data/docs/examples/database/create-collection.md +0 -15
- data/docs/examples/database/create-document.md +0 -15
- data/docs/examples/database/delete-collection.md +0 -15
- data/docs/examples/database/delete-document.md +0 -15
- data/docs/examples/database/get-collection.md +0 -15
- data/docs/examples/database/get-document.md +0 -15
- data/docs/examples/database/list-collections.md +0 -15
- data/docs/examples/database/list-documents.md +0 -15
- data/docs/examples/database/update-collection.md +0 -15
- data/docs/examples/database/update-document.md +0 -15
- data/docs/examples/functions/create-execution.md +0 -15
- data/docs/examples/functions/create-tag.md +0 -15
- data/docs/examples/functions/create.md +0 -15
- data/docs/examples/functions/delete-tag.md +0 -15
- data/docs/examples/functions/delete.md +0 -15
- data/docs/examples/functions/get-execution.md +0 -15
- data/docs/examples/functions/get-tag.md +0 -15
- data/docs/examples/functions/get.md +0 -15
- data/docs/examples/functions/list-executions.md +0 -15
- data/docs/examples/functions/list-tags.md +0 -15
- data/docs/examples/functions/list.md +0 -15
- data/docs/examples/functions/update-tag.md +0 -15
- data/docs/examples/functions/update.md +0 -15
- data/docs/examples/health/get-anti-virus.md +0 -15
- data/docs/examples/health/get-cache.md +0 -15
- data/docs/examples/health/get-d-b.md +0 -15
- data/docs/examples/health/get-queue-certificates.md +0 -15
- data/docs/examples/health/get-queue-functions.md +0 -15
- data/docs/examples/health/get-queue-logs.md +0 -15
- data/docs/examples/health/get-queue-tasks.md +0 -15
- data/docs/examples/health/get-queue-usage.md +0 -15
- data/docs/examples/health/get-queue-webhooks.md +0 -15
- data/docs/examples/health/get-storage-local.md +0 -15
- data/docs/examples/health/get-time.md +0 -15
- data/docs/examples/health/get.md +0 -15
- data/docs/examples/locale/get-continents.md +0 -15
- data/docs/examples/locale/get-countries-e-u.md +0 -15
- data/docs/examples/locale/get-countries-phones.md +0 -15
- data/docs/examples/locale/get-countries.md +0 -15
- data/docs/examples/locale/get-currencies.md +0 -15
- data/docs/examples/locale/get-languages.md +0 -15
- data/docs/examples/locale/get.md +0 -15
- data/docs/examples/storage/create-file.md +0 -15
- data/docs/examples/storage/delete-file.md +0 -15
- data/docs/examples/storage/get-file-download.md +0 -15
- data/docs/examples/storage/get-file-preview.md +0 -15
- data/docs/examples/storage/get-file-view.md +0 -15
- data/docs/examples/storage/get-file.md +0 -15
- data/docs/examples/storage/list-files.md +0 -15
- data/docs/examples/storage/update-file.md +0 -15
- data/docs/examples/teams/create-membership.md +0 -15
- data/docs/examples/teams/create.md +0 -15
- data/docs/examples/teams/delete-membership.md +0 -15
- data/docs/examples/teams/delete.md +0 -15
- data/docs/examples/teams/get-memberships.md +0 -15
- data/docs/examples/teams/get.md +0 -15
- data/docs/examples/teams/list.md +0 -15
- data/docs/examples/teams/update-membership-roles.md +0 -15
- data/docs/examples/teams/update-membership-status.md +0 -15
- data/docs/examples/teams/update.md +0 -15
- data/docs/examples/users/create.md +0 -15
- data/docs/examples/users/delete-session.md +0 -15
- data/docs/examples/users/delete-sessions.md +0 -15
- data/docs/examples/users/delete.md +0 -15
- data/docs/examples/users/get-logs.md +0 -15
- data/docs/examples/users/get-prefs.md +0 -15
- data/docs/examples/users/get-sessions.md +0 -15
- data/docs/examples/users/get.md +0 -15
- data/docs/examples/users/list.md +0 -15
- data/docs/examples/users/update-email.md +0 -15
- data/docs/examples/users/update-name.md +0 -15
- data/docs/examples/users/update-password.md +0 -15
- data/docs/examples/users/update-prefs.md +0 -15
- data/docs/examples/users/update-status.md +0 -15
- data/docs/examples/users/update-verification.md +0 -15
@@ -1,129 +1,272 @@
|
|
1
|
+
#frozen_string_literal: true
|
2
|
+
|
1
3
|
module Appwrite
|
2
4
|
class Health < Service
|
3
5
|
|
6
|
+
# Check the Appwrite HTTP server is up and responsive.
|
7
|
+
#
|
8
|
+
#
|
9
|
+
# @return [HealthStatus]
|
4
10
|
def get()
|
5
11
|
path = '/health'
|
6
12
|
|
7
|
-
params = {
|
13
|
+
params = {
|
14
|
+
}
|
15
|
+
|
16
|
+
headers = {
|
17
|
+
"content-type": 'application/json',
|
18
|
+
}
|
8
19
|
|
9
|
-
|
10
|
-
|
11
|
-
|
20
|
+
@client.call(
|
21
|
+
method: 'GET',
|
22
|
+
path: path,
|
23
|
+
headers: headers,
|
24
|
+
params: params,
|
25
|
+
response_type: Models::HealthStatus
|
26
|
+
)
|
12
27
|
end
|
13
28
|
|
14
|
-
|
29
|
+
# Check the Appwrite Antivirus server is up and connection is successful.
|
30
|
+
#
|
31
|
+
#
|
32
|
+
# @return [HealthAntivirus]
|
33
|
+
def get_antivirus()
|
15
34
|
path = '/health/anti-virus'
|
16
35
|
|
17
|
-
params = {
|
36
|
+
params = {
|
37
|
+
}
|
18
38
|
|
19
|
-
|
20
|
-
|
21
|
-
}
|
39
|
+
headers = {
|
40
|
+
"content-type": 'application/json',
|
41
|
+
}
|
42
|
+
|
43
|
+
@client.call(
|
44
|
+
method: 'GET',
|
45
|
+
path: path,
|
46
|
+
headers: headers,
|
47
|
+
params: params,
|
48
|
+
response_type: Models::HealthAntivirus
|
49
|
+
)
|
22
50
|
end
|
23
51
|
|
52
|
+
# Check the Appwrite in-memory cache server is up and connection is
|
53
|
+
# successful.
|
54
|
+
#
|
55
|
+
#
|
56
|
+
# @return [HealthStatus]
|
24
57
|
def get_cache()
|
25
58
|
path = '/health/cache'
|
26
59
|
|
27
|
-
params = {
|
60
|
+
params = {
|
61
|
+
}
|
62
|
+
|
63
|
+
headers = {
|
64
|
+
"content-type": 'application/json',
|
65
|
+
}
|
28
66
|
|
29
|
-
|
30
|
-
|
31
|
-
|
67
|
+
@client.call(
|
68
|
+
method: 'GET',
|
69
|
+
path: path,
|
70
|
+
headers: headers,
|
71
|
+
params: params,
|
72
|
+
response_type: Models::HealthStatus
|
73
|
+
)
|
32
74
|
end
|
33
75
|
|
76
|
+
# Check the Appwrite database server is up and connection is successful.
|
77
|
+
#
|
78
|
+
#
|
79
|
+
# @return [HealthStatus]
|
34
80
|
def get_db()
|
35
81
|
path = '/health/db'
|
36
82
|
|
37
|
-
params = {
|
83
|
+
params = {
|
84
|
+
}
|
38
85
|
|
39
|
-
|
40
|
-
|
41
|
-
}
|
86
|
+
headers = {
|
87
|
+
"content-type": 'application/json',
|
88
|
+
}
|
89
|
+
|
90
|
+
@client.call(
|
91
|
+
method: 'GET',
|
92
|
+
path: path,
|
93
|
+
headers: headers,
|
94
|
+
params: params,
|
95
|
+
response_type: Models::HealthStatus
|
96
|
+
)
|
42
97
|
end
|
43
98
|
|
99
|
+
# Get the number of certificates that are waiting to be issued against
|
100
|
+
# [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
|
101
|
+
# server.
|
102
|
+
#
|
103
|
+
#
|
104
|
+
# @return [HealthQueue]
|
44
105
|
def get_queue_certificates()
|
45
106
|
path = '/health/queue/certificates'
|
46
107
|
|
47
|
-
params = {
|
108
|
+
params = {
|
109
|
+
}
|
110
|
+
|
111
|
+
headers = {
|
112
|
+
"content-type": 'application/json',
|
113
|
+
}
|
48
114
|
|
49
|
-
|
50
|
-
|
51
|
-
|
115
|
+
@client.call(
|
116
|
+
method: 'GET',
|
117
|
+
path: path,
|
118
|
+
headers: headers,
|
119
|
+
params: params,
|
120
|
+
response_type: Models::HealthQueue
|
121
|
+
)
|
52
122
|
end
|
53
123
|
|
124
|
+
#
|
125
|
+
#
|
126
|
+
#
|
127
|
+
# @return [HealthQueue]
|
54
128
|
def get_queue_functions()
|
55
129
|
path = '/health/queue/functions'
|
56
130
|
|
57
|
-
params = {
|
131
|
+
params = {
|
132
|
+
}
|
58
133
|
|
59
|
-
|
60
|
-
|
61
|
-
}
|
134
|
+
headers = {
|
135
|
+
"content-type": 'application/json',
|
136
|
+
}
|
137
|
+
|
138
|
+
@client.call(
|
139
|
+
method: 'GET',
|
140
|
+
path: path,
|
141
|
+
headers: headers,
|
142
|
+
params: params,
|
143
|
+
response_type: Models::HealthQueue
|
144
|
+
)
|
62
145
|
end
|
63
146
|
|
147
|
+
# Get the number of logs that are waiting to be processed in the Appwrite
|
148
|
+
# internal queue server.
|
149
|
+
#
|
150
|
+
#
|
151
|
+
# @return [HealthQueue]
|
64
152
|
def get_queue_logs()
|
65
153
|
path = '/health/queue/logs'
|
66
154
|
|
67
|
-
params = {
|
68
|
-
|
69
|
-
return @client.call('get', path, {
|
70
|
-
'content-type' => 'application/json',
|
71
|
-
}, params);
|
72
|
-
end
|
73
|
-
|
74
|
-
def get_queue_tasks()
|
75
|
-
path = '/health/queue/tasks'
|
155
|
+
params = {
|
156
|
+
}
|
76
157
|
|
77
|
-
|
158
|
+
headers = {
|
159
|
+
"content-type": 'application/json',
|
160
|
+
}
|
78
161
|
|
79
|
-
|
80
|
-
|
81
|
-
|
162
|
+
@client.call(
|
163
|
+
method: 'GET',
|
164
|
+
path: path,
|
165
|
+
headers: headers,
|
166
|
+
params: params,
|
167
|
+
response_type: Models::HealthQueue
|
168
|
+
)
|
82
169
|
end
|
83
170
|
|
171
|
+
# Get the number of usage stats that are waiting to be processed in the
|
172
|
+
# Appwrite internal queue server.
|
173
|
+
#
|
174
|
+
#
|
175
|
+
# @return [HealthQueue]
|
84
176
|
def get_queue_usage()
|
85
177
|
path = '/health/queue/usage'
|
86
178
|
|
87
|
-
params = {
|
179
|
+
params = {
|
180
|
+
}
|
88
181
|
|
89
|
-
|
90
|
-
|
91
|
-
}
|
182
|
+
headers = {
|
183
|
+
"content-type": 'application/json',
|
184
|
+
}
|
185
|
+
|
186
|
+
@client.call(
|
187
|
+
method: 'GET',
|
188
|
+
path: path,
|
189
|
+
headers: headers,
|
190
|
+
params: params,
|
191
|
+
response_type: Models::HealthQueue
|
192
|
+
)
|
92
193
|
end
|
93
194
|
|
195
|
+
# Get the number of webhooks that are waiting to be processed in the Appwrite
|
196
|
+
# internal queue server.
|
197
|
+
#
|
198
|
+
#
|
199
|
+
# @return [HealthQueue]
|
94
200
|
def get_queue_webhooks()
|
95
201
|
path = '/health/queue/webhooks'
|
96
202
|
|
97
|
-
params = {
|
203
|
+
params = {
|
204
|
+
}
|
205
|
+
|
206
|
+
headers = {
|
207
|
+
"content-type": 'application/json',
|
208
|
+
}
|
98
209
|
|
99
|
-
|
100
|
-
|
101
|
-
|
210
|
+
@client.call(
|
211
|
+
method: 'GET',
|
212
|
+
path: path,
|
213
|
+
headers: headers,
|
214
|
+
params: params,
|
215
|
+
response_type: Models::HealthQueue
|
216
|
+
)
|
102
217
|
end
|
103
218
|
|
219
|
+
# Check the Appwrite local storage device is up and connection is successful.
|
220
|
+
#
|
221
|
+
#
|
222
|
+
# @return [HealthStatus]
|
104
223
|
def get_storage_local()
|
105
224
|
path = '/health/storage/local'
|
106
225
|
|
107
|
-
params = {
|
226
|
+
params = {
|
227
|
+
}
|
108
228
|
|
109
|
-
|
110
|
-
|
111
|
-
}
|
229
|
+
headers = {
|
230
|
+
"content-type": 'application/json',
|
231
|
+
}
|
232
|
+
|
233
|
+
@client.call(
|
234
|
+
method: 'GET',
|
235
|
+
path: path,
|
236
|
+
headers: headers,
|
237
|
+
params: params,
|
238
|
+
response_type: Models::HealthStatus
|
239
|
+
)
|
112
240
|
end
|
113
241
|
|
242
|
+
# Check the Appwrite server time is synced with Google remote NTP server. We
|
243
|
+
# use this technology to smoothly handle leap seconds with no disruptive
|
244
|
+
# events. The [Network Time
|
245
|
+
# Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is
|
246
|
+
# used by hundreds of millions of computers and devices to synchronize their
|
247
|
+
# clocks over the Internet. If your computer sets its own clock, it likely
|
248
|
+
# uses NTP.
|
249
|
+
#
|
250
|
+
#
|
251
|
+
# @return [HealthTime]
|
114
252
|
def get_time()
|
115
253
|
path = '/health/time'
|
116
254
|
|
117
|
-
params = {
|
118
|
-
|
119
|
-
return @client.call('get', path, {
|
120
|
-
'content-type' => 'application/json',
|
121
|
-
}, params);
|
122
|
-
end
|
255
|
+
params = {
|
256
|
+
}
|
123
257
|
|
258
|
+
headers = {
|
259
|
+
"content-type": 'application/json',
|
260
|
+
}
|
124
261
|
|
125
|
-
|
262
|
+
@client.call(
|
263
|
+
method: 'GET',
|
264
|
+
path: path,
|
265
|
+
headers: headers,
|
266
|
+
params: params,
|
267
|
+
response_type: Models::HealthTime
|
268
|
+
)
|
269
|
+
end
|
126
270
|
|
127
|
-
private
|
128
271
|
end
|
129
272
|
end
|
@@ -1,79 +1,180 @@
|
|
1
|
+
#frozen_string_literal: true
|
2
|
+
|
1
3
|
module Appwrite
|
2
4
|
class Locale < Service
|
3
5
|
|
6
|
+
# Get the current user location based on IP. Returns an object with user
|
7
|
+
# country code, country name, continent name, continent code, ip address and
|
8
|
+
# suggested currency. You can use the locale header to get the data in a
|
9
|
+
# supported language.
|
10
|
+
#
|
11
|
+
# ([IP Geolocation by DB-IP](https://db-ip.com))
|
12
|
+
#
|
13
|
+
#
|
14
|
+
# @return [Locale]
|
4
15
|
def get()
|
5
16
|
path = '/locale'
|
6
17
|
|
7
|
-
params = {
|
18
|
+
params = {
|
19
|
+
}
|
20
|
+
|
21
|
+
headers = {
|
22
|
+
"content-type": 'application/json',
|
23
|
+
}
|
8
24
|
|
9
|
-
|
10
|
-
|
11
|
-
|
25
|
+
@client.call(
|
26
|
+
method: 'GET',
|
27
|
+
path: path,
|
28
|
+
headers: headers,
|
29
|
+
params: params,
|
30
|
+
response_type: Models::Locale
|
31
|
+
)
|
12
32
|
end
|
13
33
|
|
34
|
+
# List of all continents. You can use the locale header to get the data in a
|
35
|
+
# supported language.
|
36
|
+
#
|
37
|
+
#
|
38
|
+
# @return [ContinentList]
|
14
39
|
def get_continents()
|
15
40
|
path = '/locale/continents'
|
16
41
|
|
17
|
-
params = {
|
42
|
+
params = {
|
43
|
+
}
|
44
|
+
|
45
|
+
headers = {
|
46
|
+
"content-type": 'application/json',
|
47
|
+
}
|
18
48
|
|
19
|
-
|
20
|
-
|
21
|
-
|
49
|
+
@client.call(
|
50
|
+
method: 'GET',
|
51
|
+
path: path,
|
52
|
+
headers: headers,
|
53
|
+
params: params,
|
54
|
+
response_type: Models::ContinentList
|
55
|
+
)
|
22
56
|
end
|
23
57
|
|
58
|
+
# List of all countries. You can use the locale header to get the data in a
|
59
|
+
# supported language.
|
60
|
+
#
|
61
|
+
#
|
62
|
+
# @return [CountryList]
|
24
63
|
def get_countries()
|
25
64
|
path = '/locale/countries'
|
26
65
|
|
27
|
-
params = {
|
66
|
+
params = {
|
67
|
+
}
|
28
68
|
|
29
|
-
|
30
|
-
|
31
|
-
}
|
69
|
+
headers = {
|
70
|
+
"content-type": 'application/json',
|
71
|
+
}
|
72
|
+
|
73
|
+
@client.call(
|
74
|
+
method: 'GET',
|
75
|
+
path: path,
|
76
|
+
headers: headers,
|
77
|
+
params: params,
|
78
|
+
response_type: Models::CountryList
|
79
|
+
)
|
32
80
|
end
|
33
81
|
|
82
|
+
# List of all countries that are currently members of the EU. You can use the
|
83
|
+
# locale header to get the data in a supported language.
|
84
|
+
#
|
85
|
+
#
|
86
|
+
# @return [CountryList]
|
34
87
|
def get_countries_eu()
|
35
88
|
path = '/locale/countries/eu'
|
36
89
|
|
37
|
-
params = {
|
90
|
+
params = {
|
91
|
+
}
|
92
|
+
|
93
|
+
headers = {
|
94
|
+
"content-type": 'application/json',
|
95
|
+
}
|
38
96
|
|
39
|
-
|
40
|
-
|
41
|
-
|
97
|
+
@client.call(
|
98
|
+
method: 'GET',
|
99
|
+
path: path,
|
100
|
+
headers: headers,
|
101
|
+
params: params,
|
102
|
+
response_type: Models::CountryList
|
103
|
+
)
|
42
104
|
end
|
43
105
|
|
106
|
+
# List of all countries phone codes. You can use the locale header to get the
|
107
|
+
# data in a supported language.
|
108
|
+
#
|
109
|
+
#
|
110
|
+
# @return [PhoneList]
|
44
111
|
def get_countries_phones()
|
45
112
|
path = '/locale/countries/phones'
|
46
113
|
|
47
|
-
params = {
|
114
|
+
params = {
|
115
|
+
}
|
48
116
|
|
49
|
-
|
50
|
-
|
51
|
-
}
|
117
|
+
headers = {
|
118
|
+
"content-type": 'application/json',
|
119
|
+
}
|
120
|
+
|
121
|
+
@client.call(
|
122
|
+
method: 'GET',
|
123
|
+
path: path,
|
124
|
+
headers: headers,
|
125
|
+
params: params,
|
126
|
+
response_type: Models::PhoneList
|
127
|
+
)
|
52
128
|
end
|
53
129
|
|
130
|
+
# List of all currencies, including currency symbol, name, plural, and
|
131
|
+
# decimal digits for all major and minor currencies. You can use the locale
|
132
|
+
# header to get the data in a supported language.
|
133
|
+
#
|
134
|
+
#
|
135
|
+
# @return [CurrencyList]
|
54
136
|
def get_currencies()
|
55
137
|
path = '/locale/currencies'
|
56
138
|
|
57
|
-
params = {
|
139
|
+
params = {
|
140
|
+
}
|
141
|
+
|
142
|
+
headers = {
|
143
|
+
"content-type": 'application/json',
|
144
|
+
}
|
58
145
|
|
59
|
-
|
60
|
-
|
61
|
-
|
146
|
+
@client.call(
|
147
|
+
method: 'GET',
|
148
|
+
path: path,
|
149
|
+
headers: headers,
|
150
|
+
params: params,
|
151
|
+
response_type: Models::CurrencyList
|
152
|
+
)
|
62
153
|
end
|
63
154
|
|
155
|
+
# List of all languages classified by ISO 639-1 including 2-letter code, name
|
156
|
+
# in English, and name in the respective language.
|
157
|
+
#
|
158
|
+
#
|
159
|
+
# @return [LanguageList]
|
64
160
|
def get_languages()
|
65
161
|
path = '/locale/languages'
|
66
162
|
|
67
|
-
params = {
|
163
|
+
params = {
|
164
|
+
}
|
68
165
|
|
69
|
-
|
70
|
-
|
71
|
-
}
|
72
|
-
end
|
166
|
+
headers = {
|
167
|
+
"content-type": 'application/json',
|
168
|
+
}
|
73
169
|
|
170
|
+
@client.call(
|
171
|
+
method: 'GET',
|
172
|
+
path: path,
|
173
|
+
headers: headers,
|
174
|
+
params: params,
|
175
|
+
response_type: Models::LanguageList
|
176
|
+
)
|
177
|
+
end
|
74
178
|
|
75
|
-
protected
|
76
|
-
|
77
|
-
private
|
78
179
|
end
|
79
180
|
end
|