Class: SiteimproveAPIClient::GeneralApi

Inherits:
Object
  • Object
show all
Defined in:
lib/siteimprove_api_client/api/general_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ GeneralApi

Returns a new instance of GeneralApi.



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

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/siteimprove_api_client/api/general_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#ping_account_get(opts = {}) ⇒ PingAccount

Test your access to the API service Returns "OK" if the supplied account credentials gives access to the API endpoints.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



26
27
28
29
# File 'lib/siteimprove_api_client/api/general_api.rb', line 26

def (opts = {})
  data, _status_code, _headers = (opts)
  data
end

#ping_account_get_with_http_info(opts = {}) ⇒ Array<(PingAccount, Integer, Hash)>

Test your access to the API service Returns &quot;OK&quot; if the supplied account credentials gives access to the API endpoints.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PingAccount, Integer, Hash)>)

    PingAccount data, response status code and response headers



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
# File 'lib/siteimprove_api_client/api/general_api.rb', line 35

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.ping_account_get ...'
  end
  # resource path
  local_var_path = '/ping/account'

  # query parameters
  query_params = opts[:query_params] || {}

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PingAccount'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.ping_account_get",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#ping_account_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#ping_api_get(opts = {}) ⇒ PingApi

Test the connectivity to the API service Returns "OK" if the server is alive.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



83
84
85
86
# File 'lib/siteimprove_api_client/api/general_api.rb', line 83

def ping_api_get(opts = {})
  data, _status_code, _headers = ping_api_get_with_http_info(opts)
  data
end

#ping_api_get_with_http_info(opts = {}) ⇒ Array<(PingApi, Integer, Hash)>

Test the connectivity to the API service Returns &quot;OK&quot; if the server is alive.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PingApi, Integer, Hash)>)

    PingApi data, response status code and response headers



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/siteimprove_api_client/api/general_api.rb', line 92

def ping_api_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.ping_api_get ...'
  end
  # resource path
  local_var_path = '/ping/api'

  # query parameters
  query_params = opts[:query_params] || {}

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PingApi'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.ping_api_get",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#ping_api_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#root_get(opts = {}) ⇒ Account

API Root Entry point to traverse the API endpoints.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



140
141
142
143
# File 'lib/siteimprove_api_client/api/general_api.rb', line 140

def root_get(opts = {})
  data, _status_code, _headers = root_get_with_http_info(opts)
  data
end

#root_get_with_http_info(opts = {}) ⇒ Array<(Account, Integer, Hash)>

API Root Entry point to traverse the API endpoints.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Account, Integer, Hash)>)

    Account data, response status code and response headers



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
183
184
185
186
187
188
189
190
191
# File 'lib/siteimprove_api_client/api/general_api.rb', line 149

def root_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.root_get ...'
  end
  # resource path
  local_var_path = '/'

  # query parameters
  query_params = opts[:query_params] || {}

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Account'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.root_get",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#root_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#settings_content_checking_get(opts = {}) ⇒ ContentCheckSettings

Get content-check settings Get information about the content-check functionality. This is useful for checking whether the content-check functionality has been enabled yet.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



197
198
199
200
# File 'lib/siteimprove_api_client/api/general_api.rb', line 197

def settings_content_checking_get(opts = {})
  data, _status_code, _headers = settings_content_checking_get_with_http_info(opts)
  data
end

#settings_content_checking_get_with_http_info(opts = {}) ⇒ Array<(ContentCheckSettings, Integer, Hash)>

Get content-check settings Get information about the content-check functionality. This is useful for checking whether the content-check functionality has been enabled yet.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ContentCheckSettings, Integer, Hash)>)

    ContentCheckSettings data, response status code and response headers



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/siteimprove_api_client/api/general_api.rb', line 206

def settings_content_checking_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.settings_content_checking_get ...'
  end
  # resource path
  local_var_path = '/settings/content_checking'

  # query parameters
  query_params = opts[:query_params] || {}

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ContentCheckSettings'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.settings_content_checking_get",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#settings_content_checking_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#settings_content_checking_post(opts = {}) ⇒ ProductsPolicyArchivedPoliciesPolicyIdUnarchivePost200Response

Enable content-check for this account This will enable content-checking for the account. No content-checking can be performed before this has been called to enable it. It may take a while to fully enable this feature - possibly several minutes. After enabling content-check using this endpoint, the corresponding GET endpoint can be polled to check for when content-check has been completely enabled and is ready to start accepting content-checks. Like so: POST /settings/content_checking Poll GET /settings/content_checking until content-check is ready Now you can check content

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



254
255
256
257
# File 'lib/siteimprove_api_client/api/general_api.rb', line 254

def settings_content_checking_post(opts = {})
  data, _status_code, _headers = settings_content_checking_post_with_http_info(opts)
  data
end

#settings_content_checking_post_with_http_info(opts = {}) ⇒ Array<(ProductsPolicyArchivedPoliciesPolicyIdUnarchivePost200Response, Integer, Hash)>

