Sha256: 9f84b059d5960ea8bb5bf80c5b02c7f2a9e26b300b54eb4ffee7eb3966ac9904

Contents?: true

Size: 839 Bytes

Versions: 16

Compression:

Stored size: 839 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 ||= self.user.username
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
extendi-instagram-2.0.6 lib/instagram/client/utils.rb
extendi-instagram-2.0.5 lib/instagram/client/utils.rb
extendi-instagram-2.0.4 lib/instagram/client/utils.rb
extendi-instagram-2.0.3 lib/instagram/client/utils.rb
extendi-instagram-2.0.2 lib/instagram/client/utils.rb
extendi-instagram-2.0.1 lib/instagram/client/utils.rb
extendi-instagram-2.0.0 lib/instagram/client/utils.rb
instagram-continued-1.3.0 lib/instagram/client/utils.rb
instagram-community-maintained-1.1.6 lib/instagram/client/utils.rb
instagram-continued-1.2.1 lib/instagram/client/utils.rb
instagram-continued-1.2.0 lib/instagram/client/utils.rb
instagram-1.1.6 lib/instagram/client/utils.rb
instagram-1.1.5 lib/instagram/client/utils.rb
instagram-1.1.4 lib/instagram/client/utils.rb
instagram-1.1.3 lib/instagram/client/utils.rb
instagram-1.1.2 lib/instagram/client/utils.rb