Skip to content

Commit d95e204

Browse files
committed
Add inc/dec
1 parent 6661d6f commit d95e204

16 files changed

Lines changed: 263 additions & 11 deletions

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 & 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_admin('') #
78
.set_session('') # The user session to authenticate with
89
.set_key('<YOUR_API_KEY>') # Your secret API key
910
.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token
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'

lib/appwrite/enums/build_runtime.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module BuildRuntime
3838
DART_3_1 = 'dart-3.1'
3939
DART_3_3 = 'dart-3.3'
4040
DART_3_5 = 'dart-3.5'
41+
DART_3_8 = 'dart-3.8'
4142
DOTNET_6_0 = 'dotnet-6.0'
4243
DOTNET_7_0 = 'dotnet-7.0'
4344
DOTNET_8_0 = 'dotnet-8.0'
@@ -64,6 +65,7 @@ module BuildRuntime
6465
FLUTTER_3_24 = 'flutter-3.24'
6566
FLUTTER_3_27 = 'flutter-3.27'
6667
FLUTTER_3_29 = 'flutter-3.29'
68+
FLUTTER_3_32 = 'flutter-3.32'
6769
end
6870
end
6971
end

lib/appwrite/enums/image_format.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module ImageFormat
77
WEBP = 'webp'
88
HEIC = 'heic'
99
AVIF = 'avif'
10+
GIF = 'gif'
1011
end
1112
end
1213
end

0 commit comments

Comments
 (0)