Class: Hubspot::Cms::Performance::DefaultApi
- Inherits:
-
Object
- Object
- Hubspot::Cms::Performance::DefaultApi
- Defined in:
- lib/hubspot/codegen/cms/performance/api/default_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_page(opts = {}) ⇒ PublicPerformanceResponse
View your website’s performance.
-
#get_page_with_http_info(opts = {}) ⇒ Array<(PublicPerformanceResponse, Integer, Hash)>
View your website's performance.
-
#get_uptime(opts = {}) ⇒ PublicPerformanceResponse
View your website’s uptime.
-
#get_uptime_with_http_info(opts = {}) ⇒ Array<(PublicPerformanceResponse, Integer, Hash)>
View your website's uptime.
-
#initialize(api_client = ApiClient.default) ⇒ DefaultApi
constructor
A new instance of DefaultApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ DefaultApi
Returns a new instance of DefaultApi.
21 22 23 |
# File 'lib/hubspot/codegen/cms/performance/api/default_api.rb', line 21 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
19 20 21 |
# File 'lib/hubspot/codegen/cms/performance/api/default_api.rb', line 19 def api_client @api_client end |
Instance Method Details
#get_page(opts = {}) ⇒ PublicPerformanceResponse
View your website’s performance. Returns time series data website performance data for the given domain and/or path.
36 37 38 39 |
# File 'lib/hubspot/codegen/cms/performance/api/default_api.rb', line 36 def get_page(opts = {}) data, _status_code, _headers = get_page_with_http_info(opts) data end |
#get_page_with_http_info(opts = {}) ⇒ Array<(PublicPerformanceResponse, Integer, Hash)>
View your website's performance. Returns time series data website performance data for the given domain and/or path.
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/cms/performance/api/default_api.rb', line 53 def get_page_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_page ...' end # resource path local_var_path = '/cms/v3/performance/' # query parameters query_params = opts[:query_params] || {} query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil? query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil? query_params[:'pad'] = opts[:'pad'] if !opts[:'pad'].nil? query_params[:'sum'] = opts[:'sum'] if !opts[:'sum'].nil? query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil? query_params[:'interval'] = opts[:'interval'] if !opts[:'interval'].nil? query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].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] || 'PublicPerformanceResponse' # auth_names auth_names = opts[:auth_names] || ['hapikey'] = 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: DefaultApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_uptime(opts = {}) ⇒ PublicPerformanceResponse
View your website’s uptime. Returns uptime time series website performance data for the given domain.
116 117 118 119 |
# File 'lib/hubspot/codegen/cms/performance/api/default_api.rb', line 116 def get_uptime(opts = {}) data, _status_code, _headers = get_uptime_with_http_info(opts) data end |
#get_uptime_with_http_info(opts = {}) ⇒ Array<(PublicPerformanceResponse, Integer, Hash)>
View your website's uptime. Returns uptime time series website performance data for the given domain.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/hubspot/codegen/cms/performance/api/default_api.rb', line 133 def get_uptime_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_uptime ...' end # resource path local_var_path = '/cms/v3/performance/uptime' # query parameters query_params = opts[:query_params] || {} query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil? query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil? query_params[:'pad'] = opts[:'pad'] if !opts[:'pad'].nil? query_params[:'sum'] = opts[:'sum'] if !opts[:'sum'].nil? query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil? query_params[:'interval'] = opts[:'interval'] if !opts[:'interval'].nil? query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].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] || 'PublicPerformanceResponse' # auth_names auth_names = opts[:auth_names] || ['hapikey'] = 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: DefaultApi#get_uptime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |