Class: Newslettre::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/newslettre/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(email, password) ⇒ Client

Returns a new instance of Client.



3
4
5
# File 'lib/newslettre/client.rb', line 3

def initialize email, password
  @api = Newslettre::API.new :email => email, :password => password
end

Instance Attribute Details

#apiObject (readonly)

Returns the value of attribute api.



2
3
4
# File 'lib/newslettre/client.rb', line 2

def api
  @api
end

Instance Method Details

#identitiesObject



11
12
13
# File 'lib/newslettre/client.rb', line 11

def identities
  @identities ||= proxy_for Newslettre::Identity
end

#listsObject



15
16
17
# File 'lib/newslettre/client.rb', line 15

def lists
  @lists ||= proxy_for Newslettre::Lists
end

#newslettersObject



7
8
9
# File 'lib/newslettre/client.rb', line 7

def newsletters
  @newsletters ||= proxy_for Newslettre::Letter
end