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
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-1.7.4-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.8.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.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-ruby/releases).**
**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)

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 = '16.1.0'
spec.version = '17.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
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/examples/databases/decrement-document-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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
.set_session('') # The user session to authenticate with

databases = Databases.new(client)

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/increment-document-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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
.set_session('') # The user session to authenticate with

databases = Databases.new(client)

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/functions/create-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ result = functions.create_execution(
path: '<PATH>', # optional
method: ExecutionMethod::GET, # optional
headers: {}, # optional
scheduled_at: '' # optional
scheduled_at: '<SCHEDULED_AT>' # optional
)
File renamed without changes.
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/create-boolean-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_boolean_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: false, # optional
array: false # optional
)
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/create-datetime-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_datetime_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: '', # optional
array: false # optional
)
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/create-email-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_email_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: '[email protected]', # optional
array: false # optional
)
20 changes: 20 additions & 0 deletions docs/examples/tablesdb/create-enum-column.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

tables_db = TablesDB.new(client)

result = tables_db.create_enum_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
elements: [],
required: false,
default: '<DEFAULT>', # optional
array: false # optional
)
21 changes: 21 additions & 0 deletions docs/examples/tablesdb/create-float-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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_float_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
min: null, # optional
max: null, # optional
default: null, # optional
array: false # optional
)
21 changes: 21 additions & 0 deletions docs/examples/tablesdb/create-index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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_key('<YOUR_API_KEY>') # Your secret API key

tables_db = TablesDB.new(client)

result = tables_db.create_index(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
type: IndexType::KEY,
columns: [],
orders: [], # optional
lengths: [] # optional
)
21 changes: 21 additions & 0 deletions docs/examples/tablesdb/create-integer-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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_integer_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
min: null, # optional
max: null, # optional
default: null, # optional
array: false # optional
)
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/create-ip-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_ip_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: '', # optional
array: false # optional
)
22 changes: 22 additions & 0 deletions docs/examples/tablesdb/create-relationship-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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_key('<YOUR_API_KEY>') # Your secret API key

tables_db = TablesDB.new(client)

result = tables_db.create_relationship_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
related_table_id: '<RELATED_TABLE_ID>',
type: RelationshipType::ONETOONE,
two_way: false, # optional
key: '', # optional
two_way_key: '', # optional
on_delete: RelationMutate::CASCADE # optional
)
18 changes: 18 additions & 0 deletions docs/examples/tablesdb/create-row.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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

tables_db = TablesDB.new(client)

result = tables_db.create_row(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
row_id: '<ROW_ID>',
data: {},
permissions: ["read("any")"] # optional
)
16 changes: 16 additions & 0 deletions docs/examples/tablesdb/create-rows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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_rows(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
rows: []
)
21 changes: 21 additions & 0 deletions docs/examples/tablesdb/create-string-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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_string_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
size: 1,
required: false,
default: '<DEFAULT>', # optional
array: false, # optional
encrypt: false # optional
)
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/create-table.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_table(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
name: '<NAME>',
permissions: ["read("any")"], # optional
row_security: false, # optional
enabled: false # optional
)
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/create-url-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_url_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: 'https://example.com', # optional
array: false # optional
)
16 changes: 16 additions & 0 deletions docs/examples/tablesdb/create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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(
database_id: '<DATABASE_ID>',
name: '<NAME>',
enabled: false # optional
)
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/decrement-row-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_session('') # The user session to authenticate with

tables_db = TablesDB.new(client)

result = tables_db.decrement_row_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
row_id: '<ROW_ID>',
column: '',
value: null, # optional
min: null # optional
)
16 changes: 16 additions & 0 deletions docs/examples/tablesdb/delete-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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.delete_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: ''
)
Loading