appwrite 1.0.8 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +16 -0
- data/CHANGELOG.md +1 -0
- data/Gemfile +1 -0
- data/LICENSE +1 -1
- data/README.md +10 -6
- data/appwrite.gemspec +3 -3
- data/docs/examples/avatars/get-browser.md +15 -0
- data/docs/examples/avatars/get-credit-card.md +15 -0
- data/docs/examples/avatars/get-favicon.md +15 -0
- data/docs/examples/avatars/get-flag.md +15 -0
- data/docs/examples/avatars/get-image.md +15 -0
- data/docs/examples/avatars/get-initials.md +15 -0
- data/docs/examples/avatars/get-q-r.md +15 -0
- data/docs/examples/database/create-collection.md +15 -0
- data/docs/examples/database/create-document.md +15 -0
- data/docs/examples/database/delete-collection.md +15 -0
- data/docs/examples/database/delete-document.md +15 -0
- data/docs/examples/database/get-collection.md +15 -0
- data/docs/examples/database/get-document.md +15 -0
- data/docs/examples/database/list-collections.md +15 -0
- data/docs/examples/database/list-documents.md +15 -0
- data/docs/examples/database/update-collection.md +15 -0
- data/docs/examples/database/update-document.md +15 -0
- data/docs/examples/functions/create-execution.md +15 -0
- data/docs/examples/functions/create-tag.md +15 -0
- data/docs/examples/functions/create.md +15 -0
- data/docs/examples/functions/delete-tag.md +15 -0
- data/docs/examples/functions/delete.md +15 -0
- data/docs/examples/functions/get-execution.md +15 -0
- data/docs/examples/functions/get-tag.md +15 -0
- data/docs/examples/functions/get.md +15 -0
- data/docs/examples/functions/list-executions.md +15 -0
- data/docs/examples/functions/list-tags.md +15 -0
- data/docs/examples/functions/list.md +15 -0
- data/docs/examples/functions/update-tag.md +15 -0
- data/docs/examples/functions/update.md +15 -0
- data/docs/examples/health/get-anti-virus.md +15 -0
- data/docs/examples/health/get-cache.md +15 -0
- data/docs/examples/health/get-d-b.md +15 -0
- data/docs/examples/health/get-queue-certificates.md +15 -0
- data/docs/examples/health/get-queue-functions.md +15 -0
- data/docs/examples/health/get-queue-logs.md +15 -0
- data/docs/examples/health/get-queue-tasks.md +15 -0
- data/docs/examples/health/get-queue-usage.md +15 -0
- data/docs/examples/health/get-queue-webhooks.md +15 -0
- data/docs/examples/health/get-storage-local.md +15 -0
- data/docs/examples/health/get-time.md +15 -0
- data/docs/examples/health/get.md +15 -0
- data/docs/examples/locale/get-continents.md +15 -0
- data/docs/examples/locale/get-countries-e-u.md +15 -0
- data/docs/examples/locale/get-countries-phones.md +15 -0
- data/docs/examples/locale/get-countries.md +15 -0
- data/docs/examples/locale/get-currencies.md +15 -0
- data/docs/examples/locale/get-languages.md +15 -0
- data/docs/examples/locale/get.md +15 -0
- data/docs/examples/storage/create-file.md +15 -0
- data/docs/examples/storage/delete-file.md +15 -0
- data/docs/examples/storage/get-file-download.md +15 -0
- data/docs/examples/storage/get-file-preview.md +15 -0
- data/docs/examples/storage/get-file-view.md +15 -0
- data/docs/examples/storage/get-file.md +15 -0
- data/docs/examples/storage/list-files.md +15 -0
- data/docs/examples/storage/update-file.md +15 -0
- data/docs/examples/teams/create-membership.md +15 -0
- data/docs/examples/teams/create.md +15 -0
- data/docs/examples/teams/delete-membership.md +15 -0
- data/docs/examples/teams/delete.md +15 -0
- data/docs/examples/teams/get-memberships.md +15 -0
- data/docs/examples/teams/get.md +15 -0
- data/docs/examples/teams/list.md +15 -0
- data/docs/examples/teams/update.md +15 -0
- data/docs/examples/users/create.md +15 -0
- data/docs/examples/users/delete-session.md +15 -0
- data/docs/examples/users/delete-sessions.md +15 -0
- data/docs/examples/users/delete-user.md +15 -0
- data/docs/examples/users/get-logs.md +15 -0
- data/docs/examples/users/get-prefs.md +15 -0
- data/docs/examples/users/get-sessions.md +15 -0
- data/docs/examples/users/get.md +15 -0
- data/docs/examples/users/list.md +15 -0
- data/docs/examples/users/update-prefs.md +15 -0
- data/docs/examples/users/update-status.md +15 -0
- data/lib/appwrite.rb +4 -3
- data/lib/appwrite/client.rb +46 -13
- data/lib/appwrite/file.rb +23 -0
- data/lib/appwrite/services/avatars.rb +17 -1
- data/lib/appwrite/services/database.rb +27 -29
- data/lib/appwrite/services/functions.rb +194 -0
- data/lib/appwrite/services/health.rb +141 -0
- data/lib/appwrite/services/locale.rb +12 -1
- data/lib/appwrite/services/storage.rb +9 -10
- data/lib/appwrite/services/teams.rb +21 -48
- data/lib/appwrite/services/users.rb +32 -20
- metadata +86 -11
- data/lib/appwrite/services/account.rb +0 -114
- data/lib/appwrite/services/auth.rb +0 -131
- data/lib/appwrite/services/projects.rb +0 -410
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
functions = Appwrite::Functions.new(client);
|
12
|
+
|
13
|
+
response = functions.delete(function_id: '[FUNCTION_ID]');
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
functions = Appwrite::Functions.new(client);
|
12
|
+
|
13
|
+
response = functions.get_execution(function_id: '[FUNCTION_ID]', execution_id: '[EXECUTION_ID]');
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
functions = Appwrite::Functions.new(client);
|
12
|
+
|
13
|
+
response = functions.get_tag(function_id: '[FUNCTION_ID]', tag_id: '[TAG_ID]');
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
functions = Appwrite::Functions.new(client);
|
12
|
+
|
13
|
+
response = functions.get(function_id: '[FUNCTION_ID]');
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
functions = Appwrite::Functions.new(client);
|
12
|
+
|
13
|
+
response = functions.list_executions(function_id: '[FUNCTION_ID]');
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
functions = Appwrite::Functions.new(client);
|
12
|
+
|
13
|
+
response = functions.list_tags(function_id: '[FUNCTION_ID]');
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
functions = Appwrite::Functions.new(client);
|
12
|
+
|
13
|
+
response = functions.list();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
functions = Appwrite::Functions.new(client);
|
12
|
+
|
13
|
+
response = functions.update_tag(function_id: '[FUNCTION_ID]', tag: '[TAG]');
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
functions = Appwrite::Functions.new(client);
|
12
|
+
|
13
|
+
response = functions.update(function_id: '[FUNCTION_ID]', name: '[NAME]', execute: []);
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
health = Appwrite::Health.new(client);
|
12
|
+
|
13
|
+
response = health.get_anti_virus();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
health = Appwrite::Health.new(client);
|
12
|
+
|
13
|
+
response = health.get_cache();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
health = Appwrite::Health.new(client);
|
12
|
+
|
13
|
+
response = health.get_d_b();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
health = Appwrite::Health.new(client);
|
12
|
+
|
13
|
+
response = health.get_queue_certificates();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
health = Appwrite::Health.new(client);
|
12
|
+
|
13
|
+
response = health.get_queue_functions();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
health = Appwrite::Health.new(client);
|
12
|
+
|
13
|
+
response = health.get_queue_logs();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
health = Appwrite::Health.new(client);
|
12
|
+
|
13
|
+
response = health.get_queue_tasks();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
health = Appwrite::Health.new(client);
|
12
|
+
|
13
|
+
response = health.get_queue_usage();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
health = Appwrite::Health.new(client);
|
12
|
+
|
13
|
+
response = health.get_queue_webhooks();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
health = Appwrite::Health.new(client);
|
12
|
+
|
13
|
+
response = health.get_storage_local();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
health = Appwrite::Health.new(client);
|
12
|
+
|
13
|
+
response = health.get_time();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
health = Appwrite::Health.new(client);
|
12
|
+
|
13
|
+
response = health.get();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
locale = Appwrite::Locale.new(client);
|
12
|
+
|
13
|
+
response = locale.get_continents();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
locale = Appwrite::Locale.new(client);
|
12
|
+
|
13
|
+
response = locale.get_countries_e_u();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
locale = Appwrite::Locale.new(client);
|
12
|
+
|
13
|
+
response = locale.get_countries_phones();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
locale = Appwrite::Locale.new(client);
|
12
|
+
|
13
|
+
response = locale.get_countries();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
locale = Appwrite::Locale.new(client);
|
12
|
+
|
13
|
+
response = locale.get_currencies();
|
14
|
+
|
15
|
+
puts response
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'appwrite'
|
2
|
+
|
3
|
+
client = Appwrite::Client.new()
|
4
|
+
|
5
|
+
client
|
6
|
+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
|
7
|
+
.set_project('5df5acd0d48c2') # Your project ID
|
8
|
+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
9
|
+
;
|
10
|
+
|
11
|
+
locale = Appwrite::Locale.new(client);
|
12
|
+
|
13
|
+
response = locale.get_languages();
|
14
|
+
|
15
|
+
puts response
|