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
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 = '18.0.0'
spec.version = '18.1.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
2 changes: 1 addition & 1 deletion docs/examples/databases/create-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ result = databases.create_line_attribute(
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] # optional
default: [[1, 2], [3, 4], [5, 6]] # optional
)
2 changes: 1 addition & 1 deletion docs/examples/databases/create-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ result = databases.create_point_attribute(
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] # optional
default: [1, 2] # optional
)
2 changes: 1 addition & 1 deletion docs/examples/databases/create-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ result = databases.create_polygon_attribute(
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] # optional
default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional
)
2 changes: 1 addition & 1 deletion docs/examples/databases/update-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ result = databases.update_line_attribute(
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], # optional
default: [[1, 2], [3, 4], [5, 6]], # optional
new_key: '' # optional
)
2 changes: 1 addition & 1 deletion docs/examples/databases/update-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ result = databases.update_point_attribute(
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], # optional
default: [1, 2], # optional
new_key: '' # optional
)
2 changes: 1 addition & 1 deletion docs/examples/databases/update-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ result = databases.update_polygon_attribute(
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], # optional
default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional
new_key: '' # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-line-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ result = tables_db.create_line_column(
table_id: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] # optional
default: [[1, 2], [3, 4], [5, 6]] # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-point-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ result = tables_db.create_point_column(
table_id: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] # optional
default: [1, 2] # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-polygon-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ result = tables_db.create_polygon_column(
table_id: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] # optional
default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/update-line-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ result = tables_db.update_line_column(
table_id: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], # optional
default: [[1, 2], [3, 4], [5, 6]], # optional
new_key: '' # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/update-point-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ result = tables_db.update_point_column(
table_id: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], # optional
default: [1, 2], # optional
new_key: '' # optional
)
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/update-polygon-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ result = tables_db.update_polygon_column(
table_id: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], # optional
default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional
new_key: '' # optional
)
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'=> '18.0.0',
'x-sdk-version'=> '18.1.0',
'X-Appwrite-Response-Format' => '1.8.0'
}
@endpoint = 'https://cloud.appwrite.io/v1'
Expand Down
10 changes: 5 additions & 5 deletions lib/appwrite/models/deployment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ class Deployment
attr_reader :provider_repository_name
attr_reader :provider_repository_owner
attr_reader :provider_repository_url
attr_reader :provider_branch
attr_reader :provider_commit_hash
attr_reader :provider_commit_author_url
attr_reader :provider_commit_author
attr_reader :provider_commit_message
attr_reader :provider_commit_url
attr_reader :provider_branch
attr_reader :provider_branch_url

def initialize(
Expand All @@ -52,12 +52,12 @@ def initialize(
provider_repository_name:,
provider_repository_owner:,
provider_repository_url:,
provider_branch:,
provider_commit_hash:,
provider_commit_author_url:,
provider_commit_author:,
provider_commit_message:,
provider_commit_url:,
provider_branch:,
provider_branch_url:
)
@id = id
Expand All @@ -80,12 +80,12 @@ def initialize(
@provider_repository_name = provider_repository_name
@provider_repository_owner = provider_repository_owner
@provider_repository_url = provider_repository_url
@provider_branch = provider_branch
@provider_commit_hash = provider_commit_hash
@provider_commit_author_url = provider_commit_author_url
@provider_commit_author = provider_commit_author
@provider_commit_message = provider_commit_message
@provider_commit_url = provider_commit_url
@provider_branch = provider_branch
@provider_branch_url = provider_branch_url
end

Expand All @@ -111,12 +111,12 @@ def self.from(map:)
provider_repository_name: map["providerRepositoryName"],
provider_repository_owner: map["providerRepositoryOwner"],
provider_repository_url: map["providerRepositoryUrl"],
provider_branch: map["providerBranch"],
provider_commit_hash: map["providerCommitHash"],
provider_commit_author_url: map["providerCommitAuthorUrl"],
provider_commit_author: map["providerCommitAuthor"],
provider_commit_message: map["providerCommitMessage"],
provider_commit_url: map["providerCommitUrl"],
provider_branch: map["providerBranch"],
provider_branch_url: map["providerBranchUrl"]
)
end
Expand All @@ -143,12 +143,12 @@ def to_map
"providerRepositoryName": @provider_repository_name,
"providerRepositoryOwner": @provider_repository_owner,
"providerRepositoryUrl": @provider_repository_url,
"providerBranch": @provider_branch,
"providerCommitHash": @provider_commit_hash,
"providerCommitAuthorUrl": @provider_commit_author_url,
"providerCommitAuthor": @provider_commit_author,
"providerCommitMessage": @provider_commit_message,
"providerCommitUrl": @provider_commit_url,
"providerBranch": @provider_branch,
"providerBranchUrl": @provider_branch_url
}
end
Expand Down
4 changes: 4 additions & 0 deletions lib/appwrite/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ def order_desc(attribute)
return Query.new("orderDesc", attribute, nil).to_s
end

def order_random()
return Query.new("orderRandom", nil, nil).to_s
end

def cursor_before(id)
return Query.new("cursorBefore", nil, id).to_s
end
Expand Down
2 changes: 1 addition & 1 deletion lib/appwrite/services/tables_db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,7 @@ def create_row(database_id:, table_id:, row_id:, data:, permissions: nil)
#
# @param [String] database_id Database ID.
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows.
# @param [Array] rows Array of documents data as JSON objects.
# @param [Array] rows Array of rows data as JSON objects.
#
# @return [RowList]
def create_rows(database_id:, table_id:, rows:)
Expand Down