Skip to content

Commit b8898ca

Browse files
authored
Merge pull request #40 from appwrite/dev
Add inc/dec
2 parents 41e8f13 + ca3bdd0 commit b8898ca

18 files changed

+294
-13
lines changed

CHANGELOG.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,30 @@
1-
# Change Log
1+
# Change Log
2+
3+
## 16.1.0
4+
5+
* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service
6+
* Add `dart38` and `flutter332` support to runtime models
7+
* Add `gif` support to `ImageFormat` enum
8+
* Add `encrypt` support to `StringAttribute` model
9+
* Add `sequence` support to `Document` model
10+
* Add `upsertDocument` support to `Databases` service
11+
12+
## 16.0.0
13+
14+
* Add `<REGION>` to doc examples due to the new multi region endpoints
15+
* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc.
16+
* Add doc examples, class and methods for new `Sites` service
17+
* Add doc examples, class and methods for new `Tokens` service
18+
* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType`
19+
* Update enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329
20+
* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage
21+
* Add `queries` and `search` params to `listMemberships` method
22+
* Remove `search` param from `listExecutions` method
23+
24+
## 15.0.0
25+
26+
* Fix requests failing by removing `Content-Type` header from `GET` and `HEAD` requests
27+
28+
## 14.0.0
29+
30+
* Fix pong response & chunked upload

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite Ruby SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.7.0-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

appwrite.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Gem::Specification.new do |spec|
22

33
spec.name = 'appwrite'
4-
spec.version = '16.0.0'
4+
spec.version = '16.1.0'
55
spec.license = 'BSD-3-Clause'
66
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'
77
spec.author = 'Appwrite Team'

docs/examples/databases/create-document.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ include Appwrite
44

55
client = Client.new
66
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('<YOUR_PROJECT_ID>') # Your project ID
78
.set_session('') # The user session to authenticate with
8-
.set_key('<YOUR_API_KEY>') # Your secret API key
9-
.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token
109

1110
databases = Databases.new(client)
1211

docs/examples/databases/create-documents.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ include Appwrite
44

55
client = Client.new
66
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('<YOUR_PROJECT_ID>') # Your project ID
78
.set_key('<YOUR_API_KEY>') # Your secret API key
89

910
databases = Databases.new(client)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require 'appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('<YOUR_PROJECT_ID>') # Your project ID
8+
.set_key('<YOUR_API_KEY>') # Your secret API key
9+
10+
databases = Databases.new(client)
11+
12+
result = databases.decrement_document_attribute(
13+
database_id: '<DATABASE_ID>',
14+
collection_id: '<COLLECTION_ID>',
15+
document_id: '<DOCUMENT_ID>',
16+
attribute: '',
17+
value: null, # optional
18+
min: null # optional
19+
)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require 'appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('<YOUR_PROJECT_ID>') # Your project ID
8+
.set_key('<YOUR_API_KEY>') # Your secret API key
9+
10+
databases = Databases.new(client)
11+
12+
result = databases.increment_document_attribute(
13+
database_id: '<DATABASE_ID>',
14+
collection_id: '<COLLECTION_ID>',
15+
document_id: '<DOCUMENT_ID>',
16+
attribute: '',
17+
value: null, # optional
18+
max: null # optional
19+
)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
require 'appwrite'
2+
3+
include Appwrite
4+
5+
client = Client.new
6+
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_project('<YOUR_PROJECT_ID>') # Your project ID
8+
.set_session('') # The user session to authenticate with
9+
10+
databases = Databases.new(client)
11+
12+
result = databases.upsert_document(
13+
database_id: '<DATABASE_ID>',
14+
collection_id: '<COLLECTION_ID>',
15+
document_id: '<DOCUMENT_ID>',
16+
data: {},
17+
permissions: ["read("any")"] # optional
18+
)

docs/examples/databases/upsert-documents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ databases = Databases.new(client)
1212
result = databases.upsert_documents(
1313
database_id: '<DATABASE_ID>',
1414
collection_id: '<COLLECTION_ID>',
15-
documents: [] # optional
15+
documents: []
1616
)

lib/appwrite/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def initialize
1515
'x-sdk-name'=> 'Ruby',
1616
'x-sdk-platform'=> 'server',
1717
'x-sdk-language'=> 'ruby',
18-
'x-sdk-version'=> '16.0.0',
18+
'x-sdk-version'=> '16.1.0',
1919
'X-Appwrite-Response-Format' => '1.7.0'
2020
}
2121
@endpoint = 'https://cloud.appwrite.io/v1'

0 commit comments

Comments
 (0)