Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## 21.0.0

* Add array-based enum parameters (e.g., `permissions: Array<BrowserPermission>`).
* Breaking change: `Output` enum has been removed; use `ImageFormat` instead.
* Add `getQueueAudits` support to `Health` service.
* Add longtext/mediumtext/text/varchar attribute and column helpers to `Databases` and `TablesDB` services.

## 20.1.0

* Added ability to create columns and indexes synchronously while creating a table
Expand Down Expand Up @@ -53,4 +60,4 @@

## 14.0.0

* Fix pong response & chunked upload
* Fix pong response & chunked upload
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2025 Appwrite (https://appwrite.io) and individual contributors.
Copyright (c) 2026 Appwrite (https://appwrite.io) and individual contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# 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.8.0-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.8.1-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.8.x. 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)
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)

![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)

Expand Down
4 changes: 2 additions & 2 deletions appwrite.gemspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Gem::Specification.new do |spec|

spec.name = 'appwrite'
spec.version = '20.1.0'
spec.version = '21.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.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'
spec.homepage = 'https://appwrite.io/support'
spec.email = 'team@appwrite.io'
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/account/create-jwt.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ client = Client.new

account = Account.new(client)

result = account.create_jwt()
result = account.create_jwt(
duration: 0 # optional
)
8 changes: 4 additions & 4 deletions docs/examples/avatars/get-screenshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ result = avatars.get_screenshot(
viewport_width: 1920, # optional
viewport_height: 1080, # optional
scale: 2, # optional
theme: Theme::LIGHT, # optional
theme: Theme::DARK, # optional
user_agent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', # optional
fullpage: true, # optional
locale: 'en-US', # optional
timezone: Timezone::AFRICA_ABIDJAN, # optional
timezone: Timezone::AMERICA_NEW_YORK, # optional
latitude: 37.7749, # optional
longitude: -122.4194, # optional
accuracy: 100, # optional
touch: true, # optional
permissions: ["geolocation","notifications"], # optional
permissions: [BrowserPermission::GEOLOCATION, BrowserPermission::NOTIFICATIONS], # optional
sleep: 3, # optional
width: 800, # optional
height: 600, # optional
quality: 85, # optional
output: Output::JPG # optional
output: ImageFormat::JPEG # 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,6 +16,6 @@ result = databases.create_index(
key: '',
type: IndexType::KEY,
attributes: [],
orders: [], # optional
orders: [OrderBy::ASC], # optional
lengths: [] # optional
)
19 changes: 19 additions & 0 deletions docs/examples/databases/create-longtext-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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_key('<YOUR_API_KEY>') # Your secret API key

databases = Databases.new(client)

result = databases.create_longtext_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: '<DEFAULT>', # optional
array: false # optional
)
19 changes: 19 additions & 0 deletions docs/examples/databases/create-mediumtext-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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_key('<YOUR_API_KEY>') # Your secret API key

databases = Databases.new(client)

result = databases.create_mediumtext_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: '<DEFAULT>', # optional
array: false # optional
)
19 changes: 19 additions & 0 deletions docs/examples/databases/create-text-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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_key('<YOUR_API_KEY>') # Your secret API key

databases = Databases.new(client)

result = databases.create_text_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: '<DEFAULT>', # optional
array: false # optional
)
20 changes: 20 additions & 0 deletions docs/examples/databases/create-varchar-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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_key('<YOUR_API_KEY>') # Your secret API key

databases = Databases.new(client)

