notifo-io 1.0.0.pre → 1.0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +726 -19
- data/Rakefile +0 -2
- data/docs/AddAllowedTopicDto.md +7 -0
- data/docs/AddContributorDto.md +4 -16
- data/docs/AppContributorDto.md +5 -18
- data/docs/AppDetailsDto.md +10 -44
- data/docs/AppDto.md +8 -24
- data/docs/AppIdMediaBody.md +7 -0
- data/docs/AppsApi.md +301 -297
- data/docs/AuthorizationApi.md +121 -0
- data/docs/Body.md +7 -0
- data/docs/ConfigsApi.md +21 -61
- data/docs/ConfiguredIntegrationDto.md +12 -0
- data/docs/ConfiguredIntegrationsDto.md +8 -0
- data/docs/ConfirmMode.md +2 -11
- data/docs/CreateEmailTemplateDto.md +3 -14
- data/docs/CreateIntegrationDto.md +11 -0
- data/docs/EmailTemplateDto.md +5 -18
- data/docs/EmailTemplatesDto.md +6 -0
- data/docs/EmailVerificationStatus.md +2 -11
- data/docs/ErrorDto.md +7 -22
- data/docs/EventDto.md +15 -36
- data/docs/EventProperties.md +6 -0
- data/docs/EventsApi.md +72 -65
- data/docs/IntegrationCreatedDto.md +8 -0
- data/docs/IntegrationDefinitionDto.md +11 -0
- data/docs/IntegrationProperties.md +6 -0
- data/docs/IntegrationPropertyDto.md +17 -0
- data/docs/IntegrationPropertyType.md +6 -0
- data/docs/IntegrationStatus.md +6 -0
- data/docs/IsoDayOfWeek.md +2 -11
- data/docs/ListResponseDtoOfEventDto.md +4 -16
- data/docs/ListResponseDtoOfLogEntryDto.md +4 -16
- data/docs/ListResponseDtoOfMediaDto.md +4 -16
- data/docs/ListResponseDtoOfMobilePushTokenDto.md +8 -0
- data/docs/ListResponseDtoOfNotificationDto.md +8 -0
- data/docs/ListResponseDtoOfSubscriptionDto.md +4 -16
- data/docs/ListResponseDtoOfTemplateDto.md +4 -16
- data/docs/ListResponseDtoOfTopicDto.md +4 -16
- data/docs/ListResponseDtoOfUserDto.md +4 -16
- data/docs/LocalizedText.md +6 -0
- data/docs/LogEntryDto.md +6 -20
- data/docs/LogsApi.md +21 -40
- data/docs/MediaApi.md +134 -141
- data/docs/MediaDto.md +9 -24
- data/docs/MediaMetadata.md +6 -0
- data/docs/MediaType.md +2 -11
- data/docs/MobileDeviceType.md +6 -0
- data/docs/MobilePushApi.md +135 -0
- data/docs/MobilePushTokenDto.md +8 -0
- data/docs/NotificationDto.md +21 -0
- data/docs/NotificationFormattingDto.md +10 -28
- data/docs/NotificationSend.md +6 -0
- data/docs/NotificationSettingDto.md +4 -16
- data/docs/NotificationsApi.md +141 -0
- data/docs/ProfileDto.md +14 -0
- data/docs/PublishDto.md +18 -0
- data/docs/PublishManyDto.md +7 -0
- data/docs/RegisterMobileTokenDto.md +8 -0
- data/docs/ResizeMode.md +2 -11
- data/docs/SchedulingDto.md +6 -20
- data/docs/SchedulingType.md +2 -11
- data/docs/SubscriptionDto.md +4 -16
- data/docs/TemplateDto.md +5 -18
- data/docs/TemplatesApi.md +51 -106
- data/docs/TopicDto.md +5 -18
- data/docs/TopicsApi.md +19 -230
- data/docs/TrackNotificationDto.md +10 -0
- data/docs/UpdateIntegrationDto.md +10 -0
- data/docs/UpdateProfileDto.md +12 -0
- data/docs/UpsertAppDto.md +12 -32
- data/docs/UpsertTemplateDto.md +5 -18
- data/docs/UpsertTemplatesDto.md +3 -14
- data/docs/UpsertUserDto.md +11 -28
- data/docs/UpsertUsersDto.md +3 -14
- data/docs/UserApi.md +231 -0
- data/docs/UserDto.md +15 -32
- data/docs/UserInfoApi.md +83 -0
- data/docs/UsersApi.md +144 -308
- data/git_push.sh +7 -10
- data/lib/notifo.rb +37 -11
- data/lib/notifo/api/apps_api.rb +373 -201
- data/lib/notifo/api/authorization_api.rb +158 -0
- data/lib/notifo/api/configs_api.rb +14 -30
- data/lib/notifo/api/events_api.rb +85 -45
- data/lib/notifo/api/logs_api.rb +12 -21
- data/lib/notifo/api/media_api.rb +137 -77
- data/lib/notifo/api/mobile_push_api.rb +178 -0
- data/lib/notifo/api/notifications_api.rb +181 -0
- data/lib/notifo/api/templates_api.rb +39 -62
- data/lib/notifo/api/topics_api.rb +12 -210
- data/lib/notifo/api/user_api.rb +294 -0
- data/lib/notifo/api/user_info_api.rb +112 -0
- data/lib/notifo/api/users_api.rb +121 -186
- data/lib/notifo/api_client.rb +53 -55
- data/lib/notifo/api_error.rb +5 -5
- data/lib/notifo/configuration.rb +8 -78
- data/lib/notifo/models/{add_allowed_topic_request.rb → add_allowed_topic_dto.rb} +21 -28
- data/lib/notifo/models/add_contributor_dto.rb +24 -26
- data/lib/notifo/models/app_contributor_dto.rb +30 -27
- data/lib/notifo/models/app_details_dto.rb +59 -119
- data/lib/notifo/models/app_dto.rb +51 -31
- data/lib/notifo/models/{inline_object.rb → app_id_media_body.rb} +16 -28
- data/lib/notifo/models/body.rb +206 -0
- data/lib/notifo/models/configured_integration_dto.rb +271 -0
- data/lib/notifo/models/configured_integrations_dto.rb +231 -0
- data/lib/notifo/models/confirm_mode.rb +7 -16
- data/lib/notifo/models/create_email_template_dto.rb +18 -25
- data/lib/notifo/models/create_integration_dto.rb +257 -0
- data/lib/notifo/models/email_template_dto.rb +25 -27
- data/lib/notifo/models/email_templates_dto.rb +201 -0
- data/lib/notifo/models/email_verification_status.rb +8 -17
- data/lib/notifo/models/error_dto.rb +17 -29
- data/lib/notifo/models/event_dto.rb +92 -46
- data/lib/notifo/models/event_properties.rb +201 -0
- data/lib/notifo/models/{subscribe_dto.rb → integration_created_dto.rb} +39 -42
- data/lib/notifo/models/integration_definition_dto.rb +272 -0
- data/lib/notifo/models/integration_properties.rb +201 -0
- data/lib/notifo/models/integration_property_dto.rb +319 -0
- data/lib/notifo/models/integration_property_type.rb +31 -0
- data/lib/notifo/models/integration_status.rb +29 -0
- data/lib/notifo/models/iso_day_of_week.rb +12 -21
- data/lib/notifo/models/list_response_dto_of_event_dto.rb +24 -26
- data/lib/notifo/models/list_response_dto_of_log_entry_dto.rb +24 -26
- data/lib/notifo/models/list_response_dto_of_media_dto.rb +24 -26
- data/lib/notifo/models/list_response_dto_of_mobile_push_token_dto.rb +229 -0
- data/lib/notifo/models/list_response_dto_of_notification_dto.rb +229 -0
- data/lib/notifo/models/list_response_dto_of_subscription_dto.rb +24 -26
- data/lib/notifo/models/list_response_dto_of_template_dto.rb +24 -26
- data/lib/notifo/models/list_response_dto_of_topic_dto.rb +24 -26
- data/lib/notifo/models/list_response_dto_of_user_dto.rb +24 -26
- data/lib/notifo/models/localized_text.rb +201 -0
- data/lib/notifo/models/log_entry_dto.rb +36 -28
- data/lib/notifo/models/media_dto.rb +64 -33
- data/lib/notifo/models/media_metadata.rb +201 -0
- data/lib/notifo/models/media_type.rb +8 -17
- data/lib/notifo/models/mobile_device_type.rb +29 -0
- data/lib/notifo/models/mobile_push_token_dto.rb +221 -0
- data/lib/notifo/models/notification_dto.rb +386 -0
- data/lib/notifo/models/notification_formatting_dto.rb +30 -46
- data/lib/notifo/models/notification_send.rb +30 -0
- data/lib/notifo/models/notification_setting_dto.rb +25 -34
- data/lib/notifo/models/profile_dto.rb +311 -0
- data/lib/notifo/models/{publish_request_dto.rb → publish_dto.rb} +55 -44
- data/lib/notifo/models/{publish_many_request_dto.rb → publish_many_dto.rb} +21 -28
- data/lib/notifo/models/register_mobile_token_dto.rb +221 -0
- data/lib/notifo/models/resize_mode.rb +11 -20
- data/lib/notifo/models/scheduling_dto.rb +16 -31
- data/lib/notifo/models/scheduling_type.rb +6 -15
- data/lib/notifo/models/subscription_dto.rb +23 -27
- data/lib/notifo/models/template_dto.rb +33 -29
- data/lib/notifo/models/topic_dto.rb +33 -28
- data/lib/notifo/models/track_notification_dto.rb +243 -0
- data/lib/notifo/models/update_integration_dto.rb +242 -0
- data/lib/notifo/models/update_profile_dto.rb +265 -0
- data/lib/notifo/models/upsert_app_dto.rb +22 -34
- data/lib/notifo/models/upsert_template_dto.rb +28 -29
- data/lib/notifo/models/upsert_templates_dto.rb +18 -25
- data/lib/notifo/models/upsert_user_dto.rb +35 -34
- data/lib/notifo/models/upsert_users_dto.rb +18 -25
- data/lib/notifo/models/user_dto.rb +100 -37
- data/lib/notifo/version.rb +4 -5
- data/notifo-io-1.0.1.1.gem +0 -0
- data/notifo.gemspec +10 -10
- data/spec/api/apps_api_spec.rb +14 -15
- data/spec/api/authorization_api_spec.rb +61 -0
- data/spec/api/configs_api_spec.rb +7 -8
- data/spec/api/events_api_spec.rb +8 -9
- data/spec/api/logs_api_spec.rb +7 -8
- data/spec/api/media_api_spec.rb +33 -12
- data/spec/api/mobile_push_api_spec.rb +66 -0
- data/spec/api/notifications_api_spec.rb +68 -0
- data/spec/api/templates_api_spec.rb +8 -9
- data/spec/api/topics_api_spec.rb +7 -44
- data/spec/api/user_api_spec.rb +91 -0
- data/spec/api/user_info_api_spec.rb +52 -0
- data/spec/api/users_api_spec.rb +10 -11
- data/spec/api_client_spec.rb +5 -6
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +4 -5
- data/spec/models/add_allowed_topic_dto_spec.rb +40 -0
- data/spec/models/add_contributor_dto_spec.rb +15 -9
- data/spec/models/app_contributor_dto_spec.rb +15 -9
- data/spec/models/app_details_dto_spec.rb +15 -9
- data/spec/models/app_dto_spec.rb +15 -9
- data/spec/models/app_id_media_body_spec.rb +40 -0
- data/spec/models/body_spec.rb +40 -0
- data/spec/models/configured_integration_dto_spec.rb +70 -0
- data/spec/models/configured_integrations_dto_spec.rb +46 -0
- data/spec/models/confirm_mode_spec.rb +15 -9
- data/spec/models/create_email_template_dto_spec.rb +15 -9
- data/spec/models/create_integration_dto_spec.rb +64 -0
- data/spec/models/email_template_dto_spec.rb +15 -9
- data/spec/models/email_templates_dto_spec.rb +34 -0
- data/spec/models/email_verification_status_spec.rb +15 -9
- data/spec/models/error_dto_spec.rb +15 -9
- data/spec/models/event_dto_spec.rb +15 -9
- data/spec/models/event_properties_spec.rb +34 -0
- data/spec/models/integration_created_dto_spec.rb +46 -0
- data/spec/models/integration_definition_dto_spec.rb +64 -0
- data/spec/models/integration_properties_spec.rb +34 -0
- data/spec/models/integration_property_dto_spec.rb +100 -0
- data/spec/models/integration_property_type_spec.rb +34 -0
- data/spec/models/integration_status_spec.rb +34 -0
- data/spec/models/iso_day_of_week_spec.rb +15 -9
- data/spec/models/list_response_dto_of_event_dto_spec.rb +15 -9
- data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +15 -9
- data/spec/models/list_response_dto_of_media_dto_spec.rb +15 -9
- data/spec/models/list_response_dto_of_mobile_push_token_dto_spec.rb +46 -0
- data/spec/models/list_response_dto_of_notification_dto_spec.rb +46 -0
- data/spec/models/list_response_dto_of_subscription_dto_spec.rb +15 -9
- data/spec/models/list_response_dto_of_template_dto_spec.rb +15 -9
- data/spec/models/list_response_dto_of_topic_dto_spec.rb +15 -9
- data/spec/models/list_response_dto_of_user_dto_spec.rb +15 -9
- data/spec/models/localized_text_spec.rb +34 -0
- data/spec/models/log_entry_dto_spec.rb +15 -9
- data/spec/models/media_dto_spec.rb +21 -9
- data/spec/models/media_metadata_spec.rb +34 -0
- data/spec/models/media_type_spec.rb +15 -9
- data/spec/models/mobile_device_type_spec.rb +34 -0
- data/spec/models/mobile_push_token_dto_spec.rb +46 -0
- data/spec/models/notification_dto_spec.rb +124 -0
- data/spec/models/notification_formatting_dto_spec.rb +15 -9
- data/spec/models/notification_send_spec.rb +34 -0
- data/spec/models/notification_setting_dto_spec.rb +16 -10
- data/spec/models/profile_dto_spec.rb +82 -0
- data/spec/models/{publish_request_dto_spec.rb → publish_dto_spec.rb} +18 -12
- data/spec/models/publish_many_dto_spec.rb +40 -0
- data/spec/models/register_mobile_token_dto_spec.rb +46 -0
- data/spec/models/resize_mode_spec.rb +15 -9
- data/spec/models/scheduling_dto_spec.rb +15 -9
- data/spec/models/scheduling_type_spec.rb +15 -9
- data/spec/models/subscription_dto_spec.rb +15 -9
- data/spec/models/template_dto_spec.rb +15 -9
- data/spec/models/topic_dto_spec.rb +15 -9
- data/spec/models/track_notification_dto_spec.rb +58 -0
- data/spec/models/update_integration_dto_spec.rb +58 -0
- data/spec/models/update_profile_dto_spec.rb +70 -0
- data/spec/models/upsert_app_dto_spec.rb +15 -9
- data/spec/models/upsert_template_dto_spec.rb +15 -9
- data/spec/models/upsert_templates_dto_spec.rb +15 -9
- data/spec/models/upsert_user_dto_spec.rb +15 -9
- data/spec/models/upsert_users_dto_spec.rb +15 -9
- data/spec/models/user_dto_spec.rb +15 -9
- data/spec/spec_helper.rb +4 -5
- metadata +167 -30
- data/docs/AddAllowedTopicRequest.md +0 -18
- data/docs/InlineObject.md +0 -18
- data/docs/PublishManyRequestDto.md +0 -18
- data/docs/PublishRequestDto.md +0 -36
- data/docs/SubscribeDto.md +0 -20
- data/notifo-io-1.0.0.gem +0 -0
- data/notifo-io-1.0.0.pre.beta.gem +0 -0
- data/spec/models/add_allowed_topic_request_spec.rb +0 -34
- data/spec/models/inline_object_spec.rb +0 -34
- data/spec/models/publish_many_request_dto_spec.rb +0 -34
- data/spec/models/subscribe_dto_spec.rb +0 -40
@@ -0,0 +1,178 @@
|
|
1
|
+
=begin
|
2
|
+
#Notifo API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.26
|
10
|
+
=end
|
11
|
+
|
12
|
+
module Notifo
|
13
|
+
class MobilePushApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# Deletes a mobile push token for the current user.
|
20
|
+
# @param token The token to remove.
|
21
|
+
# @param [Hash] opts the optional parameters
|
22
|
+
# @return [nil]
|
23
|
+
def mobile_push_delete_token(token, opts = {})
|
24
|
+
mobile_push_delete_token_with_http_info(token, opts)
|
25
|
+
nil
|
26
|
+
end
|
27
|
+
|
28
|
+
# Deletes a mobile push token for the current user.
|
29
|
+
# @param token The token to remove.
|
30
|
+
# @param [Hash] opts the optional parameters
|
31
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
32
|
+
def mobile_push_delete_token_with_http_info(token, opts = {})
|
33
|
+
if @api_client.config.debugging
|
34
|
+
@api_client.config.logger.debug 'Calling API: MobilePushApi.mobile_push_delete_token ...'
|
35
|
+
end
|
36
|
+
# verify the required parameter 'token' is set
|
37
|
+
if @api_client.config.client_side_validation && token.nil?
|
38
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling MobilePushApi.mobile_push_delete_token"
|
39
|
+
end
|
40
|
+
# resource path
|
41
|
+
local_var_path = '/api/me/mobilepush/{token}'.sub('{' + 'token' + '}', token.to_s)
|
42
|
+
|
43
|
+
# query parameters
|
44
|
+
query_params = opts[:query_params] || {}
|
45
|
+
|
46
|
+
# header parameters
|
47
|
+
header_params = opts[:header_params] || {}
|
48
|
+
# HTTP header 'Accept' (if needed)
|
49
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
50
|
+
|
51
|
+
# form parameters
|
52
|
+
form_params = opts[:form_params] || {}
|
53
|
+
|
54
|
+
# http body (model)
|
55
|
+
post_body = opts[:body]
|
56
|
+
|
57
|
+
return_type = opts[:return_type]
|
58
|
+
|
59
|
+
auth_names = opts[:auth_names] || []
|
60
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
61
|
+
:header_params => header_params,
|
62
|
+
:query_params => query_params,
|
63
|
+
:form_params => form_params,
|
64
|
+
:body => post_body,
|
65
|
+
:auth_names => auth_names,
|
66
|
+
:return_type => return_type)
|
67
|
+
|
68
|
+
if @api_client.config.debugging
|
69
|
+
@api_client.config.logger.debug "API called: MobilePushApi#mobile_push_delete_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
70
|
+
end
|
71
|
+
return data, status_code, headers
|
72
|
+
end
|
73
|
+
# Returns the mobile push tokens.
|
74
|
+
# @param [Hash] opts the optional parameters
|
75
|
+
# @return [ListResponseDtoOfMobilePushTokenDto]
|
76
|
+
def mobile_push_get_tokens(opts = {})
|
77
|
+
data, _status_code, _headers = mobile_push_get_tokens_with_http_info(opts)
|
78
|
+
data
|
79
|
+
end
|
80
|
+
|
81
|
+
# Returns the mobile push tokens.
|
82
|
+
# @param [Hash] opts the optional parameters
|
83
|
+
# @return [Array<(ListResponseDtoOfMobilePushTokenDto, Integer, Hash)>] ListResponseDtoOfMobilePushTokenDto data, response status code and response headers
|
84
|
+
def mobile_push_get_tokens_with_http_info(opts = {})
|
85
|
+
if @api_client.config.debugging
|
86
|
+
@api_client.config.logger.debug 'Calling API: MobilePushApi.mobile_push_get_tokens ...'
|
87
|
+
end
|
88
|
+
# resource path
|
89
|
+
local_var_path = '/api/me/mobilepush'
|
90
|
+
|
91
|
+
# query parameters
|
92
|
+
query_params = opts[:query_params] || {}
|
93
|
+
|
94
|
+
# header parameters
|
95
|
+
header_params = opts[:header_params] || {}
|
96
|
+
# HTTP header 'Accept' (if needed)
|
97
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
98
|
+
|
99
|
+
# form parameters
|
100
|
+
form_params = opts[:form_params] || {}
|
101
|
+
|
102
|
+
# http body (model)
|
103
|
+
post_body = opts[:body]
|
104
|
+
|
105
|
+
return_type = opts[:return_type] || 'ListResponseDtoOfMobilePushTokenDto'
|
106
|
+
|
107
|
+
auth_names = opts[:auth_names] || []
|
108
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
109
|
+
:header_params => header_params,
|
110
|
+
:query_params => query_params,
|
111
|
+
:form_params => form_params,
|
112
|
+
:body => post_body,
|
113
|
+
:auth_names => auth_names,
|
114
|
+
:return_type => return_type)
|
115
|
+
|
116
|
+
if @api_client.config.debugging
|
117
|
+
@api_client.config.logger.debug "API called: MobilePushApi#mobile_push_get_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
118
|
+
end
|
119
|
+
return data, status_code, headers
|
120
|
+
end
|
121
|
+
# Register a mobile push token for the current user.
|
122
|
+
# @param body The request object.
|
123
|
+
# @param [Hash] opts the optional parameters
|
124
|
+
# @return [nil]
|
125
|
+
def mobile_push_post_token(body, opts = {})
|
126
|
+
mobile_push_post_token_with_http_info(body, opts)
|
127
|
+
nil
|
128
|
+
end
|
129
|
+
|
130
|
+
# Register a mobile push token for the current user.
|
131
|
+
# @param body The request object.
|
132
|
+
# @param [Hash] opts the optional parameters
|
133
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
134
|
+
def mobile_push_post_token_with_http_info(body, opts = {})
|
135
|
+
if @api_client.config.debugging
|
136
|
+
@api_client.config.logger.debug 'Calling API: MobilePushApi.mobile_push_post_token ...'
|
137
|
+
end
|
138
|
+
# verify the required parameter 'body' is set
|
139
|
+
if @api_client.config.client_side_validation && body.nil?
|
140
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MobilePushApi.mobile_push_post_token"
|
141
|
+
end
|
142
|
+
# resource path
|
143
|
+
local_var_path = '/api/me/mobilepush'
|
144
|
+
|
145
|
+
# query parameters
|
146
|
+
query_params = opts[:query_params] || {}
|
147
|
+
|
148
|
+
# header parameters
|
149
|
+
header_params = opts[:header_params] || {}
|
150
|
+
# HTTP header 'Accept' (if needed)
|
151
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
152
|
+
# HTTP header 'Content-Type'
|
153
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
154
|
+
|
155
|
+
# form parameters
|
156
|
+
form_params = opts[:form_params] || {}
|
157
|
+
|
158
|
+
# http body (model)
|
159
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
160
|
+
|
161
|
+
return_type = opts[:return_type]
|
162
|
+
|
163
|
+
auth_names = opts[:auth_names] || []
|
164
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
165
|
+
:header_params => header_params,
|
166
|
+
:query_params => query_params,
|
167
|
+
:form_params => form_params,
|
168
|
+
:body => post_body,
|
169
|
+
:auth_names => auth_names,
|
170
|
+
:return_type => return_type)
|
171
|
+
|
172
|
+
if @api_client.config.debugging
|
173
|
+
@api_client.config.logger.debug "API called: MobilePushApi#mobile_push_post_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
174
|
+
end
|
175
|
+
return data, status_code, headers
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
@@ -0,0 +1,181 @@
|
|
1
|
+
=begin
|
2
|
+
#Notifo API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.26
|
10
|
+
=end
|
11
|
+
|
12
|
+
module Notifo
|
13
|
+
class NotificationsApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# Confirms the user notifications for the current user.
|
20
|
+
# @param body The request object.
|
21
|
+
# @param [Hash] opts the optional parameters
|
22
|
+
# @return [nil]
|
23
|
+
def notifications_confirm(body, opts = {})
|
24
|
+
notifications_confirm_with_http_info(body, opts)
|
25
|
+
nil
|
26
|
+
end
|
27
|
+
|
28
|
+
# Confirms the user notifications for the current user.
|
29
|
+
# @param body The request object.
|
30
|
+
# @param [Hash] opts the optional parameters
|
31
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
32
|
+
def notifications_confirm_with_http_info(body, opts = {})
|
33
|
+
if @api_client.config.debugging
|
34
|
+
@api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_confirm ...'
|
35
|
+
end
|
36
|
+
# verify the required parameter 'body' is set
|
37
|
+
if @api_client.config.client_side_validation && body.nil?
|
38
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling NotificationsApi.notifications_confirm"
|
39
|
+
end
|
40
|
+
# resource path
|
41
|
+
local_var_path = '/api/me/notifications/handled'
|
42
|
+
|
43
|
+
# query parameters
|
44
|
+
query_params = opts[:query_params] || {}
|
45
|
+
|
46
|
+
# header parameters
|
47
|
+
header_params = opts[:header_params] || {}
|
48
|
+
# HTTP header 'Accept' (if needed)
|
49
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
50
|
+
# HTTP header 'Content-Type'
|
51
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
52
|
+
|
53
|
+
# form parameters
|
54
|
+
form_params = opts[:form_params] || {}
|
55
|
+
|
56
|
+
# http body (model)
|
57
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
58
|
+
|
59
|
+
return_type = opts[:return_type]
|
60
|
+
|
61
|
+
auth_names = opts[:auth_names] || []
|
62
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
63
|
+
:header_params => header_params,
|
64
|
+
:query_params => query_params,
|
65
|
+
:form_params => form_params,
|
66
|
+
:body => post_body,
|
67
|
+
:auth_names => auth_names,
|
68
|
+
:return_type => return_type)
|
69
|
+
|
70
|
+
if @api_client.config.debugging
|
71
|
+
@api_client.config.logger.debug "API called: NotificationsApi#notifications_confirm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
72
|
+
end
|
73
|
+
return data, status_code, headers
|
74
|
+
end
|
75
|
+
# Query archhived user notifications of the current user.
|
76
|
+
# @param [Hash] opts the optional parameters
|
77
|
+
# @return [ListResponseDtoOfNotificationDto]
|
78
|
+
def notifications_get_archive(opts = {})
|
79
|
+
data, _status_code, _headers = notifications_get_archive_with_http_info(opts)
|
80
|
+
data
|
81
|
+
end
|
82
|
+
|
83
|
+
# Query archhived user notifications of the current user.
|
84
|
+
# @param [Hash] opts the optional parameters
|
85
|
+
# @return [Array<(ListResponseDtoOfNotificationDto, Integer, Hash)>] ListResponseDtoOfNotificationDto data, response status code and response headers
|
86
|
+
def notifications_get_archive_with_http_info(opts = {})
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_get_archive ...'
|
89
|
+
end
|
90
|
+
# resource path
|
91
|
+
local_var_path = '/api/me/notifications/archive'
|
92
|
+
|
93
|
+
# query parameters
|
94
|
+
query_params = opts[:query_params] || {}
|
95
|
+
|
96
|
+
# header parameters
|
97
|
+
header_params = opts[:header_params] || {}
|
98
|
+
# HTTP header 'Accept' (if needed)
|
99
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
100
|
+
|
101
|
+
# form parameters
|
102
|
+
form_params = opts[:form_params] || {}
|
103
|
+
|
104
|
+
# http body (model)
|
105
|
+
post_body = opts[:body]
|
106
|
+
|
107
|
+
return_type = opts[:return_type] || 'ListResponseDtoOfNotificationDto'
|
108
|
+
|
109
|
+
auth_names = opts[:auth_names] || []
|
110
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
111
|
+
:header_params => header_params,
|
112
|
+
:query_params => query_params,
|
113
|
+
:form_params => form_params,
|
114
|
+
:body => post_body,
|
115
|
+
:auth_names => auth_names,
|
116
|
+
:return_type => return_type)
|
117
|
+
|
118
|
+
if @api_client.config.debugging
|
119
|
+
@api_client.config.logger.debug "API called: NotificationsApi#notifications_get_archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
120
|
+
end
|
121
|
+
return data, status_code, headers
|
122
|
+
end
|
123
|
+
# Query user notifications of the current user.
|
124
|
+
# @param [Hash] opts the optional parameters
|
125
|
+
# @option opts [String] :query The optional query to search for items.
|
126
|
+
# @option opts [Integer] :take The number of items to return.
|
127
|
+
# @option opts [Integer] :skip The number of items to skip.
|
128
|
+
# @return [ListResponseDtoOfNotificationDto]
|
129
|
+
def notifications_get_notifications(opts = {})
|
130
|
+
data, _status_code, _headers = notifications_get_notifications_with_http_info(opts)
|
131
|
+
data
|
132
|
+
end
|
133
|
+
|
134
|
+
# Query user notifications of the current user.
|
135
|
+
# @param [Hash] opts the optional parameters
|
136
|
+
# @option opts [String] :query The optional query to search for items.
|
137
|
+
# @option opts [Integer] :take The number of items to return.
|
138
|
+
# @option opts [Integer] :skip The number of items to skip.
|
139
|
+
# @return [Array<(ListResponseDtoOfNotificationDto, Integer, Hash)>] ListResponseDtoOfNotificationDto data, response status code and response headers
|
140
|
+
def notifications_get_notifications_with_http_info(opts = {})
|
141
|
+
if @api_client.config.debugging
|
142
|
+
@api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_get_notifications ...'
|
143
|
+
end
|
144
|
+
# resource path
|
145
|
+
local_var_path = '/api/me/notifications'
|
146
|
+
|
147
|
+
# query parameters
|
148
|
+
query_params = opts[:query_params] || {}
|
149
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
150
|
+
query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
|
151
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
152
|
+
|
153
|
+
# header parameters
|
154
|
+
header_params = opts[:header_params] || {}
|
155
|
+
# HTTP header 'Accept' (if needed)
|
156
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
157
|
+
|
158
|
+
# form parameters
|
159
|
+
form_params = opts[:form_params] || {}
|
160
|
+
|
161
|
+
# http body (model)
|
162
|
+
post_body = opts[:body]
|
163
|
+
|
164
|
+
return_type = opts[:return_type] || 'ListResponseDtoOfNotificationDto'
|
165
|
+
|
166
|
+
auth_names = opts[:auth_names] || []
|
167
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
168
|
+
:header_params => header_params,
|
169
|
+
:query_params => query_params,
|
170
|
+
:form_params => form_params,
|
171
|
+
:body => post_body,
|
172
|
+
:auth_names => auth_names,
|
173
|
+
:return_type => return_type)
|
174
|
+
|
175
|
+
if @api_client.config.debugging
|
176
|
+
@api_client.config.logger.debug "API called: NotificationsApi#notifications_get_notifications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
177
|
+
end
|
178
|
+
return data, status_code, headers
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
@@ -1,17 +1,14 @@
|
|
1
1
|
=begin
|
2
2
|
#Notifo API
|
3
3
|
|
4
|
-
#No description provided (generated by
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
6
|
+
OpenAPI spec version: 1.0.0
|
10
7
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.26
|
11
10
|
=end
|
12
11
|
|
13
|
-
require 'cgi'
|
14
|
-
|
15
12
|
module Notifo
|
16
13
|
class TemplatesApi
|
17
14
|
attr_accessor :api_client
|
@@ -20,8 +17,8 @@ module Notifo
|
|
20
17
|
@api_client = api_client
|
21
18
|
end
|
22
19
|
# Delete a template.
|
23
|
-
# @param app_id
|
24
|
-
# @param code
|
20
|
+
# @param app_id The app where the templates belong to.
|
21
|
+
# @param code The template code to delete.
|
25
22
|
# @param [Hash] opts the optional parameters
|
26
23
|
# @return [ListResponseDtoOfTemplateDto]
|
27
24
|
def templates_delete_template(app_id, code, opts = {})
|
@@ -30,8 +27,8 @@ module Notifo
|
|
30
27
|
end
|
31
28
|
|
32
29
|
# Delete a template.
|
33
|
-
# @param app_id
|
34
|
-
# @param code
|
30
|
+
# @param app_id The app where the templates belong to.
|
31
|
+
# @param code The template code to delete.
|
35
32
|
# @param [Hash] opts the optional parameters
|
36
33
|
# @return [Array<(ListResponseDtoOfTemplateDto, Integer, Hash)>] ListResponseDtoOfTemplateDto data, response status code and response headers
|
37
34
|
def templates_delete_template_with_http_info(app_id, code, opts = {})
|
@@ -47,7 +44,7 @@ module Notifo
|
|
47
44
|
fail ArgumentError, "Missing the required parameter 'code' when calling TemplatesApi.templates_delete_template"
|
48
45
|
end
|
49
46
|
# resource path
|
50
|
-
local_var_path = '/api/apps/{appId}/templates/{code}'.sub('{' + 'appId' + '}',
|
47
|
+
local_var_path = '/api/apps/{appId}/templates/{code}'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'code' + '}', code.to_s)
|
51
48
|
|
52
49
|
# query parameters
|
53
50
|
query_params = opts[:query_params] || {}
|
@@ -61,33 +58,26 @@ module Notifo
|
|
61
58
|
form_params = opts[:form_params] || {}
|
62
59
|
|
63
60
|
# http body (model)
|
64
|
-
post_body = opts[:
|
65
|
-
|
66
|
-
# return_type
|
67
|
-
return_type = opts[:debug_return_type] || 'ListResponseDtoOfTemplateDto'
|
61
|
+
post_body = opts[:body]
|
68
62
|
|
69
|
-
|
70
|
-
auth_names = opts[:debug_auth_names] || []
|
63
|
+
return_type = opts[:return_type] || 'ListResponseDtoOfTemplateDto'
|
71
64
|
|
72
|
-
|
73
|
-
|
65
|
+
auth_names = opts[:auth_names] || []
|
66
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
74
67
|
:header_params => header_params,
|
75
68
|
:query_params => query_params,
|
76
69
|
:form_params => form_params,
|
77
70
|
:body => post_body,
|
78
71
|
:auth_names => auth_names,
|
79
|
-
:return_type => return_type
|
80
|
-
)
|
72
|
+
:return_type => return_type)
|
81
73
|
|
82
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
83
74
|
if @api_client.config.debugging
|
84
75
|
@api_client.config.logger.debug "API called: TemplatesApi#templates_delete_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
76
|
end
|
86
77
|
return data, status_code, headers
|
87
78
|
end
|
88
|
-
|
89
79
|
# Query templates.
|
90
|
-
# @param app_id
|
80
|
+
# @param app_id The app where the templates belongs to.
|
91
81
|
# @param [Hash] opts the optional parameters
|
92
82
|
# @option opts [String] :query The optional query to search for items.
|
93
83
|
# @option opts [Integer] :take The number of items to return.
|
@@ -99,7 +89,7 @@ module Notifo
|
|
99
89
|
end
|
100
90
|
|
101
91
|
# Query templates.
|
102
|
-
# @param app_id
|
92
|
+
# @param app_id The app where the templates belongs to.
|
103
93
|
# @param [Hash] opts the optional parameters
|
104
94
|
# @option opts [String] :query The optional query to search for items.
|
105
95
|
# @option opts [Integer] :take The number of items to return.
|
@@ -114,7 +104,7 @@ module Notifo
|
|
114
104
|
fail ArgumentError, "Missing the required parameter 'app_id' when calling TemplatesApi.templates_get_templates"
|
115
105
|
end
|
116
106
|
# resource path
|
117
|
-
local_var_path = '/api/apps/{appId}/templates'.sub('{' + 'appId' + '}',
|
107
|
+
local_var_path = '/api/apps/{appId}/templates'.sub('{' + 'appId' + '}', app_id.to_s)
|
118
108
|
|
119
109
|
# query parameters
|
120
110
|
query_params = opts[:query_params] || {}
|
@@ -131,60 +121,53 @@ module Notifo
|
|
131
121
|
form_params = opts[:form_params] || {}
|
132
122
|
|
133
123
|
# http body (model)
|
134
|
-
post_body = opts[:
|
135
|
-
|
136
|
-
# return_type
|
137
|
-
return_type = opts[:debug_return_type] || 'ListResponseDtoOfTemplateDto'
|
124
|
+
post_body = opts[:body]
|
138
125
|
|
139
|
-
|
140
|
-
auth_names = opts[:debug_auth_names] || []
|
126
|
+
return_type = opts[:return_type] || 'ListResponseDtoOfTemplateDto'
|
141
127
|
|
142
|
-
|
143
|
-
|
128
|
+
auth_names = opts[:auth_names] || []
|
129
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
144
130
|
:header_params => header_params,
|
145
131
|
:query_params => query_params,
|
146
132
|
:form_params => form_params,
|
147
133
|
:body => post_body,
|
148
134
|
:auth_names => auth_names,
|
149
|
-
:return_type => return_type
|
150
|
-
)
|
135
|
+
:return_type => return_type)
|
151
136
|
|
152
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
153
137
|
if @api_client.config.debugging
|
154
138
|
@api_client.config.logger.debug "API called: TemplatesApi#templates_get_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
155
139
|
end
|
156
140
|
return data, status_code, headers
|
157
141
|
end
|
158
|
-
|
159
142
|
# Upsert templates.
|
160
|
-
# @param
|
161
|
-
# @param
|
143
|
+
# @param body The upsert request.
|
144
|
+
# @param app_id The app where the templates belong to.
|
162
145
|
# @param [Hash] opts the optional parameters
|
163
146
|
# @return [Array<TemplateDto>]
|
164
|
-
def templates_post_templates(
|
165
|
-
data, _status_code, _headers = templates_post_templates_with_http_info(
|
147
|
+
def templates_post_templates(body, app_id, opts = {})
|
148
|
+
data, _status_code, _headers = templates_post_templates_with_http_info(body, app_id, opts)
|
166
149
|
data
|
167
150
|
end
|
168
151
|
|
169
152
|
# Upsert templates.
|
170
|
-
# @param
|
171
|
-
# @param
|
153
|
+
# @param body The upsert request.
|
154
|
+
# @param app_id The app where the templates belong to.
|
172
155
|
# @param [Hash] opts the optional parameters
|
173
156
|
# @return [Array<(Array<TemplateDto>, Integer, Hash)>] Array<TemplateDto> data, response status code and response headers
|
174
|
-
def templates_post_templates_with_http_info(
|
157
|
+
def templates_post_templates_with_http_info(body, app_id, opts = {})
|
175
158
|
if @api_client.config.debugging
|
176
159
|
@api_client.config.logger.debug 'Calling API: TemplatesApi.templates_post_templates ...'
|
177
160
|
end
|
161
|
+
# verify the required parameter 'body' is set
|
162
|
+
if @api_client.config.client_side_validation && body.nil?
|
163
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling TemplatesApi.templates_post_templates"
|
164
|
+
end
|
178
165
|
# verify the required parameter 'app_id' is set
|
179
166
|
if @api_client.config.client_side_validation && app_id.nil?
|
180
167
|
fail ArgumentError, "Missing the required parameter 'app_id' when calling TemplatesApi.templates_post_templates"
|
181
168
|
end
|
182
|
-
# verify the required parameter 'upsert_templates_dto' is set
|
183
|
-
if @api_client.config.client_side_validation && upsert_templates_dto.nil?
|
184
|
-
fail ArgumentError, "Missing the required parameter 'upsert_templates_dto' when calling TemplatesApi.templates_post_templates"
|
185
|
-
end
|
186
169
|
# resource path
|
187
|
-
local_var_path = '/api/apps/{appId}/templates'.sub('{' + 'appId' + '}',
|
170
|
+
local_var_path = '/api/apps/{appId}/templates'.sub('{' + 'appId' + '}', app_id.to_s)
|
188
171
|
|
189
172
|
# query parameters
|
190
173
|
query_params = opts[:query_params] || {}
|
@@ -200,25 +183,19 @@ module Notifo
|
|
200
183
|
form_params = opts[:form_params] || {}
|
201
184
|
|
202
185
|
# http body (model)
|
203
|
-
post_body = opts[:
|
204
|
-
|
205
|
-
# return_type
|
206
|
-
return_type = opts[:debug_return_type] || 'Array<TemplateDto>'
|
186
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
207
187
|
|
208
|
-
|
209
|
-
auth_names = opts[:debug_auth_names] || []
|
188
|
+
return_type = opts[:return_type] || 'Array<TemplateDto>'
|
210
189
|
|
211
|
-
|
212
|
-
|
190
|
+
auth_names = opts[:auth_names] || []
|
191
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
213
192
|
:header_params => header_params,
|
214
193
|
:query_params => query_params,
|
215
194
|
:form_params => form_params,
|
216
195
|
:body => post_body,
|
217
196
|
:auth_names => auth_names,
|
218
|
-
:return_type => return_type
|
219
|
-
)
|
197
|
+
:return_type => return_type)
|
220
198
|
|
221
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
222
199
|
if @api_client.config.debugging
|
223
200
|
@api_client.config.logger.debug "API called: TemplatesApi#templates_post_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
224
201
|
end
|