Skip to content

Commit e477418

Browse files
authored
Merge pull request #21 from appwrite/dev
Dev
2 parents 14a80d4 + dfa3532 commit e477418

File tree

310 files changed

+7148
-835
lines changed

Some content is hidden

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

310 files changed

+7148
-835
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
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.4.13-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.5.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.4.x. 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.5.x. 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

13-
![Appwrite](https://appwrite.io/images/github.png)
13+
![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)
1414

1515
## Installation
1616

@@ -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 = '10.1.2'
4+
spec.version = '11.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'
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
require 'appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
9+
account = Account.new(client)
10+
11+
result = account.create_anonymous_session()
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://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
9+
account = Account.new(client)
10+
11+
result = account.create_email_password_session(
12+
email: 'email@example.com',
13+
password: 'password'
14+
)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
require 'appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
9+
account = Account.new(client)
10+
11+
result = account.create_email_token(
12+
user_id: '<USER_ID>',
13+
email: 'email@example.com',
14+
phrase: false # optional
15+
)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
require 'appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
9+
account = Account.new(client)
10+
11+
result = account.create_jwt()
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
require 'appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
9+
account = Account.new(client)
10+
11+
result = account.create_magic_url_token(
12+
user_id: '<USER_ID>',
13+
email: 'email@example.com',
14+
url: 'https://example.com', # optional
15+
phrase: false # optional
16+
)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
.set_session('') # The user session to authenticate with
10+
11+
account = Account.new(client)
12+
13+
result = account.create_mfa_authenticator(
14+
type: AuthenticatorType::TOTP
15+
)
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+
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+
result = account.create_mfa_challenge(
13+
factor: AuthenticationFactor::EMAIL
14+
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
require 'appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('5df5acd0d48c2') # Your project ID
8+
.set_session('') # The user session to authenticate with
9+
10+
account = Account.new(client)
11+
12+
result = account.create_mfa_recovery_codes()

0 commit comments

Comments
 (0)