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 = '17.0.0'
spec.version = '18.0.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
6 changes: 5 additions & 1 deletion docs/examples/account/update-prefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ client = Client.new
account = Account.new(client)

result = account.update_prefs(
prefs: {}
prefs: {
"language" => "en",
"timezone" => "UTC",
"darkTheme" => true
}
)
8 changes: 7 additions & 1 deletion docs/examples/databases/create-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ result = databases.create_document(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
document_id: '<DOCUMENT_ID>',
data: {},
data: {
"username" => "walter.obrien",
"email" => "[email protected]",
"fullName" => "Walter O'Brien",
"age" => 30,
"isAdmin" => false
},
permissions: ["read("any")"] # optional
)
18 changes: 18 additions & 0 deletions docs/examples/databases/create-line-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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

databases = Databases.new(client)

result = databases.create_line_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] # optional
)
18 changes: 18 additions & 0 deletions docs/examples/databases/create-point-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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

databases = Databases.new(client)

result = databases.create_point_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] # optional
)
18 changes: 18 additions & 0 deletions docs/examples/databases/create-polygon-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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

databases = Databases.new(client)

result = databases.create_polygon_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] # optional
)
19 changes: 19 additions & 0 deletions docs/examples/databases/update-line-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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

databases = Databases.new(client)

result = databases.update_line_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], # optional
new_key: '' # optional
)
19 changes: 19 additions & 0 deletions docs/examples/databases/update-point-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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

databases = Databases.new(client)

result = databases.update_point_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], # optional
new_key: '' # optional
)
19 changes: 19 additions & 0 deletions docs/examples/databases/update-polygon-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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

databases = Databases.new(client)

result = databases.update_polygon_attribute(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], # optional
new_key: '' # optional
)
18 changes: 18 additions & 0 deletions docs/examples/tablesdb/create-line-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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

tables_db = TablesDB.new(client)

result = tables_db.create_line_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] # optional
)
18 changes: 18 additions & 0 deletions docs/examples/tablesdb/create-point-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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

tables_db = TablesDB.new(client)

result = tables_db.create_point_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] # optional
)
18 changes: 18 additions & 0 deletions docs/examples/tablesdb/create-polygon-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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

tables_db = TablesDB.new(client)

result = tables_db.create_polygon_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] # optional
)
8 changes: 7 additions & 1 deletion docs/examples/tablesdb/create-row.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ result = tables_db.create_row(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
row_id: '<ROW_ID>',
data: {},
data: {
"username" => "walter.obrien",
"email" => "[email protected]",
"fullName" => "Walter O'Brien",
"age" => 30,
"isAdmin" => false
},
permissions: ["read("any")"] # optional
)
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/update-line-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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

tables_db = TablesDB.new(client)

result = tables_db.update_line_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], # optional
new_key: '' # optional
)
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/update-point-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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

tables_db = TablesDB.new(client)

result = tables_db.update_point_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], # optional
new_key: '' # optional
)
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/update-polygon-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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

tables_db = TablesDB.new(client)

result = tables_db.update_polygon_column(
database_id: '<DATABASE_ID>',
table_id: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], # optional
new_key: '' # optional
)
6 changes: 6 additions & 0 deletions lib/appwrite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
require_relative 'appwrite/models/attribute_url'
require_relative 'appwrite/models/attribute_datetime'
require_relative 'appwrite/models/attribute_relationship'
require_relative 'appwrite/models/attribute_point'
require_relative 'appwrite/models/attribute_line'
require_relative 'appwrite/models/attribute_polygon'
require_relative 'appwrite/models/table'
require_relative 'appwrite/models/column_list'
require_relative 'appwrite/models/column_string'
Expand All @@ -72,6 +75,9 @@
require_relative 'appwrite/models/column_url'
require_relative 'appwrite/models/column_datetime'
require_relative 'appwrite/models/column_relationship'
require_relative 'appwrite/models/column_point'
require_relative 'appwrite/models/column_line'
require_relative 'appwrite/models/column_polygon'
require_relative 'appwrite/models/index'
require_relative 'appwrite/models/column_index'
require_relative 'appwrite/models/row'
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'=> '17.0.0',
'x-sdk-version'=> '18.0.0',
'X-Appwrite-Response-Format' => '1.8.0'
}
@endpoint = 'https://cloud.appwrite.io/v1'
Expand Down
2 changes: 1 addition & 1 deletion lib/appwrite/enums/credit_card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module CreditCard
MASTERCARD = 'mastercard'
NARANJA = 'naranja'
TARJETA_SHOPPING = 'targeta-shopping'
UNION_CHINA_PAY = 'union-china-pay'
UNION_PAY = 'unionpay'
VISA = 'visa'
MIR = 'mir'
MAESTRO = 'maestro'
Expand Down
1 change: 1 addition & 0 deletions lib/appwrite/enums/execution_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module ExecutionMethod
PATCH = 'PATCH'
DELETE = 'DELETE'
OPTIONS = 'OPTIONS'
HEAD = 'HEAD'
end
end
end
1 change: 1 addition & 0 deletions lib/appwrite/enums/index_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module IndexType
KEY = 'key'
FULLTEXT = 'fulltext'
UNIQUE = 'unique'
SPATIAL = 'spatial'
end
end
end
Loading