def authorization_url(options = {})
      type = options.delete(:type) || :site
      # redirect_uri passed in options overrides the global setting
      options[:redirect_uri] ||= VkontakteApi.redirect_uri
      options[:scope] = VkontakteApi::Utils.flatten_argument(options[:scope]) if options[:scope]
      
      case type
      when :site
        client.auth_code.authorize_url(options)
      when :client
        client.implicit.authorize_url(options)
      else
        raise ArgumentError, "Unknown authorization type #{type.inspect}"
      end
    end
def authorization_url(options = {})
      type = options.delete(:type) || :site
      # redirect_uri passed in options overrides the global setting
      options[:redirect_uri] ||= VkontakteApi.redirect_uri
      options[:scope] = VkontakteApi::Utils.flatten_argument(options[:scope]) if options[:scope]
      
      case type
      when :site
        client.auth_code.authorize_url(options)
      when :client
        client.implicit.authorize_url(options)
      else
        raise ArgumentError, "Unknown authorization type #{type.inspect}"
      end
    end
URL for redirecting the user to VK where he gives the application all the requested access rights.
 @option options [Symbol] :type The type of authorization being used (`:site` and `:client` supported).
 @option options [String] :redirect_uri URL for redirecting the user back to the application (overrides the global configuration value).
 @option options [Array] :scope An array of requested access rights (each represented by a symbol or a string).
 @raise [ArgumentError] raises after receiving an unknown authorization type.
 @return [String] URL to redirect the user to.