Skip to content

Commit b572c15

Browse files
committed
Upgraded to support Appwrite 0.7.0
1 parent 98b4497 commit b572c15

31 files changed

+531
-36
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
source 'https://rubygems.org'
22

3+
gem 'mime-types', '~> 3.1'
34
gemspec

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors.
1+
Copyright (c) 2021 Appwrite (https://appwrite.io) and individual contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
# Appwrite Ruby SDK
22

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

6-
**This SDK is compatible with Appwrite server version 0.6.1. For older versions, please check previous releases.**
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).**
77

88
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.
99
Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
1010
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
1111

12-
13-
1412
![Appwrite](https://appwrite.io/images/github.png)
1513

1614
## Installation

appwrite.gemspec

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
Gem::Specification.new do |s|
22

33
s.name = 'appwrite'
4-
s.version = '1.0.11'
5-
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.
6-
Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
7-
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)"
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"
86
s.author = 'Appwrite Team'
97
s.homepage = 'https://appwrite.io/support'
10-
s.email = 'team@localhost.test'
8+
s.email = 'team@appwrite.io'
119
s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
1210

1311
end

docs/examples/database/get-collection-logs.md renamed to docs/examples/avatars/get-initials.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ client
88
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
99
;
1010

11-
database = Appwrite::Database.new(client);
11+
avatars = Appwrite::Avatars.new(client);
1212

13-
response = database.get_collection_logs(collection_id: '[COLLECTION_ID]');
13+
response = avatars.get_initials();
1414

1515
puts response
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

docs/examples/functions/create.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

docs/examples/functions/delete.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 commit comments

Comments
 (0)