Class: PewPew::Client

Inherits:
Object
  • Object
show all
Includes:
Relax::Client
Defined in:
lib/pew_pew/client.rb

Instance Method Summary collapse

Constructor Details

#initializeClient

Returns a new client instance and configures its default values.



6
7
8
9
10
# File 'lib/pew_pew/client.rb', line 6

def initialize
  config.base_uri = Config::BASE_URI
  config.user_agent = Config::USER_AGENT
  config.extend(Config)
end

Instance Method Details

#bounces(options = {}) ⇒ Resources::Bounces

Builds a new instance of the bounces resource for the given domain.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :domain (String)

    the domain name

Returns:



16
17
18
# File 'lib/pew_pew/client.rb', line 16

def bounces(options={})
  Resources::Bounces.new(self, options)
end

#campaigns(options = {}) ⇒ Resources::Campaigns

Builds a new instance of the campaigns resource for the given domain.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :domain (String)

    the domain name

Returns:



24
25
26
# File 'lib/pew_pew/client.rb', line 24

def campaigns(options={})
  Resources::Campaigns.new(self, options)
end

#complaints(options = {}) ⇒ Resources::Complaints

Builds a new instance of the complaints resource for the given domain.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :domain (String)

    the domain name

Returns:



32
33
34
# File 'lib/pew_pew/client.rb', line 32

def complaints(options={})
  Resources::Complaints.new(self, options)
end

#listsResources::Lists

Builds a new instance of the lists resource.

Returns:



39
40
41
# File 'lib/pew_pew/client.rb', line 39

def lists
  Resources::Lists.new(self)
end

#logs(options = {}) ⇒ Resources::Logs

Builds a new instance of the logs resource for the given domain.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :domain (String)

    the domain name

Returns:



47
48
49
# File 'lib/pew_pew/client.rb', line 47

def logs(options={})
  Resources::Logs.new(self, options)
end

#mailboxes(options = {}) ⇒ Resources::Mailboxes

Builds a new instance of the mailboxes resource for the given domain.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :domain (String)

    the domain name

Returns:



55
56
57
# File 'lib/pew_pew/client.rb', line 55

def mailboxes(options={})
  Resources::Mailboxes.new(self, options)
end

#messages(options = {}) ⇒ Resources::Messages

Builds a new instance of the messages resource for the given domain.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :domain (String)

    the domain name

Returns:



63
64
65
# File 'lib/pew_pew/client.rb', line 63

def messages(options={})
  Resources::Messages.new(self, options)
end

#routesResources::Routes

Builds a new instance of the routes resource.

Returns:



70
71
72
# File 'lib/pew_pew/client.rb', line 70

def routes
  Resources::Routes.new(self)
end

#stats(options = {}) ⇒ Resources::Stats

Builds a new instance of the stats resource for the given domain.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :domain (String)

    the domain name

Returns:



78
79
80
# File 'lib/pew_pew/client.rb', line 78

def stats(options={})
  Resources::Stats.new(self, options)
end

#unsubscribes(options = {}) ⇒ Resources::Unsubscribes

Builds a new instance of the unsubscribes resource for the given domain.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :domain (String)

    the domain name

Returns:



86
87
88
# File 'lib/pew_pew/client.rb', line 86

def unsubscribes(options={})
  Resources::Unsubscribes.new(self, options)
end