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
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Change Log

## 23.0.0

* [BREAKING] Renamed Webhook model fields: `security` → `tls`, `httpUser` → `authUsername`, `httpPass` → `authPassword`, `signatureKey` → `secret`
* [BREAKING] Renamed Webhook service parameters to match: `security` → `tls`, `httpUser` → `authUsername`, `httpPass` → `authPassword`
* [BREAKING] Renamed `Webhooks#update_signature` to `Webhooks#update_secret` with new optional `secret` parameter
* Added `Client#get_headers` method to retrieve request headers
* Added `secret` parameter to Webhook create and update methods
* Added `x` OAuth provider to `OAuthProvider` enum
* Added `userType` field to `Log` model
* Added `purge` parameter to `update_collection` and `update_table` for cache invalidation
* Added Project service: platform CRUD, key CRUD, protocol/service status management
* Added new models: `Key`, `KeyList`, `Project`, `DevKey`, `MockNumber`, `AuthProvider`, `PlatformAndroid`, `PlatformApple`, `PlatformLinux`, `PlatformList`, `PlatformWeb`, `PlatformWindows`, `BillingLimits`, `Block`
* Added new enums: `PlatformType`, `ProtocolId`, `ServiceId`
* Updated `BuildRuntime`, `Runtime` enums with `dart-3.11` and `flutter-3.41`
* Updated `Scopes` enum with `keys_read`, `keys_write`, `platforms_read`, `platforms_write`
* Updated `X-Appwrite-Response-Format` header to `1.9.1`
* Updated TTL description for list caching in Databases and TablesDB

## 22.0.0

