BETA This software is half-finished beta-quality software. Until 1.0 is released, use at your own risk!
This is a gem for talking to the HelpScout Help Desk API.
You will need a valid HelpScout account setup for the API key in order to use this gem. This gem has been developed and tested on Ruby 2.2.3p173
Using bundler:
gem 'girlscout'
Or manually via rubygems:
$ gem install girlscout
Before starting out, obtain your HelpScout API Key from the HelpScout dashboard and
configure your api_key
in the application:
require 'girlscout'
GirlScout::Config.api_key = 'put your helpscout API key here'
GirlScout provides AR-style accessor methods on model classes, use them to retrieve data from HelpScout:
mailboxes = GirlScout::Mailbox.all
puts mailboxes.first.name
# => "Support"
conversation = GirlScout::Conversation.find(12345)
puts conversation.id
# => 12345
To create a new conversation, build the models and use the create
method on the model
class:
user = GirlScout::User.me
mailbox = GirlScout::Mailbox.new(id: 123)
customer = GirlScout::Customer.new(email: "[email protected]")
thread = GirlScout::Thread.new({
type: "message",
created_by: user,
body: "You may reply to this email directly for support!"
})
conversation = GirlScout::Conversation.new(
type: :email,
subject: "Thanks for registering at Awesome SaaS company XYZ!",
mailbox: mailbox,
customer: customer,
threads: [thread]
)
conversation = GirlScout::Conversation.create(conversation)
MIT