File tree Expand file tree Collapse file tree 18 files changed +370
-30
lines changed
Expand file tree Collapse file tree 18 files changed +370
-30
lines changed Original file line number Diff line number Diff line change 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.5.7 -blue.svg?style=flat-square )
4+ ![ Version] ( https://img.shields.io/badge/api%20version-1.6.0 -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 )
Original file line number Diff line number Diff line change 11Gem ::Specification . new do |spec |
22
33 spec . name = 'appwrite'
4- spec . version = '11 .0.2 '
4+ spec . version = '12 .0.0-rc.1 '
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'
88 spec . homepage = 'https://appwrite.io/support'
9- spec . email = 'team@appwrite.io '
9+ spec . email = 'team@localhost.test '
1010 spec . files = Dir [ 'lib/**/*.rb' ]
1111
1212 spec . add_dependency 'mime-types' , '~> 3.4.1'
Original file line number Diff line number Diff line change @@ -11,6 +11,5 @@ client = Client.new
1111account = Account.new(client)
1212
1313result = account.delete_mfa_authenticator(
14- type: AuthenticatorType::TOTP,
15- otp: '<OTP >'
14+ type: AuthenticatorType::TOTP
1615)
Original file line number Diff line number Diff line change @@ -31,5 +31,5 @@ result = functions.create(
3131 template_repository: '<TEMPLATE_REPOSITORY>', # optional
3232 template_owner: '<TEMPLATE_OWNER>', # optional
3333 template_root_directory: '<TEMPLATE_ROOT_DIRECTORY>', # optional
34- template_branch : '<TEMPLATE_BRANCH >' # optional
34+ template_version : '<TEMPLATE_VERSION >' # optional
3535)
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ include Appwrite
55client = Client.new
66 .set_endpoint('https://cloud.appwrite.io/v1 ') # Your API Endpoint
77 .set_project('< ; YOUR_PROJECT_ID> ; ') # Your project ID
8- .set_key(' & lt ; YOUR_API_KEY & gt ; ') # Your secret API key
8+ .set_session(' ') # The user session to authenticate with
99
1010functions = Functions.new(client)
1111
12- result = functions.download_deployment (
12+ result = functions.get_deployment_download (
1313 function_id: '<FUNCTION_ID>',
1414 deployment_id: '<DEPLOYMENT_ID>'
1515)
Original file line number Diff line number Diff line change 1+ require 'appwrite'
2+
3+ include Appwrite
4+
5+ client = Client.new
6+ .set_endpoint('https://cloud.appwrite.io/v1 ') # Your API Endpoint
7+ .set_project('< ; YOUR_PROJECT_ID> ; ') # Your project ID
8+
9+ functions = Functions.new(client)
10+
11+ result = functions.get_template(
12+ template_id: '<TEMPLATE_ID>'
13+ )
Original file line number Diff line number Diff line change 1+ require 'appwrite'
2+
3+ include Appwrite
4+
5+ client = Client.new
6+ .set_endpoint('https://cloud.appwrite.io/v1 ') # Your API Endpoint
7+ .set_project('< ; YOUR_PROJECT_ID> ; ') # Your project ID
8+
9+ functions = Functions.new(client)
10+
11+ result = functions.list_templates(
12+ runtimes: [ ] , # optional
13+ use_cases: [ ] , # optional
14+ limit: 1, # optional
15+ offset: 0 # optional
16+ )
Original file line number Diff line number Diff line change 2525require_relative 'appwrite/models/team_list'
2626require_relative 'appwrite/models/membership_list'
2727require_relative 'appwrite/models/function_list'
28+ require_relative 'appwrite/models/template_function_list'
2829require_relative 'appwrite/models/runtime_list'
2930require_relative 'appwrite/models/deployment_list'
3031require_relative 'appwrite/models/execution_list'
7677require_relative 'appwrite/models/team'
7778require_relative 'appwrite/models/membership'
7879require_relative 'appwrite/models/function'
80+ require_relative 'appwrite/models/template_function'
81+ require_relative 'appwrite/models/template_runtime'
82+ require_relative 'appwrite/models/template_variable'
7983require_relative 'appwrite/models/runtime'
8084require_relative 'appwrite/models/deployment'
8185require_relative 'appwrite/models/execution'
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ def initialize
1515 'x-sdk-name' => 'Ruby' ,
1616 'x-sdk-platform' => 'server' ,
1717 'x-sdk-language' => 'ruby' ,
18- 'x-sdk-version' => '11 .0.2 ' ,
19- 'X-Appwrite-Response-Format' => '1.5 .0'
18+ 'x-sdk-version' => '12 .0.0-rc.1 ' ,
19+ 'X-Appwrite-Response-Format' => '1.6 .0'
2020 }
2121 @endpoint = 'https://cloud.appwrite.io/v1'
2222 end
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ class Execution
1919 attr_reader :logs
2020 attr_reader :errors
2121 attr_reader :duration
22+ attr_reader :scheduled_at
2223
2324 def initialize (
2425 id :,
@@ -36,7 +37,8 @@ def initialize(
3637 response_headers :,
3738 logs :,
3839 errors :,
39- duration :
40+ duration :,
41+ scheduled_at :
4042 )
4143 @id = id
4244 @created_at = created_at
@@ -54,6 +56,7 @@ def initialize(
5456 @logs = logs
5557 @errors = errors
5658 @duration = duration
59+ @scheduled_at = scheduled_at
5760 end
5861
5962 def self . from ( map :)
@@ -73,7 +76,8 @@ def self.from(map:)
7376 response_headers : map [ "responseHeaders" ] . map { |it | Headers . from ( map : it ) } ,
7477 logs : map [ "logs" ] ,
7578 errors : map [ "errors" ] ,
76- duration : map [ "duration" ]
79+ duration : map [ "duration" ] ,
80+ scheduled_at : map [ "scheduledAt" ]
7781 )
7882 end
7983
@@ -94,7 +98,8 @@ def to_map
9498 "responseHeaders" : @response_headers . map { |it | it . to_map } ,
9599 "logs" : @logs ,
96100 "errors" : @errors ,
97- "duration" : @duration
101+ "duration" : @duration ,
102+ "scheduledAt" : @scheduled_at
98103 }
99104 end
100105 end
You can’t perform that action at this time.
0 commit comments