Sha256: c738f97c4f7aa9814b5c96a9c2d7579f4fe337732edab853efe65e1f7a15faf6

Contents?: true

Size: 1.37 KB

Versions: 1

Compression:

Stored size: 1.37 KB

Contents

require 'faraday'
require 'faraday_middleware'
require 'json'

require 'marketo_api/version'
require 'marketo_api/config'

module MarketoApi
  autoload :AbstractClient, 'marketo_api/abstract_client'
  autoload :Middleware,     'marketo_api/middleware'
  autoload :Client,         'marketo_api/client'

  module Concerns
    autoload :Authentication, 'marketo_api/concerns/authentication'
    autoload :Connection,     'marketo_api/concerns/connection'
    autoload :Caching,        'marketo_api/concerns/caching'
    autoload :Verbs,          'marketo_api/concerns/verbs'
    autoload :Base,           'marketo_api/concerns/base'
  end

  module API
    autoload :Base,           'marketo_api/api/base'
    autoload :Leads,          'marketo_api/api/leads'
    autoload :Sales,          'marketo_api/api/sales'
    autoload :Stats,          'marketo_api/api/stats'
    autoload :Activities,     'marketo_api/api/activities'
    autoload :Campaigns,      'marketo_api/api/campaigns'
  end

  Error               = Class.new(StandardError)
  ServerError         = Class.new(Error)
  AuthenticationError = Class.new(Error)
  UnauthorizedError   = Class.new(Error)
  APIVersionError     = Class.new(Error)

  # Add .tap method in Ruby 1.8
  module CoreExtensions
    def tap
      yield self
      self
    end
  end

  Object.send :include, MarketoApi::CoreExtensions unless Object.respond_to? :tap
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
marketo_api-0.0.7.pre.alpha lib/marketo_api.rb