Class: Hubspot::Events::EventsApi
- Inherits:
-
Object
- Object
- Hubspot::Events::EventsApi
- Defined in:
- lib/hubspot/codegen/events/api/events_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_page(opts = {}) ⇒ CollectionResponseExternalUnifiedEvent
Returns a collection of events matching a query.
-
#get_page_with_http_info(opts = {}) ⇒ Array<(CollectionResponseExternalUnifiedEvent, Integer, Hash)>
Returns a collection of events matching a query.
-
#initialize(api_client = ApiClient.default) ⇒ EventsApi
constructor
A new instance of EventsApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
18 19 20 |
# File 'lib/hubspot/codegen/events/api/events_api.rb', line 18 def api_client @api_client end |
Instance Method Details
#get_page(opts = {}) ⇒ CollectionResponseExternalUnifiedEvent
Returns a collection of events matching a query.
35 36 37 38 |
# File 'lib/hubspot/codegen/events/api/events_api.rb', line 35 def get_page(opts = {}) data, _status_code, _headers = get_page_with_http_info(opts) data end |
#get_page_with_http_info(opts = {}) ⇒ Array<(CollectionResponseExternalUnifiedEvent, Integer, Hash)>
Returns a collection of events matching a query.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/hubspot/codegen/events/api/events_api.rb', line 52 def get_page_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.get_page ...' end # resource path local_var_path = '/events/v3/events' # query parameters query_params = opts[:query_params] || {} query_params[:'occurredAfter'] = opts[:'occurred_after'] if !opts[:'occurred_after'].nil? query_params[:'occurredBefore'] = opts[:'occurred_before'] if !opts[:'occurred_before'].nil? query_params[:'objectType'] = opts[:'object_type'] if !opts[:'object_type'].nil? query_params[:'objectId'] = opts[:'object_id'] if !opts[:'object_id'].nil? query_params[:'eventType'] = opts[:'event_type'] if !opts[:'event_type'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'CollectionResponseExternalUnifiedEvent' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EventsApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |