Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Change Log

## 29.0.0

* Breaking: `account.list_logs`, `users.list_logs`, `Log` and `LogList` removed
* Breaking: `organization` key methods renamed to `create_ephemeral_project_key`, `get_project_key`, `list_project_keys`, `update_project_key` and `delete_project_key`; `OrganizationKeyScopes` removed
* Breaking: `set_dev_key` client method, `DevKey` model and `Project.dev_keys` removed
* Breaking: `project_name`, `region`, `organization_id`, `organization_name`, `billing_plan` and `reason` removed from `Block`
* Breaking: `DedicatedDatabaseSpecificationList.pricing` and `DedicatedDatabaseSpecificationPricing` removed; rates now live on `DedicatedDatabaseSpecification`
* Breaking: `BillingPlanGroup` `starter` replaced by `free` and `start`
* Breaking: `resource` is now an array on `oauth2.authorize`, `oauth2.create_par`, `oauth2.create_token` and `oauth2.create_device_authorization`
* Breaking: `BackupRestoration.options` is now a key-value object instead of a string
* Added: passkey methods `account.list_passkeys`, `account.create_passkey`, `account.get_passkey`, `account.update_passkey`, `account.delete_passkey`, `account.update_passkey_verification`, `account.create_passkey_token` and `account.update_passkey_token`
* Added: `users.list_passkeys`, `users.get_passkey`, `users.update_passkey`, `users.delete_passkey`, plus `project.update_passkey_policy`
* Added: `Passkey`, `PasskeyList`, `PasskeyChallenge`, `PolicyPasskey` and `TokenSecret` models
* Added: `fingerprints` on Android platforms for passkeys
* Added: `domains` service for domains, DNS records, email presets, prices and transfers
* Added: `waf` service for bypass, challenge, deny, rate-limit and redirect rules
* Added: `account.create_id_token_session` for native Apple and Google sign-in, with native client IDs on those providers
* Added: email verification and recovery OTP methods on `account`
* Added: `oauth2.introspect` for RFC 7662 token introspection, returning `Oauth2Introspection`
* Added: `avatars.update_photo` and `avatars.delete_photo`
* Added: `messaging.create_appwrite_provider` and `messaging.update_appwrite_provider`
* Added: `project.update_password_pwned_policy`, `PolicyPasswordPwned` model and `User.password_pwned`
* Added: Kakao, TikTok and Webflow OAuth2 providers
* Added: `prompt` on Auth0, Discord, GitHub, Microsoft, Okta, Salesforce and Zoho providers, with prompt enums
* Added: `Topic` and `ResolvedTopic` helpers for building MQTT push topics
* Added: reply-to on email messages, `channel_id` on push messages, `qos` and `expiry` on topics
* Added: `membership_id` on `teams.create_membership`, and `total` on locale and other list endpoints
* Added: `storage_status` and `storage_target_gb` on `DedicatedDatabase`; `eligible_countries` on `BillingPlan`
* Added: `auto` image gravity, `jaspr` framework, `dart-3.13` and `flutter-3.47` runtimes
* Added: `project.update_password_rotation_policy` and the `PolicyPasswordRotation` model
* Fixed: response models fill missing fields from spec defaults instead of throwing
* Fixed: object parameters in multipart requests are sent as JSON
* Updated: several model fields are now optional and may be `nil`, e.g. `DedicatedDatabase.engine`, `Organization.billing_start_date`, `BillingPlan.usage`, `BackupArchive.size`
* Updated: requests send `X-Appwrite-Response-Format` `2.4.0`

## 28.2.0

* Added: optional `interval` parameter on `functions.create` and `functions.update` to run a function every N minutes
Expand Down
4 changes: 2 additions & 2 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-2.0.0-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-2.4.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 targets Appwrite server version 1.9.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-ruby/releases) when APIs differ.
**This SDK targets Appwrite server version 2.4.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-ruby/releases) when APIs differ.

Appwrite is an open-source backend as a service server that abstracts and simplifies 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
2 changes: 1 addition & 1 deletion appwrite.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = 'appwrite'
spec.version = '28.2.0'
spec.version = '29.0.0'
spec.license = 'BSD-3-Clause'
spec.summary = 'Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API'
spec.author = 'Appwrite Team'
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/account/create-email-password-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ account = Account.new(client)

