notifo-io-easierlife 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +167 -0
  4. data/Rakefile +10 -0
  5. data/docs/AddAllowedTopicDto.md +18 -0
  6. data/docs/AddContributorDto.md +20 -0
  7. data/docs/AppContributorDto.md +22 -0
  8. data/docs/AppDetailsDto.md +48 -0
  9. data/docs/AppDto.md +28 -0
  10. data/docs/AppsApi.md +646 -0
  11. data/docs/ConfigsApi.md +127 -0
  12. data/docs/ConfirmMode.md +15 -0
  13. data/docs/CreateEmailTemplateDto.md +18 -0
  14. data/docs/EmailTemplateDto.md +22 -0
  15. data/docs/EmailVerificationStatus.md +15 -0
  16. data/docs/ErrorDto.md +26 -0
  17. data/docs/EventDto.md +40 -0
  18. data/docs/EventsApi.md +142 -0
  19. data/docs/IsoDayOfWeek.md +15 -0
  20. data/docs/ListResponseDtoOfEventDto.md +20 -0
  21. data/docs/ListResponseDtoOfLogEntryDto.md +20 -0
  22. data/docs/ListResponseDtoOfMediaDto.md +20 -0
  23. data/docs/ListResponseDtoOfSubscriptionDto.md +20 -0
  24. data/docs/ListResponseDtoOfTemplateDto.md +20 -0
  25. data/docs/ListResponseDtoOfTopicDto.md +20 -0
  26. data/docs/ListResponseDtoOfUserDto.md +20 -0
  27. data/docs/LogEntryDto.md +24 -0
  28. data/docs/LogsApi.md +78 -0
  29. data/docs/MediaApi.md +382 -0
  30. data/docs/MediaDto.md +30 -0
  31. data/docs/MediaType.md +15 -0
  32. data/docs/NotificationFormattingDto.md +32 -0
  33. data/docs/NotificationSend.md +15 -0
  34. data/docs/NotificationSettingDto.md +20 -0
  35. data/docs/ProfileDto.md +32 -0
  36. data/docs/PublishDto.md +36 -0
  37. data/docs/PublishManyDto.md +18 -0
  38. data/docs/ResizeMode.md +15 -0
  39. data/docs/SchedulingDto.md +24 -0
  40. data/docs/SchedulingType.md +15 -0
  41. data/docs/SubscriptionDto.md +20 -0
  42. data/docs/TemplateDto.md +22 -0
  43. data/docs/TemplatesApi.md +208 -0
  44. data/docs/TopicDto.md +22 -0
  45. data/docs/TopicsApi.md +78 -0
  46. data/docs/UpdateProfileDto.md +28 -0
  47. data/docs/UpsertAppDto.md +36 -0
  48. data/docs/UpsertTemplateDto.md +22 -0
  49. data/docs/UpsertTemplatesDto.md +18 -0
  50. data/docs/UpsertUserDto.md +32 -0
  51. data/docs/UpsertUsersDto.md +18 -0
  52. data/docs/UserApi.md +323 -0
  53. data/docs/UserDto.md +36 -0
  54. data/docs/UsersApi.md +610 -0
  55. data/git_push.sh +58 -0
  56. data/lib/notifo.rb +89 -0
  57. data/lib/notifo/api/apps_api.rb +678 -0
  58. data/lib/notifo/api/configs_api.rb +132 -0
  59. data/lib/notifo/api/events_api.rb +161 -0
  60. data/lib/notifo/api/logs_api.rb +92 -0
  61. data/lib/notifo/api/media_api.rb +419 -0
  62. data/lib/notifo/api/templates_api.rb +228 -0
  63. data/lib/notifo/api/topics_api.rb +92 -0
  64. data/lib/notifo/api/user_api.rb +331 -0
  65. data/lib/notifo/api/users_api.rb +667 -0
  66. data/lib/notifo/api_client.rb +389 -0
  67. data/lib/notifo/api_error.rb +57 -0
  68. data/lib/notifo/configuration.rb +270 -0
  69. data/lib/notifo/models/add_allowed_topic_dto.rb +243 -0
  70. data/lib/notifo/models/add_contributor_dto.rb +277 -0
  71. data/lib/notifo/models/app_contributor_dto.rb +311 -0
  72. data/lib/notifo/models/app_details_dto.rb +489 -0
  73. data/lib/notifo/models/app_dto.rb +362 -0
  74. data/lib/notifo/models/confirm_mode.rb +38 -0
  75. data/lib/notifo/models/create_email_template_dto.rb +243 -0
  76. data/lib/notifo/models/email_template_dto.rb +288 -0
  77. data/lib/notifo/models/email_verification_status.rb +39 -0
  78. data/lib/notifo/models/error_dto.rb +265 -0
  79. data/lib/notifo/models/event_dto.rb +456 -0
  80. data/lib/notifo/models/iso_day_of_week.rb +43 -0
  81. data/lib/notifo/models/list_response_dto_of_event_dto.rb +241 -0
  82. data/lib/notifo/models/list_response_dto_of_log_entry_dto.rb +241 -0
  83. data/lib/notifo/models/list_response_dto_of_media_dto.rb +241 -0
  84. data/lib/notifo/models/list_response_dto_of_subscription_dto.rb +241 -0
  85. data/lib/notifo/models/list_response_dto_of_template_dto.rb +241 -0
  86. data/lib/notifo/models/list_response_dto_of_topic_dto.rb +241 -0
  87. data/lib/notifo/models/list_response_dto_of_user_dto.rb +241 -0
  88. data/lib/notifo/models/log_entry_dto.rb +326 -0
  89. data/lib/notifo/models/media_dto.rb +390 -0
  90. data/lib/notifo/models/media_type.rb +39 -0
  91. data/lib/notifo/models/notification_formatting_dto.rb +305 -0
  92. data/lib/notifo/models/notification_send.rb +39 -0
  93. data/lib/notifo/models/notification_setting_dto.rb +234 -0
  94. data/lib/notifo/models/profile_dto.rb +361 -0
  95. data/lib/notifo/models/publish_dto.rb +338 -0
  96. data/lib/notifo/models/publish_many_dto.rb +226 -0
  97. data/lib/notifo/models/resize_mode.rb +42 -0
  98. data/lib/notifo/models/scheduling_dto.rb +248 -0
  99. data/lib/notifo/models/scheduling_type.rb +37 -0
  100. data/lib/notifo/models/subscription_dto.rb +256 -0
  101. data/lib/notifo/models/template_dto.rb +274 -0
  102. data/lib/notifo/models/topic_dto.rb +294 -0
  103. data/lib/notifo/models/update_profile_dto.rb +277 -0
  104. data/lib/notifo/models/upsert_app_dto.rb +321 -0
  105. data/lib/notifo/models/upsert_template_dto.rb +270 -0
  106. data/lib/notifo/models/upsert_templates_dto.rb +226 -0
  107. data/lib/notifo/models/upsert_user_dto.rb +299 -0
  108. data/lib/notifo/models/upsert_users_dto.rb +226 -0
  109. data/lib/notifo/models/user_dto.rb +381 -0
  110. data/lib/notifo/version.rb +15 -0
  111. data/notifo-io-1.0.0.gem +0 -0
  112. data/notifo.gemspec +38 -0
  113. data/spec/api/apps_api_spec.rb +151 -0
  114. data/spec/api/configs_api_spec.rb +55 -0
  115. data/spec/api/events_api_spec.rb +61 -0
  116. data/spec/api/logs_api_spec.rb +49 -0
  117. data/spec/api/media_api_spec.rb +117 -0
  118. data/spec/api/templates_api_spec.rb +73 -0
  119. data/spec/api/topics_api_spec.rb +49 -0
  120. data/spec/api/user_api_spec.rb +92 -0
  121. data/spec/api/users_api_spec.rb +152 -0
  122. data/spec/api_client_spec.rb +226 -0
  123. data/spec/configuration_spec.rb +42 -0
  124. data/spec/models/add_allowed_topic_dto_spec.rb +34 -0
  125. data/spec/models/add_contributor_dto_spec.rb +40 -0
  126. data/spec/models/app_contributor_dto_spec.rb +46 -0
  127. data/spec/models/app_details_dto_spec.rb +124 -0
  128. data/spec/models/app_dto_spec.rb +64 -0
  129. data/spec/models/confirm_mode_spec.rb +28 -0
  130. data/spec/models/create_email_template_dto_spec.rb +34 -0
  131. data/spec/models/email_template_dto_spec.rb +46 -0
  132. data/spec/models/email_verification_status_spec.rb +28 -0
  133. data/spec/models/error_dto_spec.rb +58 -0
  134. data/spec/models/event_dto_spec.rb +100 -0
  135. data/spec/models/iso_day_of_week_spec.rb +28 -0
  136. data/spec/models/list_response_dto_of_event_dto_spec.rb +40 -0
  137. data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +40 -0
  138. data/spec/models/list_response_dto_of_media_dto_spec.rb +40 -0
  139. data/spec/models/list_response_dto_of_subscription_dto_spec.rb +40 -0
  140. data/spec/models/list_response_dto_of_template_dto_spec.rb +40 -0
  141. data/spec/models/list_response_dto_of_topic_dto_spec.rb +40 -0
  142. data/spec/models/list_response_dto_of_user_dto_spec.rb +40 -0
  143. data/spec/models/log_entry_dto_spec.rb +52 -0
  144. data/spec/models/media_dto_spec.rb +70 -0
  145. data/spec/models/media_type_spec.rb +28 -0
  146. data/spec/models/notification_formatting_dto_spec.rb +76 -0
  147. data/spec/models/notification_send_spec.rb +28 -0
  148. data/spec/models/notification_setting_dto_spec.rb +40 -0
  149. data/spec/models/profile_dto_spec.rb +76 -0
  150. data/spec/models/publish_dto_spec.rb +88 -0
  151. data/spec/models/publish_many_dto_spec.rb +34 -0
  152. data/spec/models/resize_mode_spec.rb +28 -0
  153. data/spec/models/scheduling_dto_spec.rb +52 -0
  154. data/spec/models/scheduling_type_spec.rb +28 -0
  155. data/spec/models/subscription_dto_spec.rb +40 -0
  156. data/spec/models/template_dto_spec.rb +46 -0
  157. data/spec/models/topic_dto_spec.rb +46 -0
  158. data/spec/models/update_profile_dto_spec.rb +64 -0
  159. data/spec/models/upsert_app_dto_spec.rb +88 -0
  160. data/spec/models/upsert_template_dto_spec.rb +46 -0
  161. data/spec/models/upsert_templates_dto_spec.rb +34 -0
  162. data/spec/models/upsert_user_dto_spec.rb +76 -0
  163. data/spec/models/upsert_users_dto_spec.rb +34 -0
  164. data/spec/models/user_dto_spec.rb +88 -0
  165. data/spec/spec_helper.rb +111 -0
  166. metadata +301 -0
