appwrite 1.0.7 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -0
- data/Gemfile +1 -0
- data/LICENSE +1 -1
- data/README.md +10 -6
- data/appwrite.gemspec +2 -2
- 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 +12 -15
- data/lib/appwrite/services/teams.rb +21 -48
- data/lib/appwrite/services/users.rb +32 -20
- metadata +85 -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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aed117cf461a878f949d987bfc8dfabc562be72e34cfd648d0047651b4f986e7
|
4
|
+
data.tar.gz: f7dfd52f109f0566e010b2958efff2a8b201332e56de28ff51184b1721b57791
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df0356df74fd99bb0bc4dab701b274a9b5ec2f798148875ca147265c99a27ca44b60478492fed5e7d0192aecb07bd97399e7b7e699a50b46040f038abd58f93d
|
7
|
+
data.tar.gz: 8a9a553d9272f3ad02ecc4684b92d0fcf2e9206dd7d4daa42733d5418ddfaa11ef6c93e44d61502cde503fef8e342141afef49c88b7d56b4e6acce733bd03078
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Change Log
|
data/Gemfile
CHANGED
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2021 Appwrite (https://appwrite.io) and individual contributors.
|
2
2
|
All rights reserved.
|
3
3
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
# Appwrite SDK
|
1
|
+
# Appwrite Ruby SDK
|
2
2
|
|
3
3
|
![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?v=1)
|
4
|
-
![Version](https://img.shields.io/badge/api%20version-0.
|
5
|
-
|
6
|
-
**WORK IN PROGRESS - NOT READY FOR USAGE - Want to help us improve this client SDK? Send a pull request to Appwrite [SDK generator repository](https://github.com/appwrite/sdk-generator).**
|
7
|
-
|
8
|
-
Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
4
|
+
![Version](https://img.shields.io/badge/api%20version-0.7.0-blue.svg?v=1)
|
9
5
|
|
6
|
+
**This SDK is compatible with Appwrite server version 0.7.0. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-ruby/releases).**
|
10
7
|
|
8
|
+
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
|
9
|
+
Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
10
|
+
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
11
11
|
|
12
12
|
![Appwrite](https://appwrite.io/images/github.png)
|
13
13
|
|
@@ -19,6 +19,10 @@ To install via [Gem](https://rubygems.org/):
|
|
19
19
|
gem install appwrite --save
|
20
20
|
```
|
21
21
|
|
22
|
+
## Contribution
|
23
|
+
|
24
|
+
This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
|
25
|
+
|
22
26
|
## License
|
23
27
|
|
24
28
|
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
|
data/appwrite.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'appwrite'
|
4
|
-
s.version = '
|
5
|
-
s.summary = "Appwrite
|
4
|
+
s.version = '2.0.0'
|
5
|
+
s.summary = "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API"
|
6
6
|
s.author = 'Appwrite Team'
|
7
7
|
s.homepage = 'https://appwrite.io/support'
|
8
8
|
s.email = 'team@appwrite.io'
|
@@ -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
|
+
avatars = Appwrite::Avatars.new(client);
|
12
|
+
|
13
|
+
response = avatars.get_browser(code: 'aa');
|
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
|
+
avatars = Appwrite::Avatars.new(client);
|
12
|
+
|
13
|
+
response = avatars.get_credit_card(code: 'amex');
|
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
|
+
avatars = Appwrite::Avatars.new(client);
|
12
|
+
|
13
|
+
response = avatars.get_favicon(url: 'https://example.com');
|
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
|
+
avatars = Appwrite::Avatars.new(client);
|
12
|
+
|
13
|
+
response = avatars.get_flag(code: 'af');
|
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
|
+
avatars = Appwrite::Avatars.new(client);
|
12
|
+
|
13
|
+
response = avatars.get_image(url: 'https://example.com');
|
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
|
+
avatars = Appwrite::Avatars.new(client);
|
12
|
+
|
13
|
+
response = avatars.get_initials();
|
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
|
+
avatars = Appwrite::Avatars.new(client);
|
12
|
+
|
13
|
+
response = avatars.get_q_r(text: '[TEXT]');
|
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
|
+
database = Appwrite::Database.new(client);
|
12
|
+
|
13
|
+
response = database.create_collection(name: '[NAME]', read: [], write: [], rules: []);
|
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
|
+
database = Appwrite::Database.new(client);
|
12
|
+
|
13
|
+
response = database.create_document(collection_id: '[COLLECTION_ID]', data: {}, read: [], write: []);
|
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
|
+
database = Appwrite::Database.new(client);
|
12
|
+
|
13
|
+
response = database.delete_collection(collection_id: '[COLLECTION_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
|
+
database = Appwrite::Database.new(client);
|
12
|
+
|
13
|
+
response = database.delete_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_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
|
+
database = Appwrite::Database.new(client);
|
12
|
+
|
13
|
+
response = database.get_collection(collection_id: '[COLLECTION_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
|
+
database = Appwrite::Database.new(client);
|
12
|
+
|
13
|
+
response = database.get_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_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
|
+
database = Appwrite::Database.new(client);
|
12
|
+
|
13
|
+
response = database.list_collections();
|
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
|
+
database = Appwrite::Database.new(client);
|
12
|
+
|
13
|
+
response = database.list_documents(collection_id: '[COLLECTION_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
|
+
database = Appwrite::Database.new(client);
|
12
|
+
|
13
|
+
response = database.update_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', read: [], write: []);
|
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
|
+
database = Appwrite::Database.new(client);
|
12
|
+
|
13
|
+
response = database.update_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]', data: {}, read: [], write: []);
|
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.create_execution(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.create_tag(function_id: '[FUNCTION_ID]', command: '[COMMAND]', code: Appwrite::File.new());
|
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.create(name: '[NAME]', execute: [], env: 'node-14.5');
|
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.delete_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.delete(function_id: '[FUNCTION_ID]');
|
14
|
+
|
15
|
+
puts response
|