Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions generated/activitysmith_openapi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
require 'activitysmith_openapi/configuration'

# Models
require 'activitysmith_openapi/models/account_device'
require 'activitysmith_openapi/models/account_device_list_response'
require 'activitysmith_openapi/models/account_device_list_response_meta'
require 'activitysmith_openapi/models/activity_metric'
require 'activitysmith_openapi/models/activity_metric_value'
require 'activitysmith_openapi/models/alert_payload'
Expand Down Expand Up @@ -74,6 +77,7 @@

# APIs
require 'activitysmith_openapi/api/app_icon_badges_api'
require 'activitysmith_openapi/api/devices_api'
require 'activitysmith_openapi/api/live_activities_api'
require 'activitysmith_openapi/api/metrics_api'
require 'activitysmith_openapi/api/push_notifications_api'
Expand Down
100 changes: 100 additions & 0 deletions generated/activitysmith_openapi/api/devices_api.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
=begin
#ActivitySmith API

#Send push notifications and Live Activities to your own devices via a single API key.

The version of the OpenAPI document: 1.0.0

Generated by: https://openapi-generator.tech
Generator version: 7.7.0

=end

require 'cgi'

module OpenapiClient
class DevicesApi
attr_accessor :api_client

def initialize(api_client = ApiClient.default)
@api_client = api_client
end
# List paired devices
# Lists the iPhones and iPads paired to the account, active devices first. Use it to check that a device is paired before you send, or to find device IDs for Channels. An empty list means no device is paired yet: install the ActivitySmith app from the App Store and sign in. Channel-scoped API keys cannot list devices.
# @param [Hash] opts the optional parameters
# @option opts [Integer] :limit Maximum devices to return, 1 to 100. Defaults to 100. (default to 100)
# @option opts [Integer] :offset Devices to skip. Use meta.next_offset from the previous page. (default to 0)
# @option opts [Boolean] :include_inactive Include devices that can no longer receive deliveries, such as unpaired phones. (default to false)
# @return [AccountDeviceListResponse]
def list_account_devices(opts = {})
data, _status_code, _headers = list_account_devices_with_http_info(opts)
data
end

# List paired devices
# Lists the iPhones and iPads paired to the account, active devices first. Use it to check that a device is paired before you send, or to find device IDs for Channels. An empty list means no device is paired yet: install the ActivitySmith app from the App Store and sign in. Channel-scoped API keys cannot list devices.
# @param [Hash] opts the optional parameters
# @option opts [Integer] :limit Maximum devices to return, 1 to 100. Defaults to 100. (default to 100)
# @option opts [Integer] :offset Devices to skip. Use meta.next_offset from the previous page. (default to 0)
# @option opts [Boolean] :include_inactive Include devices that can no longer receive deliveries, such as unpaired phones. (default to false)
# @return [Array<(AccountDeviceListResponse, Integer, Hash)>] AccountDeviceListResponse data, response status code and response headers
def list_account_devices_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DevicesApi.list_account_devices ...'
end
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevicesApi.list_account_devices, must be smaller than or equal to 100.'
end

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

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

# resource path
local_var_path = '/account/devices'

# query parameters
query_params = opts[:query_params] || {}
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
query_params[:'include_inactive'] = opts[:'include_inactive'] if !opts[:'include_inactive'].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] || 'AccountDeviceListResponse'

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

new_options = opts.merge(
:operation => :"DevicesApi.list_account_devices",
: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: DevicesApi#list_account_devices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
end
end
Loading
Loading