Class: HelpScout::API

Inherits:
Object
  • Object
show all
Defined in:
lib/help_scout/api.rb,
lib/help_scout/api/client.rb,
lib/help_scout/api/access_token.rb,
lib/help_scout/api/access_token/cache.rb,
lib/help_scout/api/access_token/request.rb

Defined Under Namespace

Classes: AccessToken, BadRequest, Client, InternalError, NotAuthorized, NotFound, ThrottleLimitReached

Constant Summary collapse

BASE_URL =
'https://api.helpscout.net/v2/'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



13
14
15
# File 'lib/help_scout/api.rb', line 13

def access_token
  @access_token
end

Instance Method Details

#get(path, params = {}) ⇒ Object



15
16
17
# File 'lib/help_scout/api.rb', line 15

def get(path, params = {})
  send_request(:get, path, params)
end

#patch(path, params) ⇒ Object



19
20
21
# File 'lib/help_scout/api.rb', line 19

def patch(path, params)
  send_request(:patch, path, params)
end

#post(path, params) ⇒ Object



23
24
25
# File 'lib/help_scout/api.rb', line 23

def post(path, params)
  send_request(:post, path, params)
end

#put(path, params) ⇒ Object



27
28
29
# File 'lib/help_scout/api.rb', line 27

def put(path, params)
  send_request(:put, path, params)
end