* [BREAKING] Changed `$sequence` type from `int` to `string` for rows and documents
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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.9.0-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.9.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)
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 = '22.0.0'
spec.version = '23.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
2 changes: 1 addition & 1 deletion docs/examples/databases/create-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ result = databases.create_datetime_attribute(
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: '', # optional
default: '2020-10-15T06:38:00.000+00:00', # optional
array: false # optional
)
```
3 changes: 2 additions & 1 deletion docs/examples/databases/update-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ result = databases.update_collection(
name: '<NAME>', # optional
permissions: [Permission.read(Role.any())], # optional
document_security: false, # optional
enabled: false # optional
enabled: false, # optional
purge: false # optional
)
```
2 changes: 1 addition & 1 deletion docs/examples/databases/update-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ result = databases.update_datetime_attribute(
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: '',
default: '2020-10-15T06:38:00.000+00:00',
new_key: '' # optional
)
```
2 changes: 1 addition & 1 deletion docs/examples/messaging/create-email.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ result = messaging.create_email(
attachments: [], # optional
draft: false, # optional
html: false, # optional
scheduled_at: '' # optional
scheduled_at: '2020-10-15T06:38:00.000+00:00' # optional
)
```
2 changes: 1 addition & 1 deletion docs/examples/messaging/create-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ result = messaging.create_push(
tag: '<TAG>', # optional
badge: null, # optional
draft: false, # optional
scheduled_at: '', # optional
scheduled_at: '2020-10-15T06:38:00.000+00:00', # optional
content_available: false, # optional
critical: false, # optional
priority: MessagePriority::NORMAL # optional
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/messaging/create-sms.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ result = messaging.create_sms(
users: [], # optional
targets: [], # optional
draft: false, # optional
scheduled_at: '' # optional
scheduled_at: '2020-10-15T06:38:00.000+00:00' # optional
)
```
2 changes: 1 addition & 1 deletion docs/examples/messaging/update-email.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ result = messaging.update_email(
html: false, # optional
cc: [], # optional
bcc: [], # optional
scheduled_at: '', # optional
scheduled_at: '2020-10-15T06:38:00.000+00:00', # optional
attachments: [] # optional
)
```
2 changes: 1 addition & 1 deletion docs/examples/messaging/update-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ result = messaging.update_push(
tag: '<TAG>', # optional
badge: null, # optional
draft: false, # optional
scheduled_at: '', # optional
scheduled_at: '2020-10-15T06:38:00.000+00:00', # optional
content_available: false, # optional
critical: false, # optional
priority: MessagePriority::NORMAL # optional
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/messaging/update-sms.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ result = messaging.update_sms(
targets: [], # optional
content: '<CONTENT>', # optional
draft: false, # optional
scheduled_at: '' # optional
scheduled_at: '2020-10-15T06:38:00.000+00:00' # optional
)
```
18 changes: 18 additions & 0 deletions docs/examples/project/create-android-platform.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.create_android_platform(
platform_id: '<PLATFORM_ID>',
name: '<NAME>',
application_id: '<APPLICATION_ID>'
)
```
18 changes: 18 additions & 0 deletions docs/examples/project/create-apple-platform.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.create_apple_platform(
platform_id: '<PLATFORM_ID>',
name: '<NAME>',
bundle_identifier: '<BUNDLE_IDENTIFIER>'
)
```
20 changes: 20 additions & 0 deletions docs/examples/project/create-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
```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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.create_key(
key_id: '<KEY_ID>',
name: '<NAME>',
scopes: [Scopes::SESSIONS_WRITE],
expire: '2020-10-15T06:38:00.000+00:00' # optional
)
```
18 changes: 18 additions & 0 deletions docs/examples/project/create-linux-platform.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.create_linux_platform(
platform_id: '<PLATFORM_ID>',
name: '<NAME>',
package_name: '<PACKAGE_NAME>'
)
```
18 changes: 18 additions & 0 deletions docs/examples/project/create-web-platform.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.create_web_platform(
platform_id: '<PLATFORM_ID>',
name: '<NAME>',
hostname: 'app.example.com'
)
```
18 changes: 18 additions & 0 deletions docs/examples/project/create-windows-platform.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.create_windows_platform(
platform_id: '<PLATFORM_ID>',
name: '<NAME>',
package_identifier_name: '<PACKAGE_IDENTIFIER_NAME>'
)
```
16 changes: 16 additions & 0 deletions docs/examples/project/delete-key.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.delete_key(
key_id: '<KEY_ID>'
)
```
16 changes: 16 additions & 0 deletions docs/examples/project/delete-platform.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.delete_platform(
platform_id: '<PLATFORM_ID>'
)
```
16 changes: 16 additions & 0 deletions docs/examples/project/get-key.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.get_key(
key_id: '<KEY_ID>'
)
```
16 changes: 16 additions & 0 deletions docs/examples/project/get-platform.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.get_platform(
platform_id: '<PLATFORM_ID>'
)
```
17 changes: 17 additions & 0 deletions docs/examples/project/list-keys.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.list_keys(
queries: [], # optional
total: false # optional
)
```
17 changes: 17 additions & 0 deletions docs/examples/project/list-platforms.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.list_platforms(
queries: [], # optional
total: false # optional
)
```
18 changes: 18 additions & 0 deletions docs/examples/project/update-android-platform.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.update_android_platform(
platform_id: '<PLATFORM_ID>',
name: '<NAME>',
application_id: '<APPLICATION_ID>'
)
```
18 changes: 18 additions & 0 deletions docs/examples/project/update-apple-platform.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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.update_apple_platform(
platform_id: '<PLATFORM_ID>',
name: '<NAME>',
bundle_identifier: '<BUNDLE_IDENTIFIER>'
)
```
20 changes: 20 additions & 0 deletions docs/examples/project/update-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
```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_key('<YOUR_API_KEY>') # Your secret API key

project = Project.new(client)

result = project.update_key(
key_id: '<KEY_ID>',
name: '<NAME>',
scopes: [Scopes::SESSIONS_WRITE],
expire: '2020-10-15T06:38:00.000+00:00' # optional
)
```
Loading