@@ -0,0 +1,20 @@
1
+ # Notifo::ListResponseDtoOfLogEntryDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **items** | [**Array<LogEntryDto>**](LogEntryDto.md) | The items. | |
8
+ | **total** | **Integer** | The total number of items. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'notifo'
14
+
15
+ instance = Notifo::ListResponseDtoOfLogEntryDto.new(
16
+ items: null,
17
+ total: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # Notifo::ListResponseDtoOfMediaDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **items** | [**Array<MediaDto>**](MediaDto.md) | The items. | |
8
+ | **total** | **Integer** | The total number of items. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'notifo'
14
+
15
+ instance = Notifo::ListResponseDtoOfMediaDto.new(
16
+ items: null,
17
+ total: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # Notifo::ListResponseDtoOfSubscriptionDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **items** | [**Array<SubscriptionDto>**](SubscriptionDto.md) | The items. | |
8
+ | **total** | **Integer** | The total number of items. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'notifo'
14
+
15
+ instance = Notifo::ListResponseDtoOfSubscriptionDto.new(
16
+ items: null,
17
+ total: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # Notifo::ListResponseDtoOfTemplateDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **items** | [**Array<TemplateDto>**](TemplateDto.md) | The items. | |
8
+ | **total** | **Integer** | The total number of items. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'notifo'
14
+
15
+ instance = Notifo::ListResponseDtoOfTemplateDto.new(
16
+ items: null,
17
+ total: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # Notifo::ListResponseDtoOfTopicDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **items** | [**Array<TopicDto>**](TopicDto.md) | The items. | |
8
+ | **total** | **Integer** | The total number of items. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'notifo'
14
+
15
+ instance = Notifo::ListResponseDtoOfTopicDto.new(
16
+ items: null,
17
+ total: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # Notifo::ListResponseDtoOfUserDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **items** | [**Array<UserDto>**](UserDto.md) | The items. | |
8
+ | **total** | **Integer** | The total number of items. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'notifo'
14
+
15
+ instance = Notifo::ListResponseDtoOfUserDto.new(
16
+ items: null,
17
+ total: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,24 @@
1
+ # Notifo::LogEntryDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **message** | **String** | The log message. | |
8
+ | **first_seen** | **Time** | The first time this message has been seen. | |
9
+ | **last_seen** | **Time** | The last time this message has been seen. | |
10
+ | **count** | **Integer** | The number of items the message has been seen. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'notifo'
16
+
17
+ instance = Notifo::LogEntryDto.new(
18
+ message: null,
19
+ first_seen: null,
20
+ last_seen: null,
21
+ count: null
22
+ )
23
+ ```
24
+
data/docs/LogsApi.md ADDED
@@ -0,0 +1,78 @@
1
+ # Notifo::LogsApi
2
+
3
+ All URIs are relative to *https://notifo.easierlife.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**logs_get_logs**](LogsApi.md#logs_get_logs) | **GET** /api/apps/{appId}/logs | Query log entries. |
8
+
9
+
10
+ ## logs_get_logs
11
+
12
+ > <ListResponseDtoOfLogEntryDto> logs_get_logs(app_id, opts)
13
+
14
+ Query log entries.
15
+
16
+ ### Examples
17
+
18
+ ```ruby
19
+ require 'time'
20
+ require 'notifo'
21
+
22
+ api_instance = Notifo::LogsApi.new
23
+ app_id = 'app_id_example' # String | The app where the log entries belongs to.
24
+ opts = {
25
+ query: 'query_example', # String | The optional query to search for items.
26
+ take: 56, # Integer | The number of items to return.
27
+ skip: 56 # Integer | The number of items to skip.
28
+ }
29
+
30
+ begin
31
+ # Query log entries.
32
+ result = api_instance.logs_get_logs(app_id, opts)
33
+ p result
34
+ rescue Notifo::ApiError => e
35
+ puts "Error when calling LogsApi->logs_get_logs: #{e}"
36
+ end
37
+ ```
38
+
39
+ #### Using the logs_get_logs_with_http_info variant
40
+
41
+ This returns an Array which contains the response data, status code and headers.
42
+
43
+ > <Array(<ListResponseDtoOfLogEntryDto>, Integer, Hash)> logs_get_logs_with_http_info(app_id, opts)
44
+
45
+ ```ruby
46
+ begin
47
+ # Query log entries.
48
+ data, status_code, headers = api_instance.logs_get_logs_with_http_info(app_id, opts)
49
+ p status_code # => 2xx
50
+ p headers # => { ... }
51
+ p data # => <ListResponseDtoOfLogEntryDto>
52
+ rescue Notifo::ApiError => e
53
+ puts "Error when calling LogsApi->logs_get_logs_with_http_info: #{e}"
54
+ end
55
+ ```
56
+
57
+ ### Parameters
58
+
59
+ | Name | Type | Description | Notes |
60
+ | ---- | ---- | ----------- | ----- |
61
+ | **app_id** | **String** | The app where the log entries belongs to. | |
62
+ | **query** | **String** | The optional query to search for items. | [optional] |
63
+ | **take** | **Integer** | The number of items to return. | [optional] |
64
+ | **skip** | **Integer** | The number of items to skip. | [optional] |
65
+
66
+ ### Return type
67
+
68
+ [**ListResponseDtoOfLogEntryDto**](ListResponseDtoOfLogEntryDto.md)
69
+
70
+ ### Authorization
71
+
72
+ No authorization required
73
+
74
+ ### HTTP request headers
75
+
76
+ - **Content-Type**: Not defined
77
+ - **Accept**: application/json
78
+
data/docs/MediaApi.md ADDED
@@ -0,0 +1,382 @@
1
+ # Notifo::MediaApi
2
+
3
+ All URIs are relative to *https://notifo.easierlife.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**media_delete**](MediaApi.md#media_delete) | **DELETE** /api/apps/{appId}/media/{fileName} | Delete a media. |
8
+ | [**media_download**](MediaApi.md#media_download) | **GET** /api/apps/{appId}/media/{fileName} | Download a media object. |
9
+ | [**media_download2**](MediaApi.md#media_download2) | **GET** /api/assets/{appId}/{fileName} | Download a media object. |
10
+ | [**media_get_medias**](MediaApi.md#media_get_medias) | **GET** /api/apps/{appId}/media | Query media items. |
11
+ | [**media_upload**](MediaApi.md#media_upload) | **POST** /api/apps/{appId}/media | Upload a media object. |
12
+
13
+
14
+ ## media_delete
15
+
16
+ > media_delete(app_id, file_name)
17
+
18
+ Delete a media.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'notifo'
25
+
26
+ api_instance = Notifo::MediaApi.new
27
+ app_id = 'app_id_example' # String | The app id where the media belongs to.
28
+ file_name = 'file_name_example' # String | The file name of the media.
29
+
30
+ begin
31
+ # Delete a media.
32
+ api_instance.media_delete(app_id, file_name)
33
+ rescue Notifo::ApiError => e
34
+ puts "Error when calling MediaApi->media_delete: #{e}"
35
+ end
36
+ ```
37
+
38
+ #### Using the media_delete_with_http_info variant
39
+
40
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
41
+
42
+ > <Array(nil, Integer, Hash)> media_delete_with_http_info(app_id, file_name)
43
+
44
+ ```ruby
45
+ begin
46
+ # Delete a media.
47
+ data, status_code, headers = api_instance.media_delete_with_http_info(app_id, file_name)
48
+ p status_code # => 2xx
49
+ p headers # => { ... }
50
+ p data # => nil
51
+ rescue Notifo::ApiError => e
52
+ puts "Error when calling MediaApi->media_delete_with_http_info: #{e}"
53
+ end
54
+ ```
55
+
56
+ ### Parameters
57
+
58
+ | Name | Type | Description | Notes |
59
+ | ---- | ---- | ----------- | ----- |
60
+ | **app_id** | **String** | The app id where the media belongs to. | |
61
+ | **file_name** | **String** | The file name of the media. | |
62
+
63
+ ### Return type
64
+
65
+ nil (empty response body)
66
+
67
+ ### Authorization
68
+
69
+ No authorization required
70
+
71
+ ### HTTP request headers
72
+
73
+ - **Content-Type**: Not defined
74
+ - **Accept**: application/json
75
+
76
+
77
+ ## media_download
78
+
79
+ > File media_download(app_id, file_name, opts)
80
+
81
+ Download a media object.
82
+
83
+ ### Examples
84
+
85
+ ```ruby
86
+ require 'time'
87
+ require 'notifo'
88
+
89
+ api_instance = Notifo::MediaApi.new
90
+ app_id = 'app_id_example' # String | The app id where the media belongs to.
91
+ file_name = 'file_name_example' # String | The name of the media to download.
92
+ opts = {
93
+ cache: 789, # Integer | The cache duration.
94
+ download: 56, # Integer | Set it to 1 to create a download response.
95
+ width: 56, # Integer | The target width when an image.
96
+ height: 56, # Integer | The target height when an image.
97
+ quality: 56, # Integer | The target quality when an image.
98
+ preset: 'preset_example', # String | A preset dimension.
99
+ mode: Notifo::ResizeMode::CROP, # ResizeMode | The resize mode.
100
+ focus_x: 3.4, # Float | The x position of the focues point.
101
+ focus_y: 3.4, # Float | The y position of the focues point.
102
+ force: true # Boolean | True to resize it and clear the cache.
103
+ }
104
+
105
+ begin
106
+ # Download a media object.
107
+ result = api_instance.media_download(app_id, file_name, opts)
108
+ p result
109
+ rescue Notifo::ApiError => e
110
+ puts "Error when calling MediaApi->media_download: #{e}"
111
+ end
112
+ ```
113
+
114
+ #### Using the media_download_with_http_info variant
115
+
116
+ This returns an Array which contains the response data, status code and headers.
117
+
118
+ > <Array(File, Integer, Hash)> media_download_with_http_info(app_id, file_name, opts)
119
+
120
+ ```ruby
121
+ begin
122
+ # Download a media object.
123
+ data, status_code, headers = api_instance.media_download_with_http_info(app_id, file_name, opts)
124
+ p status_code # => 2xx
125
+ p headers # => { ... }
126
+ p data # => File
127
+ rescue Notifo::ApiError => e
128
+ puts "Error when calling MediaApi->media_download_with_http_info: #{e}"
129
+ end
130
+ ```
131
+
132
+ ### Parameters
133
+
134
+ | Name | Type | Description | Notes |
135
+ | ---- | ---- | ----------- | ----- |
136
+ | **app_id** | **String** | The app id where the media belongs to. | |
137
+ | **file_name** | **String** | The name of the media to download. | |
138
+ | **cache** | **Integer** | The cache duration. | [optional] |
139
+ | **download** | **Integer** | Set it to 1 to create a download response. | [optional] |
140
+ | **width** | **Integer** | The target width when an image. | [optional] |
141
+ | **height** | **Integer** | The target height when an image. | [optional] |
142
+ | **quality** | **Integer** | The target quality when an image. | [optional] |
143
+ | **preset** | **String** | A preset dimension. | [optional] |
144
+ | **mode** | [**ResizeMode**](.md) | The resize mode. | [optional] |
145
+ | **focus_x** | **Float** | The x position of the focues point. | [optional] |
146
+ | **focus_y** | **Float** | The y position of the focues point. | [optional] |
147
+ | **force** | **Boolean** | True to resize it and clear the cache. | [optional] |
148
+
149
+ ### Return type
150
+
151
+ **File**
152
+
153
+ ### Authorization
154
+
155
+ No authorization required
156
+
157
+ ### HTTP request headers
158
+
159
+ - **Content-Type**: Not defined
160
+ - **Accept**: application/octet-stream, application/json
161
+
162
+
163
+ ## media_download2
164
+
165
+ > File media_download2(app_id, file_name, opts)
166
+
167
+ Download a media object.
168
+
169
+ ### Examples
170
+
171
+ ```ruby
172
+ require 'time'
173
+ require 'notifo'
174
+
175
+ api_instance = Notifo::MediaApi.new
176
+ app_id = 'app_id_example' # String | The app id where the media belongs to.
177
+ file_name = 'file_name_example' # String | The name of the media to download.
178
+ opts = {
179
+ cache: 789, # Integer | The cache duration.
180
+ download: 56, # Integer | Set it to 1 to create a download response.
181
+ width: 56, # Integer | The target width when an image.
182
+ height: 56, # Integer | The target height when an image.
183
+ quality: 56, # Integer | The target quality when an image.
184
+ preset: 'preset_example', # String | A preset dimension.
185
+ mode: Notifo::ResizeMode::CROP, # ResizeMode | The resize mode.
186
+ focus_x: 3.4, # Float | The x position of the focues point.
187
+ focus_y: 3.4, # Float | The y position of the focues point.
188
+ force: true # Boolean | True to resize it and clear the cache.
189
+ }
190
+
191
+ begin
192
+ # Download a media object.
193
+ result = api_instance.media_download2(app_id, file_name, opts)
194
+ p result
195
+ rescue Notifo::ApiError => e
196
+ puts "Error when calling MediaApi->media_download2: #{e}"
197
+ end
198
+ ```
199
+
200
+ #### Using the media_download2_with_http_info variant
201
+
202
+ This returns an Array which contains the response data, status code and headers.
203
+
204
+ > <Array(File, Integer, Hash)> media_download2_with_http_info(app_id, file_name, opts)
205
+
206
+ ```ruby
207
+ begin
208
+ # Download a media object.
209
+ data, status_code, headers = api_instance.media_download2_with_http_info(app_id, file_name, opts)
210
+ p status_code # => 2xx
211
+ p headers # => { ... }
212
+ p data # => File
213
+ rescue Notifo::ApiError => e
214
+ puts "Error when calling MediaApi->media_download2_with_http_info: #{e}"
215
+ end
216
+ ```
217
+
218
+ ### Parameters
219
+
220
+ | Name | Type | Description | Notes |
221
+ | ---- | ---- | ----------- | ----- |
222
+ | **app_id** | **String** | The app id where the media belongs to. | |
223
+ | **file_name** | **String** | The name of the media to download. | |
224
+ | **cache** | **Integer** | The cache duration. | [optional] |
225
+ | **download** | **Integer** | Set it to 1 to create a download response. | [optional] |
226
+ | **width** | **Integer** | The target width when an image. | [optional] |
227
+ | **height** | **Integer** | The target height when an image. | [optional] |
228
+ | **quality** | **Integer** | The target quality when an image. | [optional] |
229
+ | **preset** | **String** | A preset dimension. | [optional] |
230
+ | **mode** | [**ResizeMode**](.md) | The resize mode. | [optional] |
231
+ | **focus_x** | **Float** | The x position of the focues point. | [optional] |
232
+ | **focus_y** | **Float** | The y position of the focues point. | [optional] |
233
+ | **force** | **Boolean** | True to resize it and clear the cache. | [optional] |
234
+
235
+ ### Return type
236
+
237
+ **File**
238
+
239
+ ### Authorization
240
+
241
+ No authorization required
242
+
243
+ ### HTTP request headers
244
+
245
+ - **Content-Type**: Not defined
246
+ - **Accept**: application/octet-stream, application/json
247
+
248
+
249
+ ## media_get_medias
250
+
251
+ > <ListResponseDtoOfMediaDto> media_get_medias(app_id, opts)
252
+
253
+ Query media items.
254
+
255
+ ### Examples
256
+
257
+ ```ruby
258
+ require 'time'
259
+ require 'notifo'
260
+
261
+ api_instance = Notifo::MediaApi.new
262
+ app_id = 'app_id_example' # String | The app where the media belongs to.
263
+ opts = {
264
+ query: 'query_example', # String | The optional query to search for items.
265
+ take: 56, # Integer | The number of items to return.
266
+ skip: 56 # Integer | The number of items to skip.
267
+ }
268
+
269
+ begin
270
+ # Query media items.
271
+ result = api_instance.media_get_medias(app_id, opts)
272
+ p result
273
+ rescue Notifo::ApiError => e
274
+ puts "Error when calling MediaApi->media_get_medias: #{e}"
275
+ end
276
+ ```
277
+
278
+ #### Using the media_get_medias_with_http_info variant
279
+
280
+ This returns an Array which contains the response data, status code and headers.
281
+
282
+ > <Array(<ListResponseDtoOfMediaDto>, Integer, Hash)> media_get_medias_with_http_info(app_id, opts)
283
+
284
+ ```ruby
285
+ begin
286
+ # Query media items.
287
+ data, status_code, headers = api_instance.media_get_medias_with_http_info(app_id, opts)
288
+ p status_code # => 2xx
289
+ p headers # => { ... }
290
+ p data # => <ListResponseDtoOfMediaDto>
291
+ rescue Notifo::ApiError => e
292
+ puts "Error when calling MediaApi->media_get_medias_with_http_info: #{e}"
293
+ end
294
+ ```
295
+
296
+ ### Parameters
297
+
298
+ | Name | Type | Description | Notes |
299
+ | ---- | ---- | ----------- | ----- |
300
+ | **app_id** | **String** | The app where the media belongs to. | |
301
+ | **query** | **String** | The optional query to search for items. | [optional] |
302
+ | **take** | **Integer** | The number of items to return. | [optional] |
303
+ | **skip** | **Integer** | The number of items to skip. | [optional] |
304
+
305
+ ### Return type
306
+
307
+ [**ListResponseDtoOfMediaDto**](ListResponseDtoOfMediaDto.md)
308
+
309
+ ### Authorization
310
+
311
+ No authorization required
312
+
313
+ ### HTTP request headers
314
+
315
+ - **Content-Type**: Not defined
316
+ - **Accept**: application/json
317
+
318
+
319
+ ## media_upload
320
+
321
+ > media_upload(app_id, opts)
322
+
323
+ Upload a media object.
324
+
325
+ ### Examples
326
+
327
+ ```ruby
328
+ require 'time'
329
+ require 'notifo'
330
+
331
+ api_instance = Notifo::MediaApi.new
332
+ app_id = 'app_id_example' # String | The app id where the media belongs to.
333
+ opts = {
334
+ file: File.new('/path/to/some/file') # File |
335
+ }
336
+
337
+ begin
338
+ # Upload a media object.
339
+ api_instance.media_upload(app_id, opts)
340
+ rescue Notifo::ApiError => e
341
+ puts "Error when calling MediaApi->media_upload: #{e}"
342
+ end
343
+ ```
344
+
345
+ #### Using the media_upload_with_http_info variant
346
+
347
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
348
+
349
+ > <Array(nil, Integer, Hash)> media_upload_with_http_info(app_id, opts)
350
+
351
+ ```ruby
352
+ begin
353
+ # Upload a media object.
354
+ data, status_code, headers = api_instance.media_upload_with_http_info(app_id, opts)
355
+ p status_code # => 2xx
356
+ p headers # => { ... }
357
+ p data # => nil
358
+ rescue Notifo::ApiError => e
359
+ puts "Error when calling MediaApi->media_upload_with_http_info: #{e}"
360
+ end
361
+ ```
362
+
363
+ ### Parameters
364
+
365
+ | Name | Type | Description | Notes |
366
+ | ---- | ---- | ----------- | ----- |
367
+ | **app_id** | **String** | The app id where the media belongs to. | |
368
+ | **file** | **File** | | [optional] |
369
+
370
+ ### Return type
371
+
372
+ nil (empty response body)
373
+
374
+ ### Authorization
375
+
376
+ No authorization required
377
+
378
+ ### HTTP request headers
379
+
380
+ - **Content-Type**: multipart/form-data
381
+ - **Accept**: application/json
382
+