Skip to content

Commit

Permalink
Fix for path parsing and updated doc examples
Browse files Browse the repository at this point in the history
  • Loading branch information
eldadfux committed May 30, 2020
1 parent f9a4d4c commit 98b4497
Show file tree
Hide file tree
Showing 68 changed files with 953 additions and 38 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Appwrite Ruby SDK

![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.6.1-blue.svg?v=1)

**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.**
**This SDK is compatible with Appwrite server version 0.6.1. For older versions, please check previous releases.**

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.
Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
Expand Down
2 changes: 1 addition & 1 deletion appwrite.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|

s.name = 'appwrite'
s.version = '1.0.10'
s.version = '1.0.11'
s.summary = "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.
Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)"
Expand Down
15 changes: 15 additions & 0 deletions docs/examples/avatars/get-browser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

avatars = Appwrite::Avatars.new(client);

response = avatars.get_browser(code: 'aa');

puts response
15 changes: 15 additions & 0 deletions docs/examples/avatars/get-credit-card.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

avatars = Appwrite::Avatars.new(client);

response = avatars.get_credit_card(code: 'amex');

puts response
15 changes: 15 additions & 0 deletions docs/examples/avatars/get-favicon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

avatars = Appwrite::Avatars.new(client);

response = avatars.get_favicon(url: 'https://example.com');

puts response
15 changes: 15 additions & 0 deletions docs/examples/avatars/get-flag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

avatars = Appwrite::Avatars.new(client);

response = avatars.get_flag(code: 'af');

puts response
15 changes: 15 additions & 0 deletions docs/examples/avatars/get-image.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

avatars = Appwrite::Avatars.new(client);

response = avatars.get_image(url: 'https://example.com');

puts response
15 changes: 15 additions & 0 deletions docs/examples/avatars/get-q-r.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

avatars = Appwrite::Avatars.new(client);

response = avatars.get_q_r(text: '[TEXT]');

puts response
15 changes: 15 additions & 0 deletions docs/examples/database/create-collection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

database = Appwrite::Database.new(client);

response = database.create_collection(name: '[NAME]', read: [], write: [], rules: []);

puts response
15 changes: 15 additions & 0 deletions docs/examples/database/create-document.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

database = Appwrite::Database.new(client);

response = database.create_document(collection_id: '[COLLECTION_ID]', data: {}, read: [], write: []);

puts response
15 changes: 15 additions & 0 deletions docs/examples/database/delete-collection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

database = Appwrite::Database.new(client);

response = database.delete_collection(collection_id: '[COLLECTION_ID]');

puts response
15 changes: 15 additions & 0 deletions docs/examples/database/delete-document.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

database = Appwrite::Database.new(client);

response = database.delete_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]');

puts response
15 changes: 15 additions & 0 deletions docs/examples/database/get-collection-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

database = Appwrite::Database.new(client);

response = database.get_collection_logs(collection_id: '[COLLECTION_ID]');

puts response
15 changes: 15 additions & 0 deletions docs/examples/database/get-collection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

database = Appwrite::Database.new(client);

response = database.get_collection(collection_id: '[COLLECTION_ID]');

puts response
15 changes: 15 additions & 0 deletions docs/examples/database/get-document.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

database = Appwrite::Database.new(client);

response = database.get_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]');

puts response
15 changes: 15 additions & 0 deletions docs/examples/database/list-collections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

database = Appwrite::Database.new(client);

response = database.list_collections();

puts response
15 changes: 15 additions & 0 deletions docs/examples/database/list-documents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

database = Appwrite::Database.new(client);

response = database.list_documents(collection_id: '[COLLECTION_ID]');

puts response
15 changes: 15 additions & 0 deletions docs/examples/database/update-collection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

database = Appwrite::Database.new(client);

response = database.update_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', read: [], write: []);

puts response
15 changes: 15 additions & 0 deletions docs/examples/database/update-document.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

database = Appwrite::Database.new(client);

response = database.update_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]', data: {}, read: [], write: []);

puts response
15 changes: 15 additions & 0 deletions docs/examples/health/get-anti-virus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

health = Appwrite::Health.new(client);

response = health.get_anti_virus();

puts response
15 changes: 15 additions & 0 deletions docs/examples/health/get-cache.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

health = Appwrite::Health.new(client);

response = health.get_cache();

puts response
15 changes: 15 additions & 0 deletions docs/examples/health/get-d-b.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

health = Appwrite::Health.new(client);

response = health.get_d_b();

puts response
15 changes: 15 additions & 0 deletions docs/examples/health/get-queue-certificates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

health = Appwrite::Health.new(client);

response = health.get_queue_certificates();

puts response
15 changes: 15 additions & 0 deletions docs/examples/health/get-queue-functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'appwrite'

client = Appwrite::Client.new()

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
;

health = Appwrite::Health.new(client);

response = health.get_queue_functions();

puts response
Loading

0 comments on commit 98b4497

Please sign in to comment.