diff --git a/appwrite.gemspec b/appwrite.gemspec index 63d6aa4..b0c7dde 100644 --- a/appwrite.gemspec +++ b/appwrite.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'appwrite' - s.version = '2.1.2' + s.version = '2.2.0' s.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" s.author = 'Appwrite Team' s.homepage = 'https://appwrite.io/support' diff --git a/docs/examples/account/create-recovery.md b/docs/examples/account/create-recovery.md index 7d20fe2..91f929a 100644 --- a/docs/examples/account/create-recovery.md +++ b/docs/examples/account/create-recovery.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/create-verification.md b/docs/examples/account/create-verification.md index e0264f3..9ee79d6 100644 --- a/docs/examples/account/create-verification.md +++ b/docs/examples/account/create-verification.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/delete-session.md b/docs/examples/account/delete-session.md index 65f86ad..747fb27 100644 --- a/docs/examples/account/delete-session.md +++ b/docs/examples/account/delete-session.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/delete-sessions.md b/docs/examples/account/delete-sessions.md index 6162d87..b4f1654 100644 --- a/docs/examples/account/delete-sessions.md +++ b/docs/examples/account/delete-sessions.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/delete.md b/docs/examples/account/delete.md index 3194362..376c239 100644 --- a/docs/examples/account/delete.md +++ b/docs/examples/account/delete.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/get-logs.md b/docs/examples/account/get-logs.md index 286a0e0..41d5788 100644 --- a/docs/examples/account/get-logs.md +++ b/docs/examples/account/get-logs.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/get-prefs.md b/docs/examples/account/get-prefs.md index d63509e..7224ccf 100644 --- a/docs/examples/account/get-prefs.md +++ b/docs/examples/account/get-prefs.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/get-sessions.md b/docs/examples/account/get-sessions.md index 43af95b..0136b2a 100644 --- a/docs/examples/account/get-sessions.md +++ b/docs/examples/account/get-sessions.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/get.md b/docs/examples/account/get.md index 7169349..a58f284 100644 --- a/docs/examples/account/get.md +++ b/docs/examples/account/get.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/update-email.md b/docs/examples/account/update-email.md index a30c84b..d90047b 100644 --- a/docs/examples/account/update-email.md +++ b/docs/examples/account/update-email.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/update-name.md b/docs/examples/account/update-name.md index f9b0966..e7266ae 100644 --- a/docs/examples/account/update-name.md +++ b/docs/examples/account/update-name.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index 9cd7608..babedf5 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/update-prefs.md b/docs/examples/account/update-prefs.md index b1133dc..1a3e721 100644 --- a/docs/examples/account/update-prefs.md +++ b/docs/examples/account/update-prefs.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/update-recovery.md b/docs/examples/account/update-recovery.md index f402da9..c12c7da 100644 --- a/docs/examples/account/update-recovery.md +++ b/docs/examples/account/update-recovery.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/account/update-verification.md b/docs/examples/account/update-verification.md index 2504589..ffec506 100644 --- a/docs/examples/account/update-verification.md +++ b/docs/examples/account/update-verification.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; account = Appwrite::Account.new(client); diff --git a/docs/examples/avatars/get-q-r.md b/docs/examples/avatars/get-q-r.md index f145425..20c9bfd 100644 --- a/docs/examples/avatars/get-q-r.md +++ b/docs/examples/avatars/get-q-r.md @@ -10,6 +10,6 @@ client avatars = Appwrite::Avatars.new(client); -response = avatars.get_q_r(text: '[TEXT]'); +response = avatars.get_qr(text: '[TEXT]'); puts response \ No newline at end of file diff --git a/docs/examples/health/get-d-b.md b/docs/examples/health/get-d-b.md index 4bb0057..71a13ad 100644 --- a/docs/examples/health/get-d-b.md +++ b/docs/examples/health/get-d-b.md @@ -10,6 +10,6 @@ client health = Appwrite::Health.new(client); -response = health.get_d_b(); +response = health.get_db(); puts response \ No newline at end of file diff --git a/docs/examples/locale/get-countries-e-u.md b/docs/examples/locale/get-countries-e-u.md index b83125d..68e2667 100644 --- a/docs/examples/locale/get-countries-e-u.md +++ b/docs/examples/locale/get-countries-e-u.md @@ -10,6 +10,6 @@ client locale = Appwrite::Locale.new(client); -response = locale.get_countries_e_u(); +response = locale.get_countries_eu(); puts response \ No newline at end of file diff --git a/docs/examples/teams/update-membership-status.md b/docs/examples/teams/update-membership-status.md index ead789f..24a5554 100644 --- a/docs/examples/teams/update-membership-status.md +++ b/docs/examples/teams/update-membership-status.md @@ -5,7 +5,7 @@ client = Appwrite::Client.new() client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID - .set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token + .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token ; teams = Appwrite::Teams.new(client); diff --git a/lib/appwrite/client.rb b/lib/appwrite/client.rb index 88109b2..a85ca1a 100644 --- a/lib/appwrite/client.rb +++ b/lib/appwrite/client.rb @@ -20,7 +20,7 @@ def initialize() @headers = { 'content-type' => '', 'user-agent' => RUBY_PLATFORM + ':ruby-' + RUBY_VERSION, - 'x-sdk-version' => 'appwrite:ruby:2.1.2', + 'x-sdk-version' => 'appwrite:ruby:2.2.0', 'X-Appwrite-Response-Format' => '0.8.0' } @endpoint = 'https://appwrite.io/v1'; @@ -38,7 +38,7 @@ def set_key(value) return self end - def set_j_w_t(value) + def set_jwt(value) add_header('x-appwrite-jwt', value) return self diff --git a/lib/appwrite/services/avatars.rb b/lib/appwrite/services/avatars.rb index 1dd6cdc..793d338 100644 --- a/lib/appwrite/services/avatars.rb +++ b/lib/appwrite/services/avatars.rb @@ -156,7 +156,7 @@ def get_initials(name: nil, width: nil, height: nil, color: nil, background: nil }, params); end - def get_q_r(text:, size: nil, margin: nil, download: nil) + def get_qr(text:, size: nil, margin: nil, download: nil) if text.nil? raise Appwrite::Exception.new('Missing required parameter: "text"') end diff --git a/lib/appwrite/services/health.rb b/lib/appwrite/services/health.rb index 09438b1..3d30b17 100644 --- a/lib/appwrite/services/health.rb +++ b/lib/appwrite/services/health.rb @@ -31,7 +31,7 @@ def get_cache() }, params); end - def get_d_b() + def get_db() path = '/health/db' params = {} diff --git a/lib/appwrite/services/locale.rb b/lib/appwrite/services/locale.rb index e6aa736..7266938 100644 --- a/lib/appwrite/services/locale.rb +++ b/lib/appwrite/services/locale.rb @@ -31,7 +31,7 @@ def get_countries() }, params); end - def get_countries_e_u() + def get_countries_eu() path = '/locale/countries/eu' params = {}