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
27
28
29
30
31
32
|
# File 'lib/hubspot/connection.rb', line 27
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
8
9
10
11
12
13
|
# File 'lib/hubspot/connection.rb', line 8
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
23
24
25
|
# File 'lib/hubspot/connection.rb', line 23
def patch_json(path, options)
modification_query(:patch, path, options)
end
|
.post_json(path, options) ⇒ Object
15
16
17
|
# File 'lib/hubspot/connection.rb', line 15
def post_json(path, options)
modification_query(:post, path, options)
end
|
.put_json(path, options) ⇒ Object
19
20
21
|
# File 'lib/hubspot/connection.rb', line 19
def put_json(path, options)
modification_query(:put, path, options)
end
|