Module: MarketoAPI

Defined in:
lib/marketo_api.rb

Overview

MarketoAPI (marketo-api-ruby) provides a native Ruby interface to the Marketo SOAP API, using savon.

Synopsis

require 'marketo_api'

Defined Under Namespace

Classes: Campaigns, Client, ClientProxy, Lead, Leads, Lists, MObject, MObjects

Constant Summary collapse

VERSION =
"0.9"
MINIMIZE_HASH =

:nodoc:

->(k, v) { #:nodoc:
  v.nil? or (v.respond_to?(:empty?) and v.empty?)
}

Class Method Summary collapse

Class Method Details

.array(object) ⇒ Object

:nodoc:



22
23
24
25
26
27
28
29
30
31
# File 'lib/marketo_api.rb', line 22

def array(object) # :nodoc:
  case object
  when Hash
    [ object ]
  when Array
    object
  else
    Kernel.Array(object)
  end
end

.client(config = {}) ⇒ Object

Create a new MarketoAPI::Client, essentially an alias for MarketoAPI::Client.new.



18
19
20
# File 'lib/marketo_api.rb', line 18

def client(config = {})
  MarketoAPI::Client.new(config)
end

.freeze(*args) ⇒ Object

:nodoc:



33
34
35
# File 'lib/marketo_api.rb', line 33

def freeze(*args) # :nodoc:
  args.each(&:freeze).freeze
end