Sha256: fc873a1e88665c86c0cdefee29fa68b069d1431ad5d3b48eb344ab840d0cf0c4

Contents?: true

Size: 509 Bytes

Versions: 3

Compression:

Stored size: 509 Bytes

Contents

module CodaDocs
  module Entities
    class Entity
      def initialize(access_token)
        @access_token = access_token
      end

      def parse_response(response)
        response.parsed_response['items']
      end

      def connection
        conn = CodaDocs::Connection
        conn.default_options.merge!(
          headers: {
            'Authorization' => "Bearer #{@access_token}",
            'Content-Type' => 'application/json'
          }
        )
        conn
      end
    end
  end
end


Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
coda_docs-1.0.1 lib/coda_docs/entities/entity.rb
coda_docs-1.0.0 lib/coda_docs/entities/entity.rb
coda_docs-0.2.0.pre.beta lib/coda_docs/entities/entity.rb