lib/vkontakte_api/api.rb in vkontakte_api-1.0.rc2 vs lib/vkontakte_api/api.rb in vkontakte_api-1.0.rc3

- old
+ new

@@ -2,11 +2,11 @@ # A low-level module which handles the requests to VKontakte API and returns their results as mashes. # # It uses Faraday with middleware underneath the hood. module API # URL prefix for calling API methods. - URL_PREFIX = 'https://api.vkontakte.ru/method' + URL_PREFIX = 'https://api.vk.com/method' class << self # API method call. # @param [String] method_name A full name of the method. # @param [Hash] args Method arguments. @@ -24,10 +24,10 @@ # @return [Faraday::Connection] Created connection. def connection(options = {}) url = options.delete(:url) token = options.delete(:token) - Faraday.new(url) do |builder| + Faraday.new(url, VkontakteApi.faraday_options) do |builder| builder.request :oauth2, token unless token.nil? builder.request :multipart builder.response :vk_logger builder.response :mashify builder.response :oj, :preserve_raw => true