Skip to content

Commit

Permalink
Update for 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
abnegate committed Sep 14, 2022
1 parent 065b84f commit 0bd7e07
Show file tree
Hide file tree
Showing 172 changed files with 1,882 additions and 1,842 deletions.
10 changes: 5 additions & 5 deletions README.md
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)

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion appwrite.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |spec|

spec.name = 'appwrite'
spec.version = '7.0.0-RC2'
spec.version = '7.0.0'
spec.license = 'BSD-3-Clause'
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'
spec.author = 'Appwrite Team'
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/create-phone-verification.md
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_phone_verification()

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/create-recovery.md
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')

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/create-verification.md
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_verification(url: 'https://example.com')

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/delete-session.md
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.delete_session(session_id: '[SESSION_ID]')

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/delete-sessions.md
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.delete_sessions()

Expand Down
6 changes: 3 additions & 3 deletions docs/examples/account/get-logs.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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.get_logs()

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/get-prefs.md
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.get_prefs()

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/get-session.md
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.get_session(session_id: '[SESSION_ID]')

Expand Down
6 changes: 3 additions & 3 deletions docs/examples/account/get-sessions.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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.get_sessions()

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/get.md
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.get()

Expand Down
14 changes: 14 additions & 0 deletions docs/examples/account/list-logs.md
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
14 changes: 14 additions & 0 deletions docs/examples/account/list-sessions.md
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
8 changes: 4 additions & 4 deletions docs/examples/account/update-email.md
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')

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/update-name.md
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_name(name: '[NAME]')

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/update-password.md
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_password(password: 'password')

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/update-phone-verification.md
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_phone_verification(user_id: '[USER_ID]', secret: '[SECRET]')

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/update-phone.md
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_phone(phone: '', password: 'password')

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/update-prefs.md
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_prefs(prefs: {})

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/account/update-recovery.md
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_recovery(user_id: '[USER_ID]', secret: '[SECRET]', password: 'password', password_again: 'password')

Expand Down
Loading

0 comments on commit 0bd7e07

Please sign in to comment.