Class: GrooveHQ::Client
- Inherits:
-
Object
- Object
- GrooveHQ::Client
- Includes:
- Agents, Attachments, Connection, Customers, Folders, Groups, Mailboxes, Messages, Tickets, Webhooks, HTTParty
- Defined in:
- lib/groovehq/client.rb,
lib/groovehq/client/agents.rb,
lib/groovehq/client/groups.rb,
lib/groovehq/client/folders.rb,
lib/groovehq/client/tickets.rb,
lib/groovehq/client/messages.rb,
lib/groovehq/client/webhooks.rb,
lib/groovehq/client/customers.rb,
lib/groovehq/client/mailboxes.rb,
lib/groovehq/client/connection.rb,
lib/groovehq/client/attachments.rb
Defined Under Namespace
Modules: Agents, Attachments, Connection, Customers, Folders, Groups, Mailboxes, Messages, Tickets, Webhooks
Instance Method Summary collapse
-
#initialize(access_token = nil) ⇒ Client
constructor
A new instance of Client.
Methods included from Webhooks
#create_webhook, #delete_webhook
Methods included from Tickets
#create_ticket, #ticket, #ticket_assignee, #ticket_state, #tickets, #tickets_count, #update_ticket_assigned_group, #update_ticket_assignee, #update_ticket_priority, #update_ticket_state
Methods included from Messages
#create_message, #message, #messages
Methods included from Attachments
Methods included from Mailboxes
Methods included from Groups
Methods included from Folders
Methods included from Customers
#customer, #customers, #update_customer
Methods included from Agents
Methods included from Connection
Constructor Details
#initialize(access_token = nil) ⇒ Client
Returns a new instance of Client.
30 31 32 33 |
# File 'lib/groovehq/client.rb', line 30 def initialize(access_token = nil) access_token ||= ENV["GROOVEHQ_ACCESS_TOKEN"] self.class..merge!(headers: { 'Authorization' => "Bearer #{access_token}" }) end |