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

## 24.1.0

* Added `size_actual` attribute to `File` model
* Added `DENO_1_21`, `DENO_1_24`, and `DENO_1_35` runtime constants
* Updated advisor examples to use API key authentication

## 24.0.0

* Breaking: Renamed `AuthMethod` enum to `ProjectAuthMethodId`
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 = '24.0.0'
spec.version = '24.1.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/advisor/get-insight.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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_session('') # The user session to authenticate with
.set_key('<YOUR_API_KEY>') # Your secret API key

advisor = Advisor.new(client)

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/advisor/get-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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_session('') # The user session to authenticate with
.set_key('<YOUR_API_KEY>') # Your secret API key

advisor = Advisor.new(client)

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/advisor/list-insights.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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_session('') # The user session to authenticate with
.set_key('<YOUR_API_KEY>') # Your secret API key

advisor = Advisor.new(client)

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/advisor/list-reports.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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_session('') # The user session to authenticate with
.set_key('<YOUR_API_KEY>') # Your secret API key

advisor = Advisor.new(client)

Expand Down
2 changes: 1 addition & 1 deletion lib/appwrite/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def initialize
'x-sdk-name'=> 'Ruby',
'x-sdk-platform'=> 'server',
'x-sdk-language'=> 'ruby',
'x-sdk-version'=> '24.0.0',
'x-sdk-version'=> '24.1.0',
'X-Appwrite-Response-Format' => '1.9.5'
}
@endpoint = 'https://cloud.appwrite.io/v1'
Expand Down
3 changes: 3 additions & 0 deletions lib/appwrite/enums/build_runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ module BuildRuntime
PYTHON_ML_3_11 = 'python-ml-3.11'
PYTHON_ML_3_12 = 'python-ml-3.12'
PYTHON_ML_3_13 = 'python-ml-3.13'
DENO_1_21 = 'deno-1.21'
DENO_1_24 = 'deno-1.24'
DENO_1_35 = 'deno-1.35'
DENO_1_40 = 'deno-1.40'
DENO_1_46 = 'deno-1.46'
DENO_2_0 = 'deno-2.0'
Expand Down
3 changes: 3 additions & 0 deletions lib/appwrite/enums/runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ module Runtime
PYTHON_ML_3_11 = 'python-ml-3.11'
PYTHON_ML_3_12 = 'python-ml-3.12'
PYTHON_ML_3_13 = 'python-ml-3.13'
DENO_1_21 = 'deno-1.21'
DENO_1_24 = 'deno-1.24'
DENO_1_35 = 'deno-1.35'
DENO_1_40 = 'deno-1.40'
DENO_1_46 = 'deno-1.46'
DENO_2_0 = 'deno-2.0'
Expand Down
16 changes: 8 additions & 8 deletions lib/appwrite/models/billing_limits.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ class BillingLimits
attr_reader :budget_limit

def initialize(
bandwidth:,
storage:,
users:,
executions:,
gb_hours:,
image_transformations:,
auth_phone:,
budget_limit:
bandwidth: ,
storage: ,
users: ,
executions: ,
gb_hours: ,
image_transformations: ,
auth_phone: ,
budget_limit:
)
Comment on lines 15 to 24
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Using keyword: , (trailing space before comma) is non-idiomatic Ruby for optional keyword arguments. The standard convention is keyword: nil, which is unambiguous across Ruby versions and makes the intent explicit.

Suggested change
def initialize(
bandwidth:,
storage:,
users:,
executions:,
gb_hours:,
image_transformations:,
auth_phone:,
budget_limit:
bandwidth: ,
storage: ,
users: ,
executions: ,
gb_hours: ,
image_transformations: ,
auth_phone: ,
budget_limit:
)
def initialize(
bandwidth: nil,
storage: nil,
users: nil,
executions: nil,
gb_hours: nil,
image_transformations: nil,
auth_phone: nil,
budget_limit: nil
)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@bandwidth = bandwidth
@storage = storage
Expand Down
5 changes: 5 additions & 0 deletions lib/appwrite/models/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class File
attr_reader :signature
attr_reader :mime_type
attr_reader :size_original
attr_reader :size_actual
attr_reader :chunks_total
attr_reader :chunks_uploaded
attr_reader :encryption
Expand All @@ -27,6 +28,7 @@ def initialize(
signature:,
mime_type:,
size_original:,
size_actual:,
chunks_total:,
chunks_uploaded:,
encryption:,
Expand All @@ -41,6 +43,7 @@ def initialize(
@signature = signature
@mime_type = mime_type
@size_original = size_original
@size_actual = size_actual
@chunks_total = chunks_total
@chunks_uploaded = chunks_uploaded
@encryption = encryption
Expand All @@ -58,6 +61,7 @@ def self.from(map:)
signature: map["signature"],
mime_type: map["mimeType"],
size_original: map["sizeOriginal"],
size_actual: map["sizeActual"],
chunks_total: map["chunksTotal"],
chunks_uploaded: map["chunksUploaded"],
encryption: map["encryption"],
Expand All @@ -76,6 +80,7 @@ def to_map
"signature": @signature,
"mimeType": @mime_type,
"sizeOriginal": @size_original,
"sizeActual": @size_actual,
"chunksTotal": @chunks_total,
"chunksUploaded": @chunks_uploaded,
"encryption": @encryption,
Expand Down
2 changes: 1 addition & 1 deletion lib/appwrite/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def initialize(
services:,
protocols:,
region:,
billing_limits:,
billing_limits: ,
blocks:,
console_accessed_at:
)
Expand Down