Class: Conversocial::Client

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



5
6
7
8
9
10
11
# File 'lib/conversocial/client.rb', line 5

def initialize options={}
  @key = options[:key]
  @secret = options[:secret]
  @version = options[:version]
  @logger = options[:logger]
  @cache_expiry = options[:cache_expiry]
end

Instance Attribute Details

#cache_expiryObject (readonly)

Returns the value of attribute cache_expiry.



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

def cache_expiry
  @cache_expiry
end

#keyObject (readonly)

Returns the value of attribute key.



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

def key
  @key
end

#loggerObject (readonly)

Returns the value of attribute logger.



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

def logger
  @logger
end

#secretObject (readonly)

Returns the value of attribute secret.



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

def secret
  @secret
end

#versionObject (readonly)

Returns the value of attribute version.



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

def version
  @version
end

Instance Method Details

#accountsObject



13
14
15
# File 'lib/conversocial/client.rb', line 13

def accounts
  (@accounts ||= Conversocial::Resources::QueryEngines::Account.new self).clear
end

#authorsObject



17
18
19
# File 'lib/conversocial/client.rb', line 17

def authors
  (@authors ||= Conversocial::Resources::QueryEngines::Author.new self).clear
end

#channelsObject



21
22
23
# File 'lib/conversocial/client.rb', line 21

def channels
  (@channels ||= Conversocial::Resources::QueryEngines::Channel.new self).clear
end

#conversationsObject



42
43
44
# File 'lib/conversocial/client.rb', line 42

def conversations
  (@conversations ||= Conversocial::Resources::QueryEngines::Conversation.new self).clear
end

#reportsObject

TODO: implement keyvalues support def keyvalues

(@keyvalues ||= Conversocial::Resources::QueryEngines::Keyvalue.new self).clear

end



30
31
32
# File 'lib/conversocial/client.rb', line 30

def reports
  (@reports ||= Conversocial::Resources::QueryEngines::Report.new self).clear
end

#tagsObject



34
35
36
# File 'lib/conversocial/client.rb', line 34

def tags
  (@tags ||= Conversocial::Resources::QueryEngines::Tag.new self).clear
end

#usersObject



38
39
40
# File 'lib/conversocial/client.rb', line 38

def users
  (@users ||= Conversocial::Resources::QueryEngines::User.new self).clear
end