Module: Zferral

Defined in:
lib/zferral.rb,
lib/zferral/client.rb,
lib/zferral/errors.rb,
lib/zferral/resource.rb,
lib/zferral/resources/event.rb,
lib/zferral/resources/campaign.rb

Overview

:nodoc:

Defined Under Namespace

Classes: Campaign, Client, Event, MethodNotSupported, Resource, ResourceError, ResourceNotFound

Class Method Summary collapse

Class Method Details

.new(*args) ⇒ Client

Creates a new API Client with the passed arguments.

This is the preferred entry point for the library. In other words, create a client using this method and access all of the API resources from here.

zferral = Zferral.new(:subdomain => 'sandbox', :api_token => 'c143c5450fb633c70c53b1bcc6348077')
zferral.campaign.list

Parameters:

  • options (Hash)

    API credentials, passed as a hash with ‘subdomain’ and ‘api_token’ keys

Returns:

  • (Client)

    a new instance of Client



19
20
21
# File 'lib/zferral.rb', line 19

def self.new(*args)
  Zferral::Client.new(*args)
end