diff --git a/app/sdks/dart/.packages b/app/sdks/dart/.packages index a76545524d..d00e734676 100644 --- a/app/sdks/dart/.packages +++ b/app/sdks/dart/.packages @@ -1,4 +1,4 @@ -# Generated by pub on 2019-10-18 21:11:54.500301. +# Generated by pub on 2019-10-19 03:03:25.181202. charcode:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/ collection:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/collection-1.14.12/lib/ cookie_jar:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/cookie_jar-1.0.1/lib/ diff --git a/app/sdks/php/src/Appwrite/Client.php b/app/sdks/php/src/Appwrite/Client.php index 4c7905bb3e..1f62277e8b 100644 --- a/app/sdks/php/src/Appwrite/Client.php +++ b/app/sdks/php/src/Appwrite/Client.php @@ -37,7 +37,7 @@ class Client */ protected $headers = [ 'content-type' => '', - 'x-sdk-version' => 'appwrite:php:1.0.10', + 'x-sdk-version' => 'appwrite:php:1.0.11', ]; /** diff --git a/app/sdks/ruby/appwrite.gemspec b/app/sdks/ruby/appwrite.gemspec index 743701419d..8af49735a2 100644 --- a/app/sdks/ruby/appwrite.gemspec +++ b/app/sdks/ruby/appwrite.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'appwrite' - s.version = '1.0.3' + s.version = '1.0.4' s.summary = "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)" s.author = 'Appwrite Team' s.homepage = 'https://appwrite.io/support' diff --git a/app/sdks/ruby/lib/appwrite/client.rb b/app/sdks/ruby/lib/appwrite/client.rb index 6cb815a366..83b78f5e8a 100644 --- a/app/sdks/ruby/lib/appwrite/client.rb +++ b/app/sdks/ruby/lib/appwrite/client.rb @@ -1,6 +1,7 @@ require 'net/http' require 'uri' require 'json' +require 'cgi' module Appwrite class Client @@ -19,7 +20,7 @@ module Appwrite @headers = { 'content-type' => '', 'user-agent' => RUBY_PLATFORM + ':ruby-' + RUBY_VERSION, - 'x-sdk-version' => 'appwrite:ruby:1.0.3' + 'x-sdk-version' => 'appwrite:ruby:1.0.4' } @endpoint = 'https://appwrite.io/v1'; end @@ -61,7 +62,7 @@ module Appwrite end def call(method, path = '', headers = {}, params = {}) - uri = URI.parse(@endpoint + path + ((method == METHOD_GET) ? '?' + URI.encode_www_form(params) : '')) + uri = URI.parse(@endpoint + path + ((method == METHOD_GET) ? '?' + encode(params) : '')) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = (uri.scheme == 'https') payload = '' @@ -73,7 +74,7 @@ module Appwrite when 'application/json' payload = params.to_json else - payload = URI.encode_www_form(params) + payload = encode(params) end end @@ -89,5 +90,19 @@ module Appwrite protected private + + def encode(value, key = nil) + case value + when Hash then value.map { |k,v| encode(v, append_key(key,k)) }.join('&') + when Array then value.map { |v| encode(v, "#{key}[]") }.join('&') + when nil then '' + else + "#{key}=#{CGI.escape(value.to_s)}" + end + end + + def append_key(root_key, key) + root_key.nil? ? key : "#{root_key}[#{key.to_s}]" + end end end \ No newline at end of file diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index f0c9b86843..46e714aa5f 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -39,7 +39,7 @@ $cli $clients = [ 'php' => [ - 'version' => '1.0.10', + 'version' => '1.0.11', 'result' => __DIR__.'/../sdks/php/', 'gitURL' => 'https://github.com/appwrite/sdk-for-php.git', 'gitRepo' => 'git@github.com:appwrite/sdk-for-php.git', @@ -83,7 +83,7 @@ $cli 'platform' => 'server', ], 'ruby' => [ - 'version' => '1.0.3', + 'version' => '1.0.4', 'result' => __DIR__.'/../sdks/ruby/', 'gitURL' => 'https://github.com/appwrite/sdk-for-ruby.git', 'gitRepo' => 'git@github.com:appwrite/sdk-for-ruby.git', diff --git a/composer.lock b/composer.lock index 18c0b1bdd2..c6c89cc19f 100644 --- a/composer.lock +++ b/composer.lock @@ -92,7 +92,7 @@ "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "a130fb6e8fcd88f9dd5da1331dcd24a7d426ec22" + "reference": "4ab0600fb6e4b59824d4804fbd347050f5dc3864" }, "require": { "ext-curl": "*", @@ -122,7 +122,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2019-10-18 18:08:52" + "time": "2019-10-18 21:12:43" }, { "name": "bacon/bacon-qr-code",