result = account.create_email_password_session(
email: 'email@example.com',
password: 'password'
password: 'password',
duration: 60 # optional
)
```
16 changes: 16 additions & 0 deletions docs/examples/account/create-email-verification-otp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.create_email_verification_otp(
phrase: false # optional
)
```
22 changes: 22 additions & 0 deletions docs/examples/account/create-id-token-session.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
```ruby
require 'appwrite'

include Appwrite
include Appwrite::Enums

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.create_id_token_session(
provider: IdTokenProvider::APPLE,
id_token: '<ID_TOKEN>',
nonce: '<NONCE>', # optional
access_token: '<ACCESS_TOKEN>', # optional
access_token_expiry: 0, # optional
name: '<NAME>' # optional
)
```
14 changes: 14 additions & 0 deletions docs/examples/account/create-passkey-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.create_passkey_token()
```
17 changes: 17 additions & 0 deletions docs/examples/account/create-passkey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.create_passkey(
passkey_id: '<PASSKEY_ID>', # optional
name: '<NAME>' # optional
)
```
17 changes: 17 additions & 0 deletions docs/examples/account/create-recovery-otp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.create_recovery_otp(
email: 'email@example.com',
phrase: false # optional
)
```
16 changes: 16 additions & 0 deletions docs/examples/account/delete-passkey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.delete_passkey(
passkey_id: '<PASSKEY_ID>'
)
```
4 changes: 3 additions & 1 deletion docs/examples/account/delete-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ client = Client.new

account = Account.new(client)

result = account.delete_sessions()
result = account.delete_sessions(
current: false # optional
)
```
16 changes: 16 additions & 0 deletions docs/examples/account/get-passkey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.get_passkey(
passkey_id: '<PASSKEY_ID>'
)
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ client = Client.new

account = Account.new(client)

result = account.list_logs(
result = account.list_passkeys(
queries: [], # optional
total: false # optional
)
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/account/list-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ client = Client.new

account = Account.new(client)

result = account.list_sessions()
result = account.list_sessions(
total: false # optional
)
```
17 changes: 17 additions & 0 deletions docs/examples/account/update-email-verification-otp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.update_email_verification_otp(
user_id: '<USER_ID>',
secret: '<SECRET>'
)
```
17 changes: 17 additions & 0 deletions docs/examples/account/update-passkey-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.update_passkey_token(
challenge_id: '<CHALLENGE_ID>',
credential: {}
)
```
17 changes: 17 additions & 0 deletions docs/examples/account/update-passkey-verification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.update_passkey_verification(
passkey_id: '<PASSKEY_ID>',
credential: {}
)
```
17 changes: 17 additions & 0 deletions docs/examples/account/update-passkey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.update_passkey(
passkey_id: '<PASSKEY_ID>',
name: '<NAME>'
)
```
18 changes: 18 additions & 0 deletions docs/examples/account/update-recovery-otp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.update_recovery_otp(
user_id: '<USER_ID>',
secret: '<SECRET>',
password: 'password'
)
```
14 changes: 14 additions & 0 deletions docs/examples/avatars/delete-photo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

avatars = Avatars.new(client)

result = avatars.delete_photo()
```
3 changes: 1 addition & 2 deletions docs/examples/avatars/get-screenshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ avatars = Avatars.new(client)
result = avatars.get_screenshot(
url: 'https://example.com',
headers: {
"Authorization" => "Bearer token123",
"X-Custom-Header" => "value"
"Accept-Language" => "en-US,en;q=0.9"
}, # optional
viewport_width: 1920, # optional
viewport_height: 1080, # optional
Expand Down
16 changes: 16 additions & 0 deletions docs/examples/avatars/update-photo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

avatars = Avatars.new(client)

result = avatars.update_photo(
file: InputFile.from_path('dir/file.png')
)
```
11 changes: 10 additions & 1 deletion docs/examples/databases/create-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ databases = Databases.new(client)
result = databases.create_documents(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
documents: [],
documents: [
{
"$id": "example1",
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
}
],
transaction_id: '<TRANSACTION_ID>' # optional
)
```
2 changes: 1 addition & 1 deletion docs/examples/databases/create-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ result = databases.create_index(
collection_id: '<COLLECTION_ID>',
key: '<KEY>',
type: DatabasesIndexType::KEY,
attributes: [],
attributes: ["username"],
orders: [OrderBy::ASC], # optional
lengths: [] # optional
)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/delete-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ databases = Databases.new(client)
result = databases.delete_documents(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
queries: [], # optional
queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], # optional
transaction_id: '<TRANSACTION_ID>' # optional
)
```
Loading
Loading