Sha256: 3288e8472e0504da14094cefddb2ce7f3974bdbdec4d9dba461d84129163f48a

Contents?: true

Size: 827 Bytes

Versions: 5

Compression:

Stored size: 827 Bytes

Contents

module Instagram
  class Client
    # @private
    module Utils
      # Returns the raw full response including all headers. Can be used to access the values for 'X-Ratelimit-Limit' and 'X-Ratelimit-Remaining'
      # ==== Examples
      #
      #   client = Instagram.client(:access_token => session[:access_token])
      #   response = client.utils_raw_response
      #   remaining = response.headers[:x_ratelimit_remaining]
      #   limit = response.headers[:x_ratelimit_limit]
      #
      def utils_raw_response
        response = get("users/self/feed", nil, false, true)
        response
      end

      private

      # Returns the configured user name or the user name of the authenticated user
      #
      # @return [String]
      def get_username
        @user_name ||= user.username
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
instagram-continued-continued-1.5.0 lib/instagram/client/utils.rb
instagram-continued-1.4.0 lib/instagram/client/utils.rb
instagram-continued-1.3.3 lib/instagram/client/utils.rb
instagram-continued-1.3.2 lib/instagram/client/utils.rb
instagram-continued-1.3.1 lib/instagram/client/utils.rb