Class: Hubspot::Connection
- Inherits:
-
Object
- Object
- Hubspot::Connection
show all
- Includes:
- HTTParty
- Defined in:
- lib/hubspot/connection.rb
Class Method Summary
collapse
Class Method Details
.delete_json(path, opts) ⇒ Object
25
26
27
28
29
30
|
# File 'lib/hubspot/connection.rb', line 25
def delete_json(path, opts)
url = generate_url(path, opts)
response = delete(url, format: :json, read_timeout: read_timeout(opts), open_timeout: open_timeout(opts))
log_request_and_response url, response, opts[:body]
handle_response(response)
end
|
.get_json(path, opts) ⇒ Object
6
7
8
9
10
11
|
# File 'lib/hubspot/connection.rb', line 6
def get_json(path, opts)
url = generate_url(path, opts)
response = get(url, format: :json, read_timeout: read_timeout(opts), open_timeout: open_timeout(opts))
log_request_and_response url, response
handle_response(response).parsed_response
end
|
.patch_json(path, options) ⇒ Object
21
22
23
|
# File 'lib/hubspot/connection.rb', line 21
def patch_json(path, options)
modification_query(:patch, path, options)
end
|
.post_json(path, options) ⇒ Object
13
14
15
|
# File 'lib/hubspot/connection.rb', line 13
def post_json(path, options)
modification_query(:post, path, options)
end
|
.put_json(path, options) ⇒ Object
17
18
19
|
# File 'lib/hubspot/connection.rb', line 17
def put_json(path, options)
modification_query(:put, path, options)
end
|