Skip to content

Commit db9ee84

Browse files
authored
Merge pull request #24 from appwrite/dev
fix: minor bugs
2 parents 11b3b91 + 41b53b2 commit db9ee84

File tree

13 files changed

+36
-22
lines changed

13 files changed

+36
-22
lines changed

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.5.4-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.5.6-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 = '11.0.1'
4+
spec.version = '11.0.2'
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/messaging/update-email.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ result = messaging.update_email(
2020
html: false, # optional
2121
cc: [], # optional
2222
bcc: [], # optional
23-
scheduled_at: '' # optional
23+
scheduled_at: '', # optional
24+
attachments: [] # optional
2425
)

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'=> '11.0.1',
18+
'x-sdk-version'=> '11.0.2',
1919
'X-Appwrite-Response-Format' => '1.5.0'
2020
}
2121
@endpoint = 'https://cloud.appwrite.io/v1'

lib/appwrite/enums/credit_card.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module CreditCard
44
AMERICAN_EXPRESS = 'amex'
55
ARGENCARD = 'argencard'
66
CABAL = 'cabal'
7-
CONSOSUD = 'censosud'
7+
CENCOSUD = 'cencosud'
88
DINERS_CLUB = 'diners'
99
DISCOVER = 'discover'
1010
ELO = 'elo'

lib/appwrite/enums/flag.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ module Flag
142142
PALAU = 'pw'
143143
PAPUA_NEW_GUINEA = 'pg'
144144
POLAND = 'pl'
145+
FRENCH_POLYNESIA = 'pf'
145146
NORTH_KOREA = 'kp'
146147
PORTUGAL = 'pt'
147148
PARAGUAY = 'py'

lib/appwrite/enums/runtime.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module Runtime
2020
PYTHON_3_10 = 'python-3.10'
2121
PYTHON_3_11 = 'python-3.11'
2222
PYTHON_3_12 = 'python-3.12'
23+
PYTHON_ML_3_11 = 'python-ml-3.11'
2324
DENO_1_40 = 'deno-1.40'
2425
DART_2_15 = 'dart-2.15'
2526
DART_2_16 = 'dart-2.16'

lib/appwrite/models/mfa_factors.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,35 @@ class MfaFactors
66
attr_reader :totp
77
attr_reader :phone
88
attr_reader :email
9+
attr_reader :recovery_code
910

1011
def initialize(
1112
totp:,
1213
phone:,
13-
email:
14+
email:,
15+
recovery_code:
1416
)
1517
@totp = totp
1618
@phone = phone
1719
@email = email
20+
@recovery_code = recovery_code
1821
end
1922

2023
def self.from(map:)
2124
MfaFactors.new(
2225
totp: map["totp"],
2326
phone: map["phone"],
24-
email: map["email"]
27+
email: map["email"],
28+
recovery_code: map["recoveryCode"]
2529
)
2630
end
2731

2832
def to_map
2933
{
3034
"totp": @totp,
3135
"phone": @phone,
32-
"email": @email
36+
"email": @email,
37+
"recoveryCode": @recovery_code
3338
}
3439
end
3540
end

lib/appwrite/models/session.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module Models
55
class Session
66
attr_reader :id
77
attr_reader :created_at
8+
attr_reader :updated_at
89
attr_reader :user_id
910
attr_reader :expire
1011
attr_reader :provider
@@ -35,6 +36,7 @@ class Session
3536
def initialize(
3637
id:,
3738
created_at:,
39+
updated_at:,
3840
user_id:,
3941
expire:,
4042
provider:,
@@ -64,6 +66,7 @@ def initialize(
6466
)
6567
@id = id
6668
@created_at = created_at
69+
@updated_at = updated_at
6770
@user_id = user_id
6871
@expire = expire
6972
@provider = provider
@@ -96,6 +99,7 @@ def self.from(map:)
9699
Session.new(
97100
id: map["$id"],
98101
created_at: map["$createdAt"],
102+
updated_at: map["$updatedAt"],
99103
user_id: map["userId"],
100104
expire: map["expire"],
101105
provider: map["provider"],
@@ -129,6 +133,7 @@ def to_map
129133
{
130134
"$id": @id,
131135
"$createdAt": @created_at,
136+
"$updatedAt": @updated_at,
132137
"userId": @user_id,
133138
"expire": @expire,
134139
"provider": @provider,

lib/appwrite/services/account.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def update_mfa(mfa:)
266266

267267
# Add an authenticator app to be used as an MFA factor. Verify the
268268
# authenticator using the [verify
269-
# authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
269+
# authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator)
270270
# method.
271271
#
272272
# @param [AuthenticatorType] type Type of authenticator. Must be `totp`
@@ -298,8 +298,8 @@ def create_mfa_authenticator(type:)
298298

299299

300300
# Verify an authenticator app after adding it using the [add
301-
# authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
302-
# method.
301+
# authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator)
302+
# method. add
303303
#
304304
# @param [AuthenticatorType] type Type of authenticator.
305305
# @param [String] otp Valid verification token.
@@ -340,7 +340,7 @@ def update_mfa_authenticator(type:, otp:)
340340
# @param [AuthenticatorType] type Type of authenticator.
341341
# @param [String] otp Valid verification token.
342342
#
343-
# @return [User]
343+
# @return []
344344
def delete_mfa_authenticator(type:, otp:)
345345
api_path = '/account/mfa/authenticators/{type}'
346346
.gsub('{type}', type)
@@ -366,7 +366,6 @@ def delete_mfa_authenticator(type:, otp:)
366366
path: api_path,
367367
headers: api_headers,
368368
params: api_params,
369-
response_type: Models::User
370369
)
371370
end
372371

0 commit comments

Comments
 (0)