-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
172 changed files
with
1,882 additions
and
1,842 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# Appwrite Ruby SDK | ||
|
||
![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?style=flat-square) | ||
![Version](https://img.shields.io/badge/api%20version-1.0.0-RC1-blue.svg?style=flat-square) | ||
![Version](https://img.shields.io/badge/api%20version-1.0.0-blue.svg?style=flat-square) | ||
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) | ||
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) | ||
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) | ||
|
||
**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).** | ||
**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).** | ||
|
||
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) | ||
|
||
|
@@ -45,7 +45,7 @@ Once your SDK object is set, create any of the Appwrite service objects and choo | |
```ruby | ||
users = Appwrite::Users.new(client); | ||
|
||
result = users.create(userId: '[USER_ID]', email: '[email protected]', password: 'password'); | ||
user = users.create(userId: Appwrite::ID::unique(), email: '[email protected]', password: 'password'); | ||
``` | ||
|
||
### Full Example | ||
|
@@ -63,7 +63,7 @@ client | |
|
||
users = Appwrite::Users.new(client); | ||
|
||
result = users.create(userId: '[USER_ID]', email: '[email protected]', password: 'password'); | ||
user = users.create(userId: Appwrite::ID::unique(), email: '[email protected]', password: 'password'); | ||
``` | ||
|
||
### Error Handling | ||
|
@@ -73,7 +73,7 @@ The Appwrite Ruby SDK raises `Appwrite::Exception` object with `message`, `code` | |
users = Appwrite::Users.new(client); | ||
|
||
begin | ||
result = users.create(userId: '[USER_ID]', email: '[email protected]', password: 'password'); | ||
user = users.create(userId: Appwrite::ID::unique(), email: '[email protected]', password: 'password'); | ||
rescue Appwrite::Exception => error | ||
puts error.message | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
require 'appwrite' | ||
require 'Appwrite' | ||
|
||
client = Appwrite::Client.new | ||
include Appwrite | ||
|
||
client | ||
client = Client.new | ||
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint | ||
.set_project('5df5acd0d48c2') # Your project ID | ||
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token | ||
|
||
account = Appwrite::Account.new(client) | ||
account = Account.new(client) | ||
|
||
response = account.create_recovery(email: '[email protected]', url: 'https://example.com') | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'Appwrite' | ||
|
||
include Appwrite | ||
|
||
client = Client.new | ||
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint | ||
.set_project('5df5acd0d48c2') # Your project ID | ||
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token | ||
|
||
account = Account.new(client) | ||
|
||
response = account.list_logs() | ||
|
||
puts response.inspect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'Appwrite' | ||
|
||
include Appwrite | ||
|
||
client = Client.new | ||
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint | ||
.set_project('5df5acd0d48c2') # Your project ID | ||
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token | ||
|
||
account = Account.new(client) | ||
|
||
response = account.list_sessions() | ||
|
||
puts response.inspect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
require 'appwrite' | ||
require 'Appwrite' | ||
|
||
client = Appwrite::Client.new | ||
include Appwrite | ||
|
||
client | ||
client = Client.new | ||
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint | ||
.set_project('5df5acd0d48c2') # Your project ID | ||
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token | ||
|
||
account = Appwrite::Account.new(client) | ||
account = Account.new(client) | ||
|
||
response = account.update_email(email: '[email protected]', password: 'password') | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.