result = databases.create_varchar_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
size: 1,
required: false,
default: '<DEFAULT>', # optional
array: false # optional
)
2 changes: 1 addition & 1 deletion docs/examples/databases/update-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ databases = Databases.new(client)
result = databases.update_collection(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
name: '<NAME>',
name: '<NAME>', # optional
permissions: [Permission.read(Role.any())], # optional
document_security: false, # optional
enabled: false # optional
Expand Down
8 changes: 7 additions & 1 deletion docs/examples/databases/update-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ result = databases.update_document(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
document_id: '<DOCUMENT_ID>',
data: {}, # optional
data: {
"username" => "walter.obrien",
"email" => "walter.obrien@example.com",
"fullName" => "Walter O'Brien",
"age" => 33,
"isAdmin" => false
}, # optional
permissions: [Permission.read(Role.any())], # optional
transaction_id: '<TRANSACTION_ID>' # optional
)
8 changes: 7 additions & 1 deletion docs/examples/databases/update-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ databases = Databases.new(client)
result = databases.update_documents(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
data: {}, # optional
data: {
"username" => "walter.obrien",
"email" => "walter.obrien@example.com",
"fullName" => "Walter O'Brien",
"age" => 33,
"isAdmin" => false
}, # optional
queries: [], # optional
transaction_id: '<TRANSACTION_ID>' # optional
)
19 changes: 19 additions & 0 deletions docs/examples/databases/update-longtext-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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_key('<YOUR_API_KEY>') # Your secret API key

databases = Databases.new(client)

result = databases.update_longtext_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: '<DEFAULT>',
new_key: '' # optional
)
19 changes: 19 additions & 0 deletions docs/examples/databases/update-mediumtext-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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_key('<YOUR_API_KEY>') # Your secret API key

databases = Databases.new(client)

result = databases.update_mediumtext_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: '<DEFAULT>',
new_key: '' # optional
)
19 changes: 19 additions & 0 deletions docs/examples/databases/update-text-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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_key('<YOUR_API_KEY>') # Your secret API key

databases = Databases.new(client)

result = databases.update_text_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: '<DEFAULT>',
new_key: '' # optional
)
20 changes: 20 additions & 0 deletions docs/examples/databases/update-varchar-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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_key('<YOUR_API_KEY>') # Your secret API key

databases = Databases.new(client)

result = databases.update_varchar_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: '<DEFAULT>',
size: 1, # optional
new_key: '' # optional
)
2 changes: 1 addition & 1 deletion docs/examples/databases/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ databases = Databases.new(client)

result = databases.update(
database_id: '<DATABASE_ID>',
name: '<NAME>',
name: '<NAME>', # optional
enabled: false # optional
)
8 changes: 7 additions & 1 deletion docs/examples/databases/upsert-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ result = databases.upsert_document(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
document_id: '<DOCUMENT_ID>',
data: {},
data: {
"username" => "walter.obrien",
"email" => "walter.obrien@example.com",
"fullName" => "Walter O'Brien",
"age" => 30,
"isAdmin" => false
}, # optional
permissions: [Permission.read(Role.any())], # optional
transaction_id: '<TRANSACTION_ID>' # optional
)
2 changes: 1 addition & 1 deletion docs/examples/functions/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ result = functions.create(
logging: false, # optional
entrypoint: '<ENTRYPOINT>', # optional
commands: '<COMMANDS>', # optional
scopes: [], # optional
scopes: [Scopes::SESSIONS_WRITE], # optional
installation_id: '<INSTALLATION_ID>', # optional
provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional
provider_branch: '<PROVIDER_BRANCH>', # optional
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/functions/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ result = functions.update(
logging: false, # optional
entrypoint: '<ENTRYPOINT>', # optional
commands: '<COMMANDS>', # optional
scopes: [], # optional
scopes: [Scopes::SESSIONS_WRITE], # optional
installation_id: '<INSTALLATION_ID>', # optional
provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional
provider_branch: '<PROVIDER_BRANCH>', # optional
Expand Down
14 changes: 14 additions & 0 deletions docs/examples/health/get-queue-audits.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://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key

health = Health.new(client)

result = health.get_queue_audits(
threshold: null # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ result = tables_db.create_index(
key: '',
type: IndexType::KEY,
columns: [],
orders: [], # optional
orders: [OrderBy::ASC], # optional
lengths: [] # optional
)
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/create-longtext-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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_key('<YOUR_API_KEY>') # Your secret API key

tables_db = TablesDB.new(client)

result = tables_db.create_longtext_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: '<DEFAULT>', # optional
array: false # optional
)
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/create-mediumtext-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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_key('<YOUR_API_KEY>') # Your secret API key

tables_db = TablesDB.new(client)

result = tables_db.create_mediumtext_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: '<DEFAULT>', # optional
array: false # optional
)
Loading