Class: Contactually::Client

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key: nil, auth_token: nil, base_url: 'https://api.contactually.com') ⇒ Client

Returns a new instance of Client.



5
6
7
8
9
10
11
12
13
14
# File 'lib/contactually/client.rb', line 5

def initialize(api_key: nil, auth_token: nil, base_url: 'https://api.contactually.com')
  @api_key = api_key
  @auth_token = auth_token
  @base_url = base_url
  @interface = Contactually::Interface.new(
    api_key:      @api_key,
    auth_token:   @auth_token,
    base_url:     @base_url
  )
end

Instance Attribute Details

#interfaceObject (readonly)

Returns the value of attribute interface.



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

def interface
  @interface
end

Instance Method Details

#bucketsObject



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

def buckets
  @buckets ||= Contactually::Buckets.new(interface: interface)
end

#contactsObject



20
21
22
# File 'lib/contactually/client.rb', line 20

def contacts
  @contacts ||= Contactually::Contacts.new(interface: interface)
end

#interactionsObject



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

def interactions
  @interactions ||= Contactually::Interactions.new(interface: interface)
end

#meObject



28
29
30
# File 'lib/contactually/client.rb', line 28

def me
  @me ||= Contactually::Me.new(interface: interface)
end

#tagsObject



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

def tags
  @tags ||= Contactually::Tags.new(interface: interface)
end

#tasksObject



36
37
38
# File 'lib/contactually/client.rb', line 36

def tasks
  @tasks ||= Contactually::Tasks.new(interface: interface)
end