Sha256: bdb66a48751b8509931e85ae79ec31af4cab307a7674a789917ed65ca5209d2b

Contents?: true

Size: 624 Bytes

Versions: 14

Compression:

Stored size: 624 Bytes

Contents

module Picasa
  module API
    class Base
      attr_reader :user_id, :authorization_header

      # @param [Hash] credentials
      # @option credentials [String] :user_id google username/email
      # @option credentials [String] :authorization_header header for authenticating requests
      def initialize(credentials = {})
        @user_id  = credentials.fetch(:user_id)
        @authorization_header = credentials[:authorization_header]
      end

      def auth_header
        {}.tap do |header|
          header["Authorization"] = authorization_header if authorization_header
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
picasa-0.7.5 lib/picasa/api/base.rb
picasa-0.7.4 lib/picasa/api/base.rb
picasa-0.7.3 lib/picasa/api/base.rb
picasa-0.7.2 lib/picasa/api/base.rb
picasa-0.7.1 lib/picasa/api/base.rb
picasa-0.7.0 lib/picasa/api/base.rb
picasa-0.6.7 lib/picasa/api/base.rb
picasa-0.6.6 lib/picasa/api/base.rb
picasa-0.6.5 lib/picasa/api/base.rb
picasa-0.6.4 lib/picasa/api/base.rb
picasa-0.6.3 lib/picasa/api/base.rb
picasa-0.6.2 lib/picasa/api/base.rb
picasa-0.6.1 lib/picasa/api/base.rb
picasa-0.6.0 lib/picasa/api/base.rb