Enable content-check for this account This will enable content-checking for the account. No content-checking can be performed before this has been called to enable it. It may take a while to fully enable this feature - possibly several minutes. After enabling content-check using this endpoint, the corresponding GET endpoint can be polled to check for when content-check has been completely enabled and is ready to start accepting content-checks. Like so: POST /settings/content_checking Poll GET /settings/content_checking until content-check is ready Now you can check content

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'lib/siteimprove_api_client/api/general_api.rb', line 263

def settings_content_checking_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.settings_content_checking_post ...'
  end
  # resource path
  local_var_path = '/settings/content_checking'

  # query parameters
  query_params = opts[:query_params] || {}

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ProductsPolicyArchivedPoliciesPolicyIdUnarchivePost200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.settings_content_checking_post",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#settings_content_checking_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#settings_get(opts = {}) ⇒ AccountSettings

Get settings Overview of top-level settings endpoints.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



311
312
313
314
# File 'lib/siteimprove_api_client/api/general_api.rb', line 311

def settings_get(opts = {})
  data, _status_code, _headers = settings_get_with_http_info(opts)
  data
end

#settings_get_with_http_info(opts = {}) ⇒ Array<(AccountSettings, Integer, Hash)>

Get settings Overview of top-level settings endpoints.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AccountSettings, Integer, Hash)>)

    AccountSettings data, response status code and response headers



320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/siteimprove_api_client/api/general_api.rb', line 320

def settings_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.settings_get ...'
  end
  # resource path
  local_var_path = '/settings'

  # query parameters
  query_params = opts[:query_params] || {}

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AccountSettings'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.settings_get",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#settings_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#settings_surveys_get(opts = {}) ⇒ FeedbackSurveyList

Get surveys Get a list of feedback surveys for this account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



371
372
373
374
# File 'lib/siteimprove_api_client/api/general_api.rb', line 371

def settings_surveys_get(opts = {})
  data, _status_code, _headers = settings_surveys_get_with_http_info(opts)
  data
end

#settings_surveys_get_with_http_info(opts = {}) ⇒ Array<(FeedbackSurveyList, Integer, Hash)>

Get surveys Get a list of feedback surveys for this account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(FeedbackSurveyList, Integer, Hash)>)

    FeedbackSurveyList data, response status code and response headers



383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
# File 'lib/siteimprove_api_client/api/general_api.rb', line 383

def settings_surveys_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.settings_surveys_get ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling GeneralApi.settings_surveys_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling GeneralApi.settings_surveys_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling GeneralApi.settings_surveys_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/settings/surveys'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FeedbackSurveyList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.settings_surveys_get",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#settings_surveys_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#settings_users_get(opts = {}) ⇒ UserList

Get users Get a list of users for this account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



449
450
451
452
# File 'lib/siteimprove_api_client/api/general_api.rb', line 449

def settings_users_get(opts = {})
  data, _status_code, _headers = settings_users_get_with_http_info(opts)
  data
end

#settings_users_get_with_http_info(opts = {}) ⇒ Array<(UserList, Integer, Hash)>

Get users Get a list of users for this account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(UserList, Integer, Hash)>)

    UserList data, response status code and response headers



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
# File 'lib/siteimprove_api_client/api/general_api.rb', line 461

def settings_users_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.settings_users_get ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling GeneralApi.settings_users_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling GeneralApi.settings_users_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling GeneralApi.settings_users_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/settings/users'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'UserList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.settings_users_get",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#settings_users_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_get(opts = {}) ⇒ SiteList

Get sites Get a list of sites for this account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

Returns:



527
528
529
530
# File 'lib/siteimprove_api_client/api/general_api.rb', line 527

def sites_get(opts = {})
  data, _status_code, _headers = sites_get_with_http_info(opts)
  data
end

#sites_get_with_http_info(opts = {}) ⇒ Array<(SiteList, Integer, Hash)>

Get sites Get a list of sites for this account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

Returns:

  • (Array<(SiteList, Integer, Hash)>)

    SiteList data, response status code and response headers



539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
# File 'lib/siteimprove_api_client/api/general_api.rb', line 539

def sites_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.sites_get ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling GeneralApi.sites_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling GeneralApi.sites_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling GeneralApi.sites_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SiteList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.sites_get",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#sites_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_post(name, url, opts = {}) ⇒ SiteCreateResult

Creates a site Creates a site with the specified argument values

Parameters:

  • name (String)

    Site name

  • url (String)

    Url of the site

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



604
605
606
607
# File 'lib/siteimprove_api_client/api/general_api.rb', line 604

def sites_post(name, url, opts = {})
  data, _status_code, _headers = sites_post_with_http_info(name, url, opts)
  data
end

#sites_post_with_http_info(name, url, opts = {}) ⇒ Array<(SiteCreateResult, Integer, Hash)>

Creates a site Creates a site with the specified argument values

