Skip to content

Commit a8f4058

Browse files
committed
Release candidate for 1.5.x
1 parent f9c01ec commit a8f4058

File tree

211 files changed

+790
-933
lines changed

Some content is hidden

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

211 files changed

+790
-933
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
user = users.create(userId: Appwrite::ID::unique(), email: 'email@example.com', password: 'password');
48+
user = users.create(userId: Appwrite::ID::unique(), email: "email@example.com", phone: "+123456789", password: "password", name: "Walter O'Brien");
4949
```
5050

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

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

66-
user = users.create(userId: Appwrite::ID::unique(), email: 'email@example.com', password: 'password');
66+
user = users.create(userId: Appwrite::ID::unique(), email: "email@example.com", phone: "+123456789", password: "password", name: "Walter O'Brien");
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-
user = users.create(userId: Appwrite::ID::unique(), email: 'email@example.com', password: 'password');
76+
user = users.create(userId: Appwrite::ID::unique(), email: "email@example.com", phone: "+123456789", password: "password", name: "Walter O'Brien");
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 = '11.0.0-rc.4'
4+
spec.version = '11.0.0-rc.5'
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/create2f-a-challenge.md renamed to docs/examples/account/create-challenge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ client = Client.new
99

1010
account = Account.new(client)
1111

12-
response = account.create2_fa_challenge(
12+
response = account.create_challenge(
1313
factor: AuthenticationFactor::TOTP
1414
)
1515

docs/examples/account/create-email-token.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ client = Client.new
99
account = Account.new(client)
1010

1111
response = account.create_email_token(
12-
user_id: '[USER_ID]',
12+
user_id: '<USER_ID>',
1313
email: 'email@example.com',
1414
phrase: false # optional
1515
)

docs/examples/account/create-magic-u-r-l-token.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ client = Client.new
99
account = Account.new(client)
1010

1111
response = account.create_magic_url_token(
12-
user_id: '[USER_ID]',
12+
user_id: '<USER_ID>',
1313
email: 'email@example.com',
1414
url: 'https://example.com', # optional
1515
phrase: false # optional

docs/examples/account/create-o-auth2session.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ response = account.create_o_auth2_session(
1313
provider: OAuthProvider::AMAZON,
1414
success: 'https://example.com', # optional
1515
failure: 'https://example.com', # optional
16-
token: false, # optional
1716
scopes: [] # optional
1817
)
1918

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require 'appwrite'
2+
3+
include Appwrite
4+
include Appwrite::Enums
5+
6+
client = Client.new
7+
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
8+
.set_project('5df5acd0d48c2') # Your project ID
9+
10+
account = Account.new(client)
11+
12+
response = account.create_o_auth2_token(
13+
provider: OAuthProvider::AMAZON,
14+
success: 'https://example.com', # optional
15+
failure: 'https://example.com', # optional
16+
scopes: [] # optional
17+
)
18+
19+
puts response.inspect

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ client = Client.new
99
account = Account.new(client)
1010

1111
response = account.create_phone_token(
12-
user_id: '[USER_ID]',
12+
user_id: '<USER_ID>',
1313
phone: '+12065550100'
1414
)
1515

docs/examples/account/create-session.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ client = Client.new
99
account = Account.new(client)
1010

1111
response = account.create_session(
12-
user_id: '[USER_ID]',
13-
secret: '[SECRET]'
12+
user_id: '<USER_ID>',
13+
secret: '<SECRET>'
1414
)
1515

1616
puts response.inspect

docs/examples/account/create.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ client = Client.new
99
account = Account.new(client)
1010

1111
response = account.create(
12-
user_id: '[USER_ID]',
12+
user_id: '<USER_ID>',
1313
email: 'email@example.com',
1414
password: '',
15-
name: '[NAME]' # optional
15+
name: '<NAME>' # optional
1616
)
1717

1818
puts response.inspect

0 commit comments

Comments
 (0)