Skip to content

Commit 0bd7e07

Browse files
committed
Update for 1.0.0
1 parent 065b84f commit 0bd7e07

File tree

172 files changed

+1882
-1842
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+1882
-1842
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Appwrite Ruby SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.0.0-RC1-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.0.0-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
88

9-
**This SDK is compatible with Appwrite server version 1.0.0-RC1. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-ruby/releases).**
9+
**This SDK is compatible with Appwrite server version 1.0.0. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-ruby/releases).**
1010

1111
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)
1212

@@ -45,7 +45,7 @@ Once your SDK object is set, create any of the Appwrite service objects and choo
4545
```ruby
4646
users = Appwrite::Users.new(client);
4747

48-
result = users.create(userId: '[USER_ID]', email: '[email protected]', password: 'password');
48+
user = users.create(userId: Appwrite::ID::unique(), email: '[email protected]', password: 'password');
4949
```
5050

5151
### Full Example
@@ -63,7 +63,7 @@ client
6363

6464
users = Appwrite::Users.new(client);
6565

66-
result = users.create(userId: '[USER_ID]', email: '[email protected]', password: 'password');
66+
user = users.create(userId: Appwrite::ID::unique(), email: '[email protected]', password: 'password');
6767
```
6868

6969
### Error Handling
@@ -73,7 +73,7 @@ The Appwrite Ruby SDK raises `Appwrite::Exception` object with `message`, `code`
7373
users = Appwrite::Users.new(client);
7474

7575
begin
76-
result = users.create(userId: '[USER_ID]', email: '[email protected]', password: 'password');
76+
user = users.create(userId: Appwrite::ID::unique(), email: '[email protected]', password: 'password');
7777
rescue Appwrite::Exception => error
7878
puts error.message
7979
end

appwrite.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Gem::Specification.new do |spec|
22

33
spec.name = 'appwrite'
4-
spec.version = '7.0.0-RC2'
4+
spec.version = '7.0.0'
55
spec.license = 'BSD-3-Clause'
66
spec.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'
77
spec.author = 'Appwrite Team'

docs/examples/account/create-phone-verification.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.create_phone_verification()
1313

docs/examples/account/create-recovery.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.create_recovery(email: '[email protected]', url: 'https://example.com')
1313

docs/examples/account/create-verification.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.create_verification(url: 'https://example.com')
1313

docs/examples/account/delete-session.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.delete_session(session_id: '[SESSION_ID]')
1313

docs/examples/account/delete-sessions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.delete_sessions()
1313

docs/examples/account/get-logs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
require 'appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.get_logs()
1313

docs/examples/account/get-prefs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.get_prefs()
1313

docs/examples/account/get-session.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.get_session(session_id: '[SESSION_ID]')
1313

docs/examples/account/get-sessions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
require 'appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.get_sessions()
1313

docs/examples/account/get.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.get()
1313

docs/examples/account/list-logs.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require 'Appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
9+
10+
account = Account.new(client)
11+
12+
response = account.list_logs()
13+
14+
puts response.inspect
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require 'Appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
9+
10+
account = Account.new(client)
11+
12+
response = account.list_sessions()
13+
14+
puts response.inspect

docs/examples/account/update-email.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.update_email(email: '[email protected]', password: 'password')
1313

docs/examples/account/update-name.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.update_name(name: '[NAME]')
1313

docs/examples/account/update-password.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.update_password(password: 'password')
1313

docs/examples/account/update-phone-verification.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.update_phone_verification(user_id: '[USER_ID]', secret: '[SECRET]')
1313

docs/examples/account/update-phone.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.update_phone(phone: '', password: 'password')
1313

docs/examples/account/update-prefs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.update_prefs(prefs: {})
1313

docs/examples/account/update-recovery.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require 'appwrite'
1+
require 'Appwrite'
22

3-
client = Appwrite::Client.new
3+
include Appwrite
44

5-
client
5+
client = Client.new
66
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
77
.set_project('5df5acd0d48c2') # Your project ID
88
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
99

10-
account = Appwrite::Account.new(client)
10+
account = Account.new(client)
1111

1212
response = account.update_recovery(user_id: '[USER_ID]', secret: '[SECRET]', password: 'password', password_again: 'password')
1313

0 commit comments

Comments
 (0)