Parameters:

  • name (String)

    Site name

  • url (String)

    Url of the site

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SiteCreateResult, Integer, Hash)>)

    SiteCreateResult data, response status code and response headers



615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
# File 'lib/siteimprove_api_client/api/general_api.rb', line 615

def sites_post_with_http_info(name, url, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.sites_post ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling GeneralApi.sites_post"
  end
  # verify the required parameter 'url' is set
  if @api_client.config.client_side_validation && url.nil?
    fail ArgumentError, "Missing the required parameter 'url' when calling GeneralApi.sites_post"
  end
  # resource path
  local_var_path = '/sites'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'name'] = name
  query_params[:'url'] = url

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SiteCreateResult'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.sites_post",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#sites_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_dci_history_get(site_id, opts = {}) ⇒ DciOverallScoreHistoryItemList

Get history. Get history endpoints for Dci, Seo, Accessibility and Qa-Score

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

Returns:



677
678
679
680
# File 'lib/siteimprove_api_client/api/general_api.rb', line 677

def sites_site_id_dci_history_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_dci_history_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_dci_history_get_with_http_info(site_id, opts = {}) ⇒ Array<(DciOverallScoreHistoryItemList, Integer, Hash)>

Get history. Get history endpoints for Dci, Seo, Accessibility and Qa-Score

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

Returns:



690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
# File 'lib/siteimprove_api_client/api/general_api.rb', line 690

def sites_site_id_dci_history_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.sites_site_id_dci_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling GeneralApi.sites_site_id_dci_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling GeneralApi.sites_site_id_dci_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling GeneralApi.sites_site_id_dci_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling GeneralApi.sites_site_id_dci_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/dci/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DciOverallScoreHistoryItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.sites_site_id_dci_history_get",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#sites_site_id_dci_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_dci_overview_get(site_id, opts = {}) ⇒ DciOverallScore

Get DCI scores Get all DCI scores associated with this site.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :group_id (Integer)

    Id for specific group.

  • :page_id (Integer)

    Id for specific page.

Returns:



760
761
762
763
# File 'lib/siteimprove_api_client/api/general_api.rb', line 760

def sites_site_id_dci_overview_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_dci_overview_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_dci_overview_get_with_http_info(site_id, opts = {}) ⇒ Array<(DciOverallScore, Integer, Hash)>

Get DCI scores Get all DCI scores associated with this site.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :group_id (Integer)

    Id for specific group.

  • :page_id (Integer)

    Id for specific page.

Returns:

  • (Array<(DciOverallScore, Integer, Hash)>)

    DciOverallScore data, response status code and response headers



772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
# File 'lib/siteimprove_api_client/api/general_api.rb', line 772

def sites_site_id_dci_overview_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.sites_site_id_dci_overview_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling GeneralApi.sites_site_id_dci_overview_get"
  end
  # resource path
  local_var_path = '/sites/{site_id}/dci/overview'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DciOverallScore'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.sites_site_id_dci_overview_get",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#sites_site_id_dci_overview_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_get(site_id, opts = {}) ⇒ Site2

Get list of top level endpoints for site List of all the possible top-end endpoints, grouped by products and sections.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :group_id (Integer)

    Id for specific group.

Returns:



828
829
830
831
# File 'lib/siteimprove_api_client/api/general_api.rb', line 828

def sites_site_id_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_get_with_http_info(site_id, opts = {}) ⇒ Array<(Site2, Integer, Hash)>

Get list of top level endpoints for site List of all the possible top-end endpoints, grouped by products and sections.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :group_id (Integer)

    Id for specific group.

Returns:

  • (Array<(Site2, Integer, Hash)>)

    Site2 data, response status code and response headers



839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
# File 'lib/siteimprove_api_client/api/general_api.rb', line 839

def sites_site_id_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.sites_site_id_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling GeneralApi.sites_site_id_get"
  end
  # resource path
  local_var_path = '/sites/{site_id}'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Site2'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.sites_site_id_get",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#sites_site_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#utilization_get(opts = {}) ⇒ AccountUtilization

Get the utilizations of the account Get the utilizations for this account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



892
893
894
895
# File 'lib/siteimprove_api_client/api/general_api.rb', line 892

def utilization_get(opts = {})
  data, _status_code, _headers = utilization_get_with_http_info(opts)
  data
end

#utilization_get_with_http_info(opts = {}) ⇒ Array<(AccountUtilization, Integer, Hash)>

Get the utilizations of the account Get the utilizations for this account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AccountUtilization, Integer, Hash)>)

    AccountUtilization data, response status code and response headers



901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
# File 'lib/siteimprove_api_client/api/general_api.rb', line 901

def utilization_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralApi.utilization_get ...'
  end
  # resource path
  local_var_path = '/utilization'

  # query parameters
  query_params = opts[:query_params] || {}

  # 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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AccountUtilization'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"GeneralApi.utilization_get",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GeneralApi#utilization_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end