vrchatapi-async 1.20.8.dev1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. vrchatapi/__init__.py +742 -0
  2. vrchatapi/api/__init__.py +23 -0
  3. vrchatapi/api/authentication_api.py +6253 -0
  4. vrchatapi/api/avatars_api.py +4234 -0
  5. vrchatapi/api/calendar_api.py +4090 -0
  6. vrchatapi/api/economy_api.py +11547 -0
  7. vrchatapi/api/favorites_api.py +2368 -0
  8. vrchatapi/api/files_api.py +6109 -0
  9. vrchatapi/api/friends_api.py +1708 -0
  10. vrchatapi/api/groups_api.py +15085 -0
  11. vrchatapi/api/instances_api.py +1754 -0
  12. vrchatapi/api/inventory_api.py +4333 -0
  13. vrchatapi/api/invite_api.py +3337 -0
  14. vrchatapi/api/jams_api.py +1446 -0
  15. vrchatapi/api/miscellaneous_api.py +2384 -0
  16. vrchatapi/api/notifications_api.py +3624 -0
  17. vrchatapi/api/playermoderation_api.py +1127 -0
  18. vrchatapi/api/prints_api.py +1478 -0
  19. vrchatapi/api/props_api.py +2269 -0
  20. vrchatapi/api/users_api.py +7894 -0
  21. vrchatapi/api/worlds_api.py +6153 -0
  22. vrchatapi/api_client.py +865 -0
  23. vrchatapi/api_response.py +21 -0
  24. vrchatapi/configuration.py +686 -0
  25. vrchatapi/exceptions.py +218 -0
  26. vrchatapi/models/__init__.py +345 -0
  27. vrchatapi/models/account_deletion_log.py +253 -0
  28. vrchatapi/models/add_favorite_request.py +246 -0
  29. vrchatapi/models/add_group_gallery_image_request.py +234 -0
  30. vrchatapi/models/admin_asset_bundle.py +337 -0
  31. vrchatapi/models/admin_unity_package.py +261 -0
  32. vrchatapi/models/age_verification_status.py +38 -0
  33. vrchatapi/models/agreement.py +280 -0
  34. vrchatapi/models/agreement_code.py +36 -0
  35. vrchatapi/models/agreement_request.py +256 -0
  36. vrchatapi/models/agreement_status.py +261 -0
  37. vrchatapi/models/api_config.py +1299 -0
  38. vrchatapi/models/api_config_access_logs_urls.py +258 -0
  39. vrchatapi/models/api_config_announcement.py +217 -0
  40. vrchatapi/models/api_config_audio_config.py +311 -0
  41. vrchatapi/models/api_config_avatar_perf_limiter.py +293 -0
  42. vrchatapi/models/api_config_constants.py +262 -0
  43. vrchatapi/models/api_config_constants_groups.py +306 -0
  44. vrchatapi/models/api_config_constants_instance.py +238 -0
  45. vrchatapi/models/api_config_constants_instancepopulationbrackets.py +262 -0
  46. vrchatapi/models/api_config_constants_instancepopulationbracketscrowded.py +216 -0
  47. vrchatapi/models/api_config_constants_instancepopulationbracketsfew.py +216 -0
  48. vrchatapi/models/api_config_constants_instancepopulationbracketsmany.py +216 -0
  49. vrchatapi/models/api_config_constants_language.py +234 -0
  50. vrchatapi/models/api_config_download_url_list.py +258 -0
  51. vrchatapi/models/api_config_events.py +314 -0
  52. vrchatapi/models/api_config_ios_version.py +216 -0
  53. vrchatapi/models/api_config_min_supported_client_build_number.py +348 -0
  54. vrchatapi/models/api_config_offline_analysis.py +216 -0
  55. vrchatapi/models/api_health.py +248 -0
  56. vrchatapi/models/avatar.py +463 -0
  57. vrchatapi/models/avatar_moderation.py +249 -0
  58. vrchatapi/models/avatar_moderation_created.py +248 -0
  59. vrchatapi/models/avatar_moderation_type.py +36 -0
  60. vrchatapi/models/avatar_performance.py +265 -0
  61. vrchatapi/models/avatar_published_listings_inner.py +271 -0
  62. vrchatapi/models/avatar_style.py +239 -0
  63. vrchatapi/models/avatar_styles.py +231 -0
  64. vrchatapi/models/avatar_unity_package_url_object.py +234 -0
  65. vrchatapi/models/badge.py +308 -0
  66. vrchatapi/models/balance.py +247 -0
  67. vrchatapi/models/ban_group_member_request.py +234 -0
  68. vrchatapi/models/boop_request.py +250 -0
  69. vrchatapi/models/calendar_day_of_week.py +42 -0
  70. vrchatapi/models/calendar_event.py +475 -0
  71. vrchatapi/models/calendar_event_access.py +37 -0
  72. vrchatapi/models/calendar_event_category.py +48 -0
  73. vrchatapi/models/calendar_event_discovery.py +247 -0
  74. vrchatapi/models/calendar_event_discovery_inclusion.py +38 -0
  75. vrchatapi/models/calendar_event_discovery_scope.py +38 -0
  76. vrchatapi/models/calendar_event_frequency.py +39 -0
  77. vrchatapi/models/calendar_event_occurrence_kind.py +38 -0
  78. vrchatapi/models/calendar_event_platform.py +38 -0
  79. vrchatapi/models/calendar_event_recurrence.py +261 -0
  80. vrchatapi/models/calendar_event_recurrence_end.py +246 -0
  81. vrchatapi/models/calendar_event_recurrence_end_type.py +37 -0
  82. vrchatapi/models/calendar_event_user_interest.py +251 -0
  83. vrchatapi/models/change_user_tags_request.py +212 -0
  84. vrchatapi/models/change_world_tags_request.py +212 -0
  85. vrchatapi/models/content_filter.py +40 -0
  86. vrchatapi/models/create_avatar_moderation_request.py +243 -0
  87. vrchatapi/models/create_avatar_request.py +324 -0
  88. vrchatapi/models/create_calendar_event_request.py +385 -0
  89. vrchatapi/models/create_file_request.py +251 -0
  90. vrchatapi/models/create_file_version_request.py +259 -0
  91. vrchatapi/models/create_group_announcement_request.py +253 -0
  92. vrchatapi/models/create_group_gallery_request.py +297 -0
  93. vrchatapi/models/create_group_invite_request.py +242 -0
  94. vrchatapi/models/create_group_post_request.py +267 -0
  95. vrchatapi/models/create_group_request.py +295 -0
  96. vrchatapi/models/create_group_role_request.py +255 -0
  97. vrchatapi/models/create_instance_request.py +384 -0
  98. vrchatapi/models/create_jam_submission_request.py +239 -0
  99. vrchatapi/models/create_listing_request.py +285 -0
  100. vrchatapi/models/create_product_request.py +270 -0
  101. vrchatapi/models/create_prop_request.py +308 -0
  102. vrchatapi/models/create_world_request.py +322 -0
  103. vrchatapi/models/current_user.py +909 -0
  104. vrchatapi/models/current_user_platform_history_inner.py +245 -0
  105. vrchatapi/models/current_user_presence.py +379 -0
  106. vrchatapi/models/decline_group_invite_request.py +211 -0
  107. vrchatapi/models/developer_type.py +39 -0
  108. vrchatapi/models/disable2_fa_result.py +211 -0
  109. vrchatapi/models/discord_details.py +216 -0
  110. vrchatapi/models/dynamic_content_row.py +276 -0
  111. vrchatapi/models/earnings_metrics.py +248 -0
  112. vrchatapi/models/earnings_metrics_totals.py +267 -0
  113. vrchatapi/models/economy_account.py +360 -0
  114. vrchatapi/models/economy_balances.py +221 -0
  115. vrchatapi/models/economy_payout.py +385 -0
  116. vrchatapi/models/economy_payout_eligibility.py +263 -0
  117. vrchatapi/models/economy_payout_list.py +219 -0
  118. vrchatapi/models/economy_payout_status.py +295 -0
  119. vrchatapi/models/equip_inventory_item_request.py +235 -0
  120. vrchatapi/models/error.py +215 -0
  121. vrchatapi/models/favorite.py +251 -0
  122. vrchatapi/models/favorite_group.py +278 -0
  123. vrchatapi/models/favorite_group_limits.py +249 -0
  124. vrchatapi/models/favorite_group_visibility.py +38 -0
  125. vrchatapi/models/favorite_limits.py +265 -0
  126. vrchatapi/models/favorite_type.py +39 -0
  127. vrchatapi/models/favorited_world.py +441 -0
  128. vrchatapi/models/feedback.py +331 -0
  129. vrchatapi/models/file.py +325 -0
  130. vrchatapi/models/file_analysis.py +281 -0
  131. vrchatapi/models/file_analysis_avatar_stats.py +575 -0
  132. vrchatapi/models/file_data.py +279 -0
  133. vrchatapi/models/file_status.py +39 -0
  134. vrchatapi/models/file_upload_url.py +212 -0
  135. vrchatapi/models/file_version.py +254 -0
  136. vrchatapi/models/file_version_upload_status.py +269 -0
  137. vrchatapi/models/finish_file_data_upload_request.py +248 -0
  138. vrchatapi/models/follow_calendar_event_request.py +234 -0
  139. vrchatapi/models/friend_status.py +250 -0
  140. vrchatapi/models/get_group_posts200_response.py +219 -0
  141. vrchatapi/models/get_user_group_instances200_response.py +248 -0
  142. vrchatapi/models/group.py +514 -0
  143. vrchatapi/models/group_access_type.py +38 -0
  144. vrchatapi/models/group_announcement.py +315 -0
  145. vrchatapi/models/group_audit_log_entry.py +287 -0
  146. vrchatapi/models/group_gallery.py +319 -0
  147. vrchatapi/models/group_gallery_file_order.py +211 -0
  148. vrchatapi/models/group_gallery_file_order_request.py +239 -0
  149. vrchatapi/models/group_gallery_image.py +301 -0
  150. vrchatapi/models/group_instance.py +257 -0
  151. vrchatapi/models/group_join_request_action.py +37 -0
  152. vrchatapi/models/group_join_state.py +39 -0
  153. vrchatapi/models/group_member.py +415 -0
  154. vrchatapi/models/group_member_limited_user.py +290 -0
  155. vrchatapi/models/group_member_status.py +41 -0
  156. vrchatapi/models/group_my_member.py +399 -0
  157. vrchatapi/models/group_permission.py +260 -0
  158. vrchatapi/models/group_permissions.py +63 -0
  159. vrchatapi/models/group_post.py +317 -0
  160. vrchatapi/models/group_post_visibility.py +37 -0
  161. vrchatapi/models/group_privacy.py +37 -0
  162. vrchatapi/models/group_role.py +309 -0
  163. vrchatapi/models/group_role_template.py +39 -0
  164. vrchatapi/models/group_role_template_values.py +254 -0
  165. vrchatapi/models/group_role_template_values_roles.py +253 -0
  166. vrchatapi/models/group_search_sort.py +37 -0
  167. vrchatapi/models/group_transferable.py +215 -0
  168. vrchatapi/models/group_transferable_requirements.py +266 -0
  169. vrchatapi/models/group_user_visibility.py +38 -0
  170. vrchatapi/models/image_animation_style.py +62 -0
  171. vrchatapi/models/image_loop_style.py +37 -0
  172. vrchatapi/models/image_mask.py +41 -0
  173. vrchatapi/models/image_purpose.py +46 -0
  174. vrchatapi/models/info_push.py +306 -0
  175. vrchatapi/models/info_push_data.py +288 -0
  176. vrchatapi/models/info_push_data_article.py +215 -0
  177. vrchatapi/models/info_push_data_article_content.py +251 -0
  178. vrchatapi/models/info_push_data_clickable.py +224 -0
  179. vrchatapi/models/instance.py +597 -0
  180. vrchatapi/models/instance_content_settings.py +236 -0
  181. vrchatapi/models/instance_platforms.py +222 -0
  182. vrchatapi/models/instance_region.py +40 -0
  183. vrchatapi/models/instance_short_name_response.py +248 -0
  184. vrchatapi/models/instance_type.py +40 -0
  185. vrchatapi/models/inventory.py +247 -0
  186. vrchatapi/models/inventory_consumption_results.py +255 -0
  187. vrchatapi/models/inventory_default_attributes_value.py +243 -0
  188. vrchatapi/models/inventory_default_attributes_value_validator.py +211 -0
  189. vrchatapi/models/inventory_drop.py +331 -0
  190. vrchatapi/models/inventory_equip_slot.py +39 -0
  191. vrchatapi/models/inventory_flag.py +43 -0
  192. vrchatapi/models/inventory_item.py +420 -0
  193. vrchatapi/models/inventory_item_type.py +42 -0
  194. vrchatapi/models/inventory_metadata.py +287 -0
  195. vrchatapi/models/inventory_notification_details.py +244 -0
  196. vrchatapi/models/inventory_spawn.py +216 -0
  197. vrchatapi/models/inventory_template.py +351 -0
  198. vrchatapi/models/inventory_user_attributes.py +250 -0
  199. vrchatapi/models/invite_message.py +276 -0
  200. vrchatapi/models/invite_message_type.py +39 -0
  201. vrchatapi/models/invite_request.py +243 -0
  202. vrchatapi/models/invite_response.py +235 -0
  203. vrchatapi/models/jam.py +302 -0
  204. vrchatapi/models/jam_state_change_dates.py +276 -0
  205. vrchatapi/models/jam_submission.py +275 -0
  206. vrchatapi/models/join_group_request.py +234 -0
  207. vrchatapi/models/license.py +261 -0
  208. vrchatapi/models/license_action.py +37 -0
  209. vrchatapi/models/license_group.py +235 -0
  210. vrchatapi/models/license_type.py +39 -0
  211. vrchatapi/models/limited_group.py +377 -0
  212. vrchatapi/models/limited_unity_package.py +251 -0
  213. vrchatapi/models/limited_user_friend.py +399 -0
  214. vrchatapi/models/limited_user_groups.py +386 -0
  215. vrchatapi/models/limited_user_instance.py +430 -0
  216. vrchatapi/models/limited_user_search.py +395 -0
  217. vrchatapi/models/limited_world.py +410 -0
  218. vrchatapi/models/mime_type.py +50 -0
  219. vrchatapi/models/model_print.py +299 -0
  220. vrchatapi/models/moderate_user_request.py +217 -0
  221. vrchatapi/models/moderation_report.py +296 -0
  222. vrchatapi/models/mutual_friend.py +302 -0
  223. vrchatapi/models/mutuals.py +217 -0
  224. vrchatapi/models/notification.py +283 -0
  225. vrchatapi/models/notification_detail_invite.py +250 -0
  226. vrchatapi/models/notification_detail_invite_response.py +242 -0
  227. vrchatapi/models/notification_detail_request_invite.py +239 -0
  228. vrchatapi/models/notification_detail_request_invite_response.py +242 -0
  229. vrchatapi/models/notification_detail_vote_to_kick.py +242 -0
  230. vrchatapi/models/notification_type.py +43 -0
  231. vrchatapi/models/notification_v2.py +466 -0
  232. vrchatapi/models/notification_v2_details_boop.py +255 -0
  233. vrchatapi/models/notification_v2_response.py +259 -0
  234. vrchatapi/models/notification_v2_type.py +58 -0
  235. vrchatapi/models/ok_status.py +211 -0
  236. vrchatapi/models/ok_status2.py +234 -0
  237. vrchatapi/models/order_option.py +37 -0
  238. vrchatapi/models/order_option_short.py +37 -0
  239. vrchatapi/models/paginated_calendar_event_list.py +255 -0
  240. vrchatapi/models/paginated_group_audit_log_entry_list.py +255 -0
  241. vrchatapi/models/paginated_moderation_report_list.py +255 -0
  242. vrchatapi/models/past_display_name.py +241 -0
  243. vrchatapi/models/pending2_fa_result.py +239 -0
  244. vrchatapi/models/performance_limiter_info.py +234 -0
  245. vrchatapi/models/performance_ratings.py +41 -0
  246. vrchatapi/models/permission.py +280 -0
  247. vrchatapi/models/permission_data.py +258 -0
  248. vrchatapi/models/platform_build_info.py +242 -0
  249. vrchatapi/models/player_moderation.py +276 -0
  250. vrchatapi/models/player_moderation_type.py +44 -0
  251. vrchatapi/models/print_files.py +239 -0
  252. vrchatapi/models/private_profile.py +267 -0
  253. vrchatapi/models/private_profile_activity.py +292 -0
  254. vrchatapi/models/product.py +389 -0
  255. vrchatapi/models/product_listing.py +538 -0
  256. vrchatapi/models/product_listing_type.py +39 -0
  257. vrchatapi/models/product_listing_variant.py +272 -0
  258. vrchatapi/models/product_purchase.py +571 -0
  259. vrchatapi/models/product_purchase_history.py +256 -0
  260. vrchatapi/models/product_purchase_location_type.py +46 -0
  261. vrchatapi/models/product_purchase_product.py +269 -0
  262. vrchatapi/models/product_purchase_purchase_context.py +250 -0
  263. vrchatapi/models/product_purchase_record.py +312 -0
  264. vrchatapi/models/product_type.py +39 -0
  265. vrchatapi/models/profile_represented_group.py +262 -0
  266. vrchatapi/models/prop.py +358 -0
  267. vrchatapi/models/prop_publish_status.py +234 -0
  268. vrchatapi/models/prop_unity_package.py +269 -0
  269. vrchatapi/models/public_profile.py +398 -0
  270. vrchatapi/models/purchase_context_data.py +251 -0
  271. vrchatapi/models/purchase_product_listing_request.py +281 -0
  272. vrchatapi/models/region.py +42 -0
  273. vrchatapi/models/register_user_account_request.py +278 -0
  274. vrchatapi/models/release_status.py +39 -0
  275. vrchatapi/models/report_category.py +226 -0
  276. vrchatapi/models/report_reason.py +216 -0
  277. vrchatapi/models/represented_group.py +348 -0
  278. vrchatapi/models/request_invite_request.py +235 -0
  279. vrchatapi/models/respond_group_join_request.py +217 -0
  280. vrchatapi/models/respond_notification_v2_request.py +242 -0
  281. vrchatapi/models/response.py +217 -0
  282. vrchatapi/models/reward_badge.py +308 -0
  283. vrchatapi/models/reward_redemption.py +220 -0
  284. vrchatapi/models/reward_redemption_data.py +224 -0
  285. vrchatapi/models/reward_redemption_request.py +211 -0
  286. vrchatapi/models/reward_redemption_result.py +250 -0
  287. vrchatapi/models/search_group_members200_response.py +224 -0
  288. vrchatapi/models/seller_eligibility.py +211 -0
  289. vrchatapi/models/sent_notification.py +278 -0
  290. vrchatapi/models/service_queue_stats.py +234 -0
  291. vrchatapi/models/service_status.py +281 -0
  292. vrchatapi/models/share_inventory_item_direct_request.py +239 -0
  293. vrchatapi/models/sort_option.py +53 -0
  294. vrchatapi/models/sort_option_product_purchase.py +36 -0
  295. vrchatapi/models/store.py +372 -0
  296. vrchatapi/models/store_context.py +249 -0
  297. vrchatapi/models/store_shelf.py +304 -0
  298. vrchatapi/models/store_type.py +38 -0
  299. vrchatapi/models/store_view.py +40 -0
  300. vrchatapi/models/submit_moderation_report_request.py +263 -0
  301. vrchatapi/models/submit_moderation_report_request_details.py +283 -0
  302. vrchatapi/models/subscription.py +301 -0
  303. vrchatapi/models/subscription_period.py +40 -0
  304. vrchatapi/models/success.py +215 -0
  305. vrchatapi/models/success_flag.py +211 -0
  306. vrchatapi/models/tilia_kyc.py +246 -0
  307. vrchatapi/models/tilia_status.py +259 -0
  308. vrchatapi/models/tilia_tos.py +211 -0
  309. vrchatapi/models/token_bundle.py +286 -0
  310. vrchatapi/models/transaction.py +322 -0
  311. vrchatapi/models/transaction_agreement.py +353 -0
  312. vrchatapi/models/transaction_status.py +39 -0
  313. vrchatapi/models/transaction_steam_info.py +271 -0
  314. vrchatapi/models/transaction_steam_wallet_info.py +227 -0
  315. vrchatapi/models/transfer_group_request.py +234 -0
  316. vrchatapi/models/tutorial_status.py +255 -0
  317. vrchatapi/models/two_factor_auth_code.py +211 -0
  318. vrchatapi/models/two_factor_email_code.py +211 -0
  319. vrchatapi/models/two_factor_recovery_codes.py +247 -0
  320. vrchatapi/models/two_factor_recovery_codes_otp_inner.py +216 -0
  321. vrchatapi/models/unity_package.py +360 -0
  322. vrchatapi/models/update_asset_review_notes_request.py +234 -0
  323. vrchatapi/models/update_avatar_request.py +293 -0
  324. vrchatapi/models/update_calendar_event_request.py +365 -0
  325. vrchatapi/models/update_favorite_group_request.py +246 -0
  326. vrchatapi/models/update_group_gallery_request.py +297 -0
  327. vrchatapi/models/update_group_member_request.py +256 -0
  328. vrchatapi/models/update_group_representation_request.py +234 -0
  329. vrchatapi/models/update_group_request.py +300 -0
  330. vrchatapi/models/update_group_role_request.py +255 -0
  331. vrchatapi/models/update_inventory_item_request.py +254 -0
  332. vrchatapi/models/update_invite_message_request.py +211 -0
  333. vrchatapi/models/update_listing_request.py +211 -0
  334. vrchatapi/models/update_product_request.py +261 -0
  335. vrchatapi/models/update_prop_request.py +303 -0
  336. vrchatapi/models/update_tilia_tos_request.py +211 -0
  337. vrchatapi/models/update_user_badge_request.py +216 -0
  338. vrchatapi/models/update_user_note_request.py +239 -0
  339. vrchatapi/models/update_user_request.py +358 -0
  340. vrchatapi/models/update_world_request.py +317 -0
  341. vrchatapi/models/user.py +549 -0
  342. vrchatapi/models/user_credits_eligible.py +216 -0
  343. vrchatapi/models/user_exists.py +242 -0
  344. vrchatapi/models/user_note.py +273 -0
  345. vrchatapi/models/user_note_target_user.py +277 -0
  346. vrchatapi/models/user_state.py +38 -0
  347. vrchatapi/models/user_status.py +40 -0
  348. vrchatapi/models/user_subscription.py +330 -0
  349. vrchatapi/models/user_subscription_eligible.py +274 -0
  350. vrchatapi/models/verify2_fa_email_code_result.py +211 -0
  351. vrchatapi/models/verify2_fa_result.py +216 -0
  352. vrchatapi/models/verify_auth_token_result.py +217 -0
  353. vrchatapi/models/world.py +459 -0
  354. vrchatapi/models/world_metadata.py +216 -0
  355. vrchatapi/models/world_publish_status.py +234 -0
  356. vrchatapi/py.typed +0 -0
  357. vrchatapi/rest.py +303 -0
  358. vrchatapi_async-1.20.8.dev1.dist-info/METADATA +137 -0
  359. vrchatapi_async-1.20.8.dev1.dist-info/RECORD +362 -0
  360. vrchatapi_async-1.20.8.dev1.dist-info/WHEEL +5 -0
  361. vrchatapi_async-1.20.8.dev1.dist-info/licenses/LICENSE +21 -0
  362. vrchatapi_async-1.20.8.dev1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2368 @@
1
+ """
2
+ VRChat API Documentation
3
+
4
+
5
+ The version of the OpenAPI document: 1.20.8
6
+ Contact: vrchatapi.lpv0t@aries.fyi
7
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+
9
+ Do not edit the class manually.
10
+ """ # noqa: E501
11
+
12
+
13
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from pydantic import Field, StrictStr
19
+ from typing import List, Optional
20
+ from typing_extensions import Annotated
21
+ from vrchatapi.models.add_favorite_request import AddFavoriteRequest
22
+ from vrchatapi.models.favorite import Favorite
23
+ from vrchatapi.models.favorite_group import FavoriteGroup
24
+ from vrchatapi.models.favorite_limits import FavoriteLimits
25
+ from vrchatapi.models.favorite_type import FavoriteType
26
+ from vrchatapi.models.success import Success
27
+ from vrchatapi.models.update_favorite_group_request import UpdateFavoriteGroupRequest
28
+
29
+ from vrchatapi.api_client import ApiClient, RequestSerialized
30
+ from vrchatapi.api_response import ApiResponse
31
+ from vrchatapi.rest import RESTResponseType
32
+
33
+
34
+ class FavoritesApi:
35
+ """NOTE: This class is auto generated by OpenAPI Generator
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+ """
40
+
41
+ def __init__(self, api_client=None) -> None:
42
+ if api_client is None:
43
+ api_client = ApiClient.get_default()
44
+ self.api_client = api_client
45
+
46
+
47
+ @validate_call
48
+ async def add_favorite(
49
+ self,
50
+ add_favorite_request: Optional[AddFavoriteRequest] = None,
51
+ _request_timeout: Union[
52
+ None,
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Tuple[
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Annotated[StrictFloat, Field(gt=0)]
57
+ ]
58
+ ] = None,
59
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
60
+ _content_type: Optional[StrictStr] = None,
61
+ _headers: Optional[Dict[StrictStr, Any]] = None,
62
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
63
+ ) -> Favorite:
64
+ """Add Favorite
65
+
66
+ Add a new favorite. Friend groups are named `group_0` through `group_3`. Avatar and World groups are named `avatars1` to `avatars4` and `worlds1` to `worlds4`. You cannot add people whom you are not friends with to your friends list. Destroying a friendship removes the person as favorite on both sides.
67
+
68
+ :param add_favorite_request:
69
+ :type add_favorite_request: AddFavoriteRequest
70
+ :param _request_timeout: timeout setting for this request. If one
71
+ number provided, it will be total request
72
+ timeout. It can also be a pair (tuple) of
73
+ (connection, read) timeouts.
74
+ :type _request_timeout: int, tuple(int, int), optional
75
+ :param _request_auth: set to override the auth_settings for an a single
76
+ request; this effectively ignores the
77
+ authentication in the spec for a single request.
78
+ :type _request_auth: dict, optional
79
+ :param _content_type: force content-type for the request.
80
+ :type _content_type: str, Optional
81
+ :param _headers: set to override the headers for a single
82
+ request; this effectively ignores the headers
83
+ in the spec for a single request.
84
+ :type _headers: dict, optional
85
+ :param _host_index: set to override the host_index for a single
86
+ request; this effectively ignores the host_index
87
+ in the spec for a single request.
88
+ :type _host_index: int, optional
89
+ :return: Returns the result object.
90
+ """ # noqa: E501
91
+
92
+ _param = self._add_favorite_serialize(
93
+ add_favorite_request=add_favorite_request,
94
+ _request_auth=_request_auth,
95
+ _content_type=_content_type,
96
+ _headers=_headers,
97
+ _host_index=_host_index
98
+ )
99
+
100
+ _response_types_map: Dict[str, Optional[str]] = {
101
+ '200': "Favorite",
102
+ '400': "Error",
103
+ '403': "Error",
104
+ }
105
+ response_data = await self.api_client.call_api(
106
+ *_param,
107
+ _request_timeout=_request_timeout
108
+ )
109
+ await response_data.read()
110
+ return self.api_client.response_deserialize(
111
+ response_data=response_data,
112
+ response_types_map=_response_types_map,
113
+ ).data
114
+
115
+
116
+ @validate_call
117
+ async def add_favorite_with_http_info(
118
+ self,
119
+ add_favorite_request: Optional[AddFavoriteRequest] = None,
120
+ _request_timeout: Union[
121
+ None,
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Tuple[
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Annotated[StrictFloat, Field(gt=0)]
126
+ ]
127
+ ] = None,
128
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
129
+ _content_type: Optional[StrictStr] = None,
130
+ _headers: Optional[Dict[StrictStr, Any]] = None,
131
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
132
+ ) -> ApiResponse[Favorite]:
133
+ """Add Favorite
134
+
135
+ Add a new favorite. Friend groups are named `group_0` through `group_3`. Avatar and World groups are named `avatars1` to `avatars4` and `worlds1` to `worlds4`. You cannot add people whom you are not friends with to your friends list. Destroying a friendship removes the person as favorite on both sides.
136
+
137
+ :param add_favorite_request:
138
+ :type add_favorite_request: AddFavoriteRequest
139
+ :param _request_timeout: timeout setting for this request. If one
140
+ number provided, it will be total request
141
+ timeout. It can also be a pair (tuple) of
142
+ (connection, read) timeouts.
143
+ :type _request_timeout: int, tuple(int, int), optional
144
+ :param _request_auth: set to override the auth_settings for an a single
145
+ request; this effectively ignores the
146
+ authentication in the spec for a single request.
147
+ :type _request_auth: dict, optional
148
+ :param _content_type: force content-type for the request.
149
+ :type _content_type: str, Optional
150
+ :param _headers: set to override the headers for a single
151
+ request; this effectively ignores the headers
152
+ in the spec for a single request.
153
+ :type _headers: dict, optional
154
+ :param _host_index: set to override the host_index for a single
155
+ request; this effectively ignores the host_index
156
+ in the spec for a single request.
157
+ :type _host_index: int, optional
158
+ :return: Returns the result object.
159
+ """ # noqa: E501
160
+
161
+ _param = self._add_favorite_serialize(
162
+ add_favorite_request=add_favorite_request,
163
+ _request_auth=_request_auth,
164
+ _content_type=_content_type,
165
+ _headers=_headers,
166
+ _host_index=_host_index
167
+ )
168
+
169
+ _response_types_map: Dict[str, Optional[str]] = {
170
+ '200': "Favorite",
171
+ '400': "Error",
172
+ '403': "Error",
173
+ }
174
+ response_data = await self.api_client.call_api(
175
+ *_param,
176
+ _request_timeout=_request_timeout
177
+ )
178
+ await response_data.read()
179
+ return self.api_client.response_deserialize(
180
+ response_data=response_data,
181
+ response_types_map=_response_types_map,
182
+ )
183
+
184
+
185
+ @validate_call
186
+ async def add_favorite_without_preload_content(
187
+ self,
188
+ add_favorite_request: Optional[AddFavoriteRequest] = None,
189
+ _request_timeout: Union[
190
+ None,
191
+ Annotated[StrictFloat, Field(gt=0)],
192
+ Tuple[
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Annotated[StrictFloat, Field(gt=0)]
195
+ ]
196
+ ] = None,
197
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
198
+ _content_type: Optional[StrictStr] = None,
199
+ _headers: Optional[Dict[StrictStr, Any]] = None,
200
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
201
+ ) -> RESTResponseType:
202
+ """Add Favorite
203
+
204
+ Add a new favorite. Friend groups are named `group_0` through `group_3`. Avatar and World groups are named `avatars1` to `avatars4` and `worlds1` to `worlds4`. You cannot add people whom you are not friends with to your friends list. Destroying a friendship removes the person as favorite on both sides.
205
+
206
+ :param add_favorite_request:
207
+ :type add_favorite_request: AddFavoriteRequest
208
+ :param _request_timeout: timeout setting for this request. If one
209
+ number provided, it will be total request
210
+ timeout. It can also be a pair (tuple) of
211
+ (connection, read) timeouts.
212
+ :type _request_timeout: int, tuple(int, int), optional
213
+ :param _request_auth: set to override the auth_settings for an a single
214
+ request; this effectively ignores the
215
+ authentication in the spec for a single request.
216
+ :type _request_auth: dict, optional
217
+ :param _content_type: force content-type for the request.
218
+ :type _content_type: str, Optional
219
+ :param _headers: set to override the headers for a single
220
+ request; this effectively ignores the headers
221
+ in the spec for a single request.
222
+ :type _headers: dict, optional
223
+ :param _host_index: set to override the host_index for a single
224
+ request; this effectively ignores the host_index
225
+ in the spec for a single request.
226
+ :type _host_index: int, optional
227
+ :return: Returns the result object.
228
+ """ # noqa: E501
229
+
230
+ _param = self._add_favorite_serialize(
231
+ add_favorite_request=add_favorite_request,
232
+ _request_auth=_request_auth,
233
+ _content_type=_content_type,
234
+ _headers=_headers,
235
+ _host_index=_host_index
236
+ )
237
+
238
+ _response_types_map: Dict[str, Optional[str]] = {
239
+ '200': "Favorite",
240
+ '400': "Error",
241
+ '403': "Error",
242
+ }
243
+ response_data = await self.api_client.call_api(
244
+ *_param,
245
+ _request_timeout=_request_timeout
246
+ )
247
+ return response_data.response
248
+
249
+
250
+ def _add_favorite_serialize(
251
+ self,
252
+ add_favorite_request,
253
+ _request_auth,
254
+ _content_type,
255
+ _headers,
256
+ _host_index,
257
+ ) -> RequestSerialized:
258
+
259
+ _host = None
260
+
261
+ _collection_formats: Dict[str, str] = {
262
+ }
263
+
264
+ _path_params: Dict[str, str] = {}
265
+ _query_params: List[Tuple[str, str]] = []
266
+ _header_params: Dict[str, Optional[str]] = _headers or {}
267
+ _form_params: List[Tuple[str, str]] = []
268
+ _files: Dict[
269
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
270
+ ] = {}
271
+ _body_params: Optional[bytes] = None
272
+
273
+ # process the path parameters
274
+ # process the query parameters
275
+ # process the header parameters
276
+ # process the form parameters
277
+ # process the body parameter
278
+ if add_favorite_request is not None:
279
+ _body_params = add_favorite_request
280
+
281
+
282
+ # set the HTTP header `Accept`
283
+ if 'Accept' not in _header_params:
284
+ _header_params['Accept'] = self.api_client.select_header_accept(
285
+ [
286
+ 'application/json'
287
+ ]
288
+ )
289
+
290
+ # set the HTTP header `Content-Type`
291
+ if _content_type:
292
+ _header_params['Content-Type'] = _content_type
293
+ else:
294
+ _default_content_type = (
295
+ self.api_client.select_header_content_type(
296
+ [
297
+ 'application/json'
298
+ ]
299
+ )
300
+ )
301
+ if _default_content_type is not None:
302
+ _header_params['Content-Type'] = _default_content_type
303
+
304
+ # authentication setting
305
+ _auth_settings: List[str] = [
306
+ 'authCookie'
307
+ ]
308
+
309
+ return self.api_client.param_serialize(
310
+ method='POST',
311
+ resource_path='/favorites',
312
+ path_params=_path_params,
313
+ query_params=_query_params,
314
+ header_params=_header_params,
315
+ body=_body_params,
316
+ post_params=_form_params,
317
+ files=_files,
318
+ auth_settings=_auth_settings,
319
+ collection_formats=_collection_formats,
320
+ _host=_host,
321
+ _request_auth=_request_auth
322
+ )
323
+
324
+
325
+
326
+
327
+ @validate_call
328
+ async def clear_favorite_group(
329
+ self,
330
+ favorite_group_type: Annotated[FavoriteType, Field(description="The type of group to fetch, must be a valid FavoriteType.")],
331
+ favorite_group_name: Annotated[StrictStr, Field(description="The name of the group to fetch, must be a name of a FavoriteGroup.")],
332
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
333
+ _request_timeout: Union[
334
+ None,
335
+ Annotated[StrictFloat, Field(gt=0)],
336
+ Tuple[
337
+ Annotated[StrictFloat, Field(gt=0)],
338
+ Annotated[StrictFloat, Field(gt=0)]
339
+ ]
340
+ ] = None,
341
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
342
+ _content_type: Optional[StrictStr] = None,
343
+ _headers: Optional[Dict[StrictStr, Any]] = None,
344
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
345
+ ) -> Success:
346
+ """Clear Favorite Group
347
+
348
+ Clear ALL contents of a specific favorite group.
349
+
350
+ :param favorite_group_type: The type of group to fetch, must be a valid FavoriteType. (required)
351
+ :type favorite_group_type: FavoriteType
352
+ :param favorite_group_name: The name of the group to fetch, must be a name of a FavoriteGroup. (required)
353
+ :type favorite_group_name: str
354
+ :param user_id: Must be a valid user ID. (required)
355
+ :type user_id: str
356
+ :param _request_timeout: timeout setting for this request. If one
357
+ number provided, it will be total request
358
+ timeout. It can also be a pair (tuple) of
359
+ (connection, read) timeouts.
360
+ :type _request_timeout: int, tuple(int, int), optional
361
+ :param _request_auth: set to override the auth_settings for an a single
362
+ request; this effectively ignores the
363
+ authentication in the spec for a single request.
364
+ :type _request_auth: dict, optional
365
+ :param _content_type: force content-type for the request.
366
+ :type _content_type: str, Optional
367
+ :param _headers: set to override the headers for a single
368
+ request; this effectively ignores the headers
369
+ in the spec for a single request.
370
+ :type _headers: dict, optional
371
+ :param _host_index: set to override the host_index for a single
372
+ request; this effectively ignores the host_index
373
+ in the spec for a single request.
374
+ :type _host_index: int, optional
375
+ :return: Returns the result object.
376
+ """ # noqa: E501
377
+
378
+ _param = self._clear_favorite_group_serialize(
379
+ favorite_group_type=favorite_group_type,
380
+ favorite_group_name=favorite_group_name,
381
+ user_id=user_id,
382
+ _request_auth=_request_auth,
383
+ _content_type=_content_type,
384
+ _headers=_headers,
385
+ _host_index=_host_index
386
+ )
387
+
388
+ _response_types_map: Dict[str, Optional[str]] = {
389
+ '200': "Success",
390
+ }
391
+ response_data = await self.api_client.call_api(
392
+ *_param,
393
+ _request_timeout=_request_timeout
394
+ )
395
+ await response_data.read()
396
+ return self.api_client.response_deserialize(
397
+ response_data=response_data,
398
+ response_types_map=_response_types_map,
399
+ ).data
400
+
401
+
402
+ @validate_call
403
+ async def clear_favorite_group_with_http_info(
404
+ self,
405
+ favorite_group_type: Annotated[FavoriteType, Field(description="The type of group to fetch, must be a valid FavoriteType.")],
406
+ favorite_group_name: Annotated[StrictStr, Field(description="The name of the group to fetch, must be a name of a FavoriteGroup.")],
407
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
408
+ _request_timeout: Union[
409
+ None,
410
+ Annotated[StrictFloat, Field(gt=0)],
411
+ Tuple[
412
+ Annotated[StrictFloat, Field(gt=0)],
413
+ Annotated[StrictFloat, Field(gt=0)]
414
+ ]
415
+ ] = None,
416
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
417
+ _content_type: Optional[StrictStr] = None,
418
+ _headers: Optional[Dict[StrictStr, Any]] = None,
419
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
420
+ ) -> ApiResponse[Success]:
421
+ """Clear Favorite Group
422
+
423
+ Clear ALL contents of a specific favorite group.
424
+
425
+ :param favorite_group_type: The type of group to fetch, must be a valid FavoriteType. (required)
426
+ :type favorite_group_type: FavoriteType
427
+ :param favorite_group_name: The name of the group to fetch, must be a name of a FavoriteGroup. (required)
428
+ :type favorite_group_name: str
429
+ :param user_id: Must be a valid user ID. (required)
430
+ :type user_id: str
431
+ :param _request_timeout: timeout setting for this request. If one
432
+ number provided, it will be total request
433
+ timeout. It can also be a pair (tuple) of
434
+ (connection, read) timeouts.
435
+ :type _request_timeout: int, tuple(int, int), optional
436
+ :param _request_auth: set to override the auth_settings for an a single
437
+ request; this effectively ignores the
438
+ authentication in the spec for a single request.
439
+ :type _request_auth: dict, optional
440
+ :param _content_type: force content-type for the request.
441
+ :type _content_type: str, Optional
442
+ :param _headers: set to override the headers for a single
443
+ request; this effectively ignores the headers
444
+ in the spec for a single request.
445
+ :type _headers: dict, optional
446
+ :param _host_index: set to override the host_index for a single
447
+ request; this effectively ignores the host_index
448
+ in the spec for a single request.
449
+ :type _host_index: int, optional
450
+ :return: Returns the result object.
451
+ """ # noqa: E501
452
+
453
+ _param = self._clear_favorite_group_serialize(
454
+ favorite_group_type=favorite_group_type,
455
+ favorite_group_name=favorite_group_name,
456
+ user_id=user_id,
457
+ _request_auth=_request_auth,
458
+ _content_type=_content_type,
459
+ _headers=_headers,
460
+ _host_index=_host_index
461
+ )
462
+
463
+ _response_types_map: Dict[str, Optional[str]] = {
464
+ '200': "Success",
465
+ }
466
+ response_data = await self.api_client.call_api(
467
+ *_param,
468
+ _request_timeout=_request_timeout
469
+ )
470
+ await response_data.read()
471
+ return self.api_client.response_deserialize(
472
+ response_data=response_data,
473
+ response_types_map=_response_types_map,
474
+ )
475
+
476
+
477
+ @validate_call
478
+ async def clear_favorite_group_without_preload_content(
479
+ self,
480
+ favorite_group_type: Annotated[FavoriteType, Field(description="The type of group to fetch, must be a valid FavoriteType.")],
481
+ favorite_group_name: Annotated[StrictStr, Field(description="The name of the group to fetch, must be a name of a FavoriteGroup.")],
482
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
483
+ _request_timeout: Union[
484
+ None,
485
+ Annotated[StrictFloat, Field(gt=0)],
486
+ Tuple[
487
+ Annotated[StrictFloat, Field(gt=0)],
488
+ Annotated[StrictFloat, Field(gt=0)]
489
+ ]
490
+ ] = None,
491
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
492
+ _content_type: Optional[StrictStr] = None,
493
+ _headers: Optional[Dict[StrictStr, Any]] = None,
494
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
495
+ ) -> RESTResponseType:
496
+ """Clear Favorite Group
497
+
498
+ Clear ALL contents of a specific favorite group.
499
+
500
+ :param favorite_group_type: The type of group to fetch, must be a valid FavoriteType. (required)
501
+ :type favorite_group_type: FavoriteType
502
+ :param favorite_group_name: The name of the group to fetch, must be a name of a FavoriteGroup. (required)
503
+ :type favorite_group_name: str
504
+ :param user_id: Must be a valid user ID. (required)
505
+ :type user_id: str
506
+ :param _request_timeout: timeout setting for this request. If one
507
+ number provided, it will be total request
508
+ timeout. It can also be a pair (tuple) of
509
+ (connection, read) timeouts.
510
+ :type _request_timeout: int, tuple(int, int), optional
511
+ :param _request_auth: set to override the auth_settings for an a single
512
+ request; this effectively ignores the
513
+ authentication in the spec for a single request.
514
+ :type _request_auth: dict, optional
515
+ :param _content_type: force content-type for the request.
516
+ :type _content_type: str, Optional
517
+ :param _headers: set to override the headers for a single
518
+ request; this effectively ignores the headers
519
+ in the spec for a single request.
520
+ :type _headers: dict, optional
521
+ :param _host_index: set to override the host_index for a single
522
+ request; this effectively ignores the host_index
523
+ in the spec for a single request.
524
+ :type _host_index: int, optional
525
+ :return: Returns the result object.
526
+ """ # noqa: E501
527
+
528
+ _param = self._clear_favorite_group_serialize(
529
+ favorite_group_type=favorite_group_type,
530
+ favorite_group_name=favorite_group_name,
531
+ user_id=user_id,
532
+ _request_auth=_request_auth,
533
+ _content_type=_content_type,
534
+ _headers=_headers,
535
+ _host_index=_host_index
536
+ )
537
+
538
+ _response_types_map: Dict[str, Optional[str]] = {
539
+ '200': "Success",
540
+ }
541
+ response_data = await self.api_client.call_api(
542
+ *_param,
543
+ _request_timeout=_request_timeout
544
+ )
545
+ return response_data.response
546
+
547
+
548
+ def _clear_favorite_group_serialize(
549
+ self,
550
+ favorite_group_type,
551
+ favorite_group_name,
552
+ user_id,
553
+ _request_auth,
554
+ _content_type,
555
+ _headers,
556
+ _host_index,
557
+ ) -> RequestSerialized:
558
+
559
+ _host = None
560
+
561
+ _collection_formats: Dict[str, str] = {
562
+ }
563
+
564
+ _path_params: Dict[str, str] = {}
565
+ _query_params: List[Tuple[str, str]] = []
566
+ _header_params: Dict[str, Optional[str]] = _headers or {}
567
+ _form_params: List[Tuple[str, str]] = []
568
+ _files: Dict[
569
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
570
+ ] = {}
571
+ _body_params: Optional[bytes] = None
572
+
573
+ # process the path parameters
574
+ if favorite_group_type is not None:
575
+ _path_params['favoriteGroupType'] = favorite_group_type.value
576
+ if favorite_group_name is not None:
577
+ _path_params['favoriteGroupName'] = favorite_group_name
578
+ if user_id is not None:
579
+ _path_params['userId'] = user_id
580
+ # process the query parameters
581
+ # process the header parameters
582
+ # process the form parameters
583
+ # process the body parameter
584
+
585
+
586
+ # set the HTTP header `Accept`
587
+ if 'Accept' not in _header_params:
588
+ _header_params['Accept'] = self.api_client.select_header_accept(
589
+ [
590
+ 'application/json'
591
+ ]
592
+ )
593
+
594
+
595
+ # authentication setting
596
+ _auth_settings: List[str] = [
597
+ 'authCookie'
598
+ ]
599
+
600
+ return self.api_client.param_serialize(
601
+ method='DELETE',
602
+ resource_path='/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}',
603
+ path_params=_path_params,
604
+ query_params=_query_params,
605
+ header_params=_header_params,
606
+ body=_body_params,
607
+ post_params=_form_params,
608
+ files=_files,
609
+ auth_settings=_auth_settings,
610
+ collection_formats=_collection_formats,
611
+ _host=_host,
612
+ _request_auth=_request_auth
613
+ )
614
+
615
+
616
+
617
+
618
+ @validate_call
619
+ async def get_favorite_group(
620
+ self,
621
+ favorite_group_type: Annotated[FavoriteType, Field(description="The type of group to fetch, must be a valid FavoriteType.")],
622
+ favorite_group_name: Annotated[StrictStr, Field(description="The name of the group to fetch, must be a name of a FavoriteGroup.")],
623
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
624
+ _request_timeout: Union[
625
+ None,
626
+ Annotated[StrictFloat, Field(gt=0)],
627
+ Tuple[
628
+ Annotated[StrictFloat, Field(gt=0)],
629
+ Annotated[StrictFloat, Field(gt=0)]
630
+ ]
631
+ ] = None,
632
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
633
+ _content_type: Optional[StrictStr] = None,
634
+ _headers: Optional[Dict[StrictStr, Any]] = None,
635
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
636
+ ) -> FavoriteGroup:
637
+ """Show Favorite Group
638
+
639
+ Fetch information about a specific favorite group.
640
+
641
+ :param favorite_group_type: The type of group to fetch, must be a valid FavoriteType. (required)
642
+ :type favorite_group_type: FavoriteType
643
+ :param favorite_group_name: The name of the group to fetch, must be a name of a FavoriteGroup. (required)
644
+ :type favorite_group_name: str
645
+ :param user_id: Must be a valid user ID. (required)
646
+ :type user_id: str
647
+ :param _request_timeout: timeout setting for this request. If one
648
+ number provided, it will be total request
649
+ timeout. It can also be a pair (tuple) of
650
+ (connection, read) timeouts.
651
+ :type _request_timeout: int, tuple(int, int), optional
652
+ :param _request_auth: set to override the auth_settings for an a single
653
+ request; this effectively ignores the
654
+ authentication in the spec for a single request.
655
+ :type _request_auth: dict, optional
656
+ :param _content_type: force content-type for the request.
657
+ :type _content_type: str, Optional
658
+ :param _headers: set to override the headers for a single
659
+ request; this effectively ignores the headers
660
+ in the spec for a single request.
661
+ :type _headers: dict, optional
662
+ :param _host_index: set to override the host_index for a single
663
+ request; this effectively ignores the host_index
664
+ in the spec for a single request.
665
+ :type _host_index: int, optional
666
+ :return: Returns the result object.
667
+ """ # noqa: E501
668
+
669
+ _param = self._get_favorite_group_serialize(
670
+ favorite_group_type=favorite_group_type,
671
+ favorite_group_name=favorite_group_name,
672
+ user_id=user_id,
673
+ _request_auth=_request_auth,
674
+ _content_type=_content_type,
675
+ _headers=_headers,
676
+ _host_index=_host_index
677
+ )
678
+
679
+ _response_types_map: Dict[str, Optional[str]] = {
680
+ '200': "FavoriteGroup",
681
+ }
682
+ response_data = await self.api_client.call_api(
683
+ *_param,
684
+ _request_timeout=_request_timeout
685
+ )
686
+ await response_data.read()
687
+ return self.api_client.response_deserialize(
688
+ response_data=response_data,
689
+ response_types_map=_response_types_map,
690
+ ).data
691
+
692
+
693
+ @validate_call
694
+ async def get_favorite_group_with_http_info(
695
+ self,
696
+ favorite_group_type: Annotated[FavoriteType, Field(description="The type of group to fetch, must be a valid FavoriteType.")],
697
+ favorite_group_name: Annotated[StrictStr, Field(description="The name of the group to fetch, must be a name of a FavoriteGroup.")],
698
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
699
+ _request_timeout: Union[
700
+ None,
701
+ Annotated[StrictFloat, Field(gt=0)],
702
+ Tuple[
703
+ Annotated[StrictFloat, Field(gt=0)],
704
+ Annotated[StrictFloat, Field(gt=0)]
705
+ ]
706
+ ] = None,
707
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
708
+ _content_type: Optional[StrictStr] = None,
709
+ _headers: Optional[Dict[StrictStr, Any]] = None,
710
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
711
+ ) -> ApiResponse[FavoriteGroup]:
712
+ """Show Favorite Group
713
+
714
+ Fetch information about a specific favorite group.
715
+
716
+ :param favorite_group_type: The type of group to fetch, must be a valid FavoriteType. (required)
717
+ :type favorite_group_type: FavoriteType
718
+ :param favorite_group_name: The name of the group to fetch, must be a name of a FavoriteGroup. (required)
719
+ :type favorite_group_name: str
720
+ :param user_id: Must be a valid user ID. (required)
721
+ :type user_id: str
722
+ :param _request_timeout: timeout setting for this request. If one
723
+ number provided, it will be total request
724
+ timeout. It can also be a pair (tuple) of
725
+ (connection, read) timeouts.
726
+ :type _request_timeout: int, tuple(int, int), optional
727
+ :param _request_auth: set to override the auth_settings for an a single
728
+ request; this effectively ignores the
729
+ authentication in the spec for a single request.
730
+ :type _request_auth: dict, optional
731
+ :param _content_type: force content-type for the request.
732
+ :type _content_type: str, Optional
733
+ :param _headers: set to override the headers for a single
734
+ request; this effectively ignores the headers
735
+ in the spec for a single request.
736
+ :type _headers: dict, optional
737
+ :param _host_index: set to override the host_index for a single
738
+ request; this effectively ignores the host_index
739
+ in the spec for a single request.
740
+ :type _host_index: int, optional
741
+ :return: Returns the result object.
742
+ """ # noqa: E501
743
+
744
+ _param = self._get_favorite_group_serialize(
745
+ favorite_group_type=favorite_group_type,
746
+ favorite_group_name=favorite_group_name,
747
+ user_id=user_id,
748
+ _request_auth=_request_auth,
749
+ _content_type=_content_type,
750
+ _headers=_headers,
751
+ _host_index=_host_index
752
+ )
753
+
754
+ _response_types_map: Dict[str, Optional[str]] = {
755
+ '200': "FavoriteGroup",
756
+ }
757
+ response_data = await self.api_client.call_api(
758
+ *_param,
759
+ _request_timeout=_request_timeout
760
+ )
761
+ await response_data.read()
762
+ return self.api_client.response_deserialize(
763
+ response_data=response_data,
764
+ response_types_map=_response_types_map,
765
+ )
766
+
767
+
768
+ @validate_call
769
+ async def get_favorite_group_without_preload_content(
770
+ self,
771
+ favorite_group_type: Annotated[FavoriteType, Field(description="The type of group to fetch, must be a valid FavoriteType.")],
772
+ favorite_group_name: Annotated[StrictStr, Field(description="The name of the group to fetch, must be a name of a FavoriteGroup.")],
773
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
774
+ _request_timeout: Union[
775
+ None,
776
+ Annotated[StrictFloat, Field(gt=0)],
777
+ Tuple[
778
+ Annotated[StrictFloat, Field(gt=0)],
779
+ Annotated[StrictFloat, Field(gt=0)]
780
+ ]
781
+ ] = None,
782
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
783
+ _content_type: Optional[StrictStr] = None,
784
+ _headers: Optional[Dict[StrictStr, Any]] = None,
785
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
786
+ ) -> RESTResponseType:
787
+ """Show Favorite Group
788
+
789
+ Fetch information about a specific favorite group.
790
+
791
+ :param favorite_group_type: The type of group to fetch, must be a valid FavoriteType. (required)
792
+ :type favorite_group_type: FavoriteType
793
+ :param favorite_group_name: The name of the group to fetch, must be a name of a FavoriteGroup. (required)
794
+ :type favorite_group_name: str
795
+ :param user_id: Must be a valid user ID. (required)
796
+ :type user_id: str
797
+ :param _request_timeout: timeout setting for this request. If one
798
+ number provided, it will be total request
799
+ timeout. It can also be a pair (tuple) of
800
+ (connection, read) timeouts.
801
+ :type _request_timeout: int, tuple(int, int), optional
802
+ :param _request_auth: set to override the auth_settings for an a single
803
+ request; this effectively ignores the
804
+ authentication in the spec for a single request.
805
+ :type _request_auth: dict, optional
806
+ :param _content_type: force content-type for the request.
807
+ :type _content_type: str, Optional
808
+ :param _headers: set to override the headers for a single
809
+ request; this effectively ignores the headers
810
+ in the spec for a single request.
811
+ :type _headers: dict, optional
812
+ :param _host_index: set to override the host_index for a single
813
+ request; this effectively ignores the host_index
814
+ in the spec for a single request.
815
+ :type _host_index: int, optional
816
+ :return: Returns the result object.
817
+ """ # noqa: E501
818
+
819
+ _param = self._get_favorite_group_serialize(
820
+ favorite_group_type=favorite_group_type,
821
+ favorite_group_name=favorite_group_name,
822
+ user_id=user_id,
823
+ _request_auth=_request_auth,
824
+ _content_type=_content_type,
825
+ _headers=_headers,
826
+ _host_index=_host_index
827
+ )
828
+
829
+ _response_types_map: Dict[str, Optional[str]] = {
830
+ '200': "FavoriteGroup",
831
+ }
832
+ response_data = await self.api_client.call_api(
833
+ *_param,
834
+ _request_timeout=_request_timeout
835
+ )
836
+ return response_data.response
837
+
838
+
839
+ def _get_favorite_group_serialize(
840
+ self,
841
+ favorite_group_type,
842
+ favorite_group_name,
843
+ user_id,
844
+ _request_auth,
845
+ _content_type,
846
+ _headers,
847
+ _host_index,
848
+ ) -> RequestSerialized:
849
+
850
+ _host = None
851
+
852
+ _collection_formats: Dict[str, str] = {
853
+ }
854
+
855
+ _path_params: Dict[str, str] = {}
856
+ _query_params: List[Tuple[str, str]] = []
857
+ _header_params: Dict[str, Optional[str]] = _headers or {}
858
+ _form_params: List[Tuple[str, str]] = []
859
+ _files: Dict[
860
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
861
+ ] = {}
862
+ _body_params: Optional[bytes] = None
863
+
864
+ # process the path parameters
865
+ if favorite_group_type is not None:
866
+ _path_params['favoriteGroupType'] = favorite_group_type.value
867
+ if favorite_group_name is not None:
868
+ _path_params['favoriteGroupName'] = favorite_group_name
869
+ if user_id is not None:
870
+ _path_params['userId'] = user_id
871
+ # process the query parameters
872
+ # process the header parameters
873
+ # process the form parameters
874
+ # process the body parameter
875
+
876
+
877
+ # set the HTTP header `Accept`
878
+ if 'Accept' not in _header_params:
879
+ _header_params['Accept'] = self.api_client.select_header_accept(
880
+ [
881
+ 'application/json'
882
+ ]
883
+ )
884
+
885
+
886
+ # authentication setting
887
+ _auth_settings: List[str] = [
888
+ 'authCookie'
889
+ ]
890
+
891
+ return self.api_client.param_serialize(
892
+ method='GET',
893
+ resource_path='/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}',
894
+ path_params=_path_params,
895
+ query_params=_query_params,
896
+ header_params=_header_params,
897
+ body=_body_params,
898
+ post_params=_form_params,
899
+ files=_files,
900
+ auth_settings=_auth_settings,
901
+ collection_formats=_collection_formats,
902
+ _host=_host,
903
+ _request_auth=_request_auth
904
+ )
905
+
906
+
907
+
908
+
909
+ @validate_call
910
+ async def get_favorite_groups(
911
+ self,
912
+ n: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="The number of objects to return.")] = None,
913
+ offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="A zero-based offset from the default object sorting from where search results start.")] = None,
914
+ user_id: Annotated[Optional[StrictStr], Field(description="Target user to see information on, admin-only.")] = None,
915
+ owner_id: Annotated[Optional[StrictStr], Field(description="The owner whose favorite groups to return. Must be a UserID.")] = None,
916
+ _request_timeout: Union[
917
+ None,
918
+ Annotated[StrictFloat, Field(gt=0)],
919
+ Tuple[
920
+ Annotated[StrictFloat, Field(gt=0)],
921
+ Annotated[StrictFloat, Field(gt=0)]
922
+ ]
923
+ ] = None,
924
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
925
+ _content_type: Optional[StrictStr] = None,
926
+ _headers: Optional[Dict[StrictStr, Any]] = None,
927
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
928
+ ) -> List[FavoriteGroup]:
929
+ """List Favorite Groups
930
+
931
+ Return a list of favorite groups owned by a user. Returns the same information as `getFavoriteGroups`.
932
+
933
+ :param n: The number of objects to return.
934
+ :type n: int
935
+ :param offset: A zero-based offset from the default object sorting from where search results start.
936
+ :type offset: int
937
+ :param user_id: Target user to see information on, admin-only.
938
+ :type user_id: str
939
+ :param owner_id: The owner whose favorite groups to return. Must be a UserID.
940
+ :type owner_id: str
941
+ :param _request_timeout: timeout setting for this request. If one
942
+ number provided, it will be total request
943
+ timeout. It can also be a pair (tuple) of
944
+ (connection, read) timeouts.
945
+ :type _request_timeout: int, tuple(int, int), optional
946
+ :param _request_auth: set to override the auth_settings for an a single
947
+ request; this effectively ignores the
948
+ authentication in the spec for a single request.
949
+ :type _request_auth: dict, optional
950
+ :param _content_type: force content-type for the request.
951
+ :type _content_type: str, Optional
952
+ :param _headers: set to override the headers for a single
953
+ request; this effectively ignores the headers
954
+ in the spec for a single request.
955
+ :type _headers: dict, optional
956
+ :param _host_index: set to override the host_index for a single
957
+ request; this effectively ignores the host_index
958
+ in the spec for a single request.
959
+ :type _host_index: int, optional
960
+ :return: Returns the result object.
961
+ """ # noqa: E501
962
+
963
+ _param = self._get_favorite_groups_serialize(
964
+ n=n,
965
+ offset=offset,
966
+ user_id=user_id,
967
+ owner_id=owner_id,
968
+ _request_auth=_request_auth,
969
+ _content_type=_content_type,
970
+ _headers=_headers,
971
+ _host_index=_host_index
972
+ )
973
+
974
+ _response_types_map: Dict[str, Optional[str]] = {
975
+ '200': "List[FavoriteGroup]",
976
+ '401': "Error",
977
+ }
978
+ response_data = await self.api_client.call_api(
979
+ *_param,
980
+ _request_timeout=_request_timeout
981
+ )
982
+ await response_data.read()
983
+ return self.api_client.response_deserialize(
984
+ response_data=response_data,
985
+ response_types_map=_response_types_map,
986
+ ).data
987
+
988
+
989
+ @validate_call
990
+ async def get_favorite_groups_with_http_info(
991
+ self,
992
+ n: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="The number of objects to return.")] = None,
993
+ offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="A zero-based offset from the default object sorting from where search results start.")] = None,
994
+ user_id: Annotated[Optional[StrictStr], Field(description="Target user to see information on, admin-only.")] = None,
995
+ owner_id: Annotated[Optional[StrictStr], Field(description="The owner whose favorite groups to return. Must be a UserID.")] = None,
996
+ _request_timeout: Union[
997
+ None,
998
+ Annotated[StrictFloat, Field(gt=0)],
999
+ Tuple[
1000
+ Annotated[StrictFloat, Field(gt=0)],
1001
+ Annotated[StrictFloat, Field(gt=0)]
1002
+ ]
1003
+ ] = None,
1004
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1005
+ _content_type: Optional[StrictStr] = None,
1006
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1007
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1008
+ ) -> ApiResponse[List[FavoriteGroup]]:
1009
+ """List Favorite Groups
1010
+
1011
+ Return a list of favorite groups owned by a user. Returns the same information as `getFavoriteGroups`.
1012
+
1013
+ :param n: The number of objects to return.
1014
+ :type n: int
1015
+ :param offset: A zero-based offset from the default object sorting from where search results start.
1016
+ :type offset: int
1017
+ :param user_id: Target user to see information on, admin-only.
1018
+ :type user_id: str
1019
+ :param owner_id: The owner whose favorite groups to return. Must be a UserID.
1020
+ :type owner_id: str
1021
+ :param _request_timeout: timeout setting for this request. If one
1022
+ number provided, it will be total request
1023
+ timeout. It can also be a pair (tuple) of
1024
+ (connection, read) timeouts.
1025
+ :type _request_timeout: int, tuple(int, int), optional
1026
+ :param _request_auth: set to override the auth_settings for an a single
1027
+ request; this effectively ignores the
1028
+ authentication in the spec for a single request.
1029
+ :type _request_auth: dict, optional
1030
+ :param _content_type: force content-type for the request.
1031
+ :type _content_type: str, Optional
1032
+ :param _headers: set to override the headers for a single
1033
+ request; this effectively ignores the headers
1034
+ in the spec for a single request.
1035
+ :type _headers: dict, optional
1036
+ :param _host_index: set to override the host_index for a single
1037
+ request; this effectively ignores the host_index
1038
+ in the spec for a single request.
1039
+ :type _host_index: int, optional
1040
+ :return: Returns the result object.
1041
+ """ # noqa: E501
1042
+
1043
+ _param = self._get_favorite_groups_serialize(
1044
+ n=n,
1045
+ offset=offset,
1046
+ user_id=user_id,
1047
+ owner_id=owner_id,
1048
+ _request_auth=_request_auth,
1049
+ _content_type=_content_type,
1050
+ _headers=_headers,
1051
+ _host_index=_host_index
1052
+ )
1053
+
1054
+ _response_types_map: Dict[str, Optional[str]] = {
1055
+ '200': "List[FavoriteGroup]",
1056
+ '401': "Error",
1057
+ }
1058
+ response_data = await self.api_client.call_api(
1059
+ *_param,
1060
+ _request_timeout=_request_timeout
1061
+ )
1062
+ await response_data.read()
1063
+ return self.api_client.response_deserialize(
1064
+ response_data=response_data,
1065
+ response_types_map=_response_types_map,
1066
+ )
1067
+
1068
+
1069
+ @validate_call
1070
+ async def get_favorite_groups_without_preload_content(
1071
+ self,
1072
+ n: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="The number of objects to return.")] = None,
1073
+ offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="A zero-based offset from the default object sorting from where search results start.")] = None,
1074
+ user_id: Annotated[Optional[StrictStr], Field(description="Target user to see information on, admin-only.")] = None,
1075
+ owner_id: Annotated[Optional[StrictStr], Field(description="The owner whose favorite groups to return. Must be a UserID.")] = None,
1076
+ _request_timeout: Union[
1077
+ None,
1078
+ Annotated[StrictFloat, Field(gt=0)],
1079
+ Tuple[
1080
+ Annotated[StrictFloat, Field(gt=0)],
1081
+ Annotated[StrictFloat, Field(gt=0)]
1082
+ ]
1083
+ ] = None,
1084
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1085
+ _content_type: Optional[StrictStr] = None,
1086
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1087
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1088
+ ) -> RESTResponseType:
1089
+ """List Favorite Groups
1090
+
1091
+ Return a list of favorite groups owned by a user. Returns the same information as `getFavoriteGroups`.
1092
+
1093
+ :param n: The number of objects to return.
1094
+ :type n: int
1095
+ :param offset: A zero-based offset from the default object sorting from where search results start.
1096
+ :type offset: int
1097
+ :param user_id: Target user to see information on, admin-only.
1098
+ :type user_id: str
1099
+ :param owner_id: The owner whose favorite groups to return. Must be a UserID.
1100
+ :type owner_id: str
1101
+ :param _request_timeout: timeout setting for this request. If one
1102
+ number provided, it will be total request
1103
+ timeout. It can also be a pair (tuple) of
1104
+ (connection, read) timeouts.
1105
+ :type _request_timeout: int, tuple(int, int), optional
1106
+ :param _request_auth: set to override the auth_settings for an a single
1107
+ request; this effectively ignores the
1108
+ authentication in the spec for a single request.
1109
+ :type _request_auth: dict, optional
1110
+ :param _content_type: force content-type for the request.
1111
+ :type _content_type: str, Optional
1112
+ :param _headers: set to override the headers for a single
1113
+ request; this effectively ignores the headers
1114
+ in the spec for a single request.
1115
+ :type _headers: dict, optional
1116
+ :param _host_index: set to override the host_index for a single
1117
+ request; this effectively ignores the host_index
1118
+ in the spec for a single request.
1119
+ :type _host_index: int, optional
1120
+ :return: Returns the result object.
1121
+ """ # noqa: E501
1122
+
1123
+ _param = self._get_favorite_groups_serialize(
1124
+ n=n,
1125
+ offset=offset,
1126
+ user_id=user_id,
1127
+ owner_id=owner_id,
1128
+ _request_auth=_request_auth,
1129
+ _content_type=_content_type,
1130
+ _headers=_headers,
1131
+ _host_index=_host_index
1132
+ )
1133
+
1134
+ _response_types_map: Dict[str, Optional[str]] = {
1135
+ '200': "List[FavoriteGroup]",
1136
+ '401': "Error",
1137
+ }
1138
+ response_data = await self.api_client.call_api(
1139
+ *_param,
1140
+ _request_timeout=_request_timeout
1141
+ )
1142
+ return response_data.response
1143
+
1144
+
1145
+ def _get_favorite_groups_serialize(
1146
+ self,
1147
+ n,
1148
+ offset,
1149
+ user_id,
1150
+ owner_id,
1151
+ _request_auth,
1152
+ _content_type,
1153
+ _headers,
1154
+ _host_index,
1155
+ ) -> RequestSerialized:
1156
+
1157
+ _host = None
1158
+
1159
+ _collection_formats: Dict[str, str] = {
1160
+ }
1161
+
1162
+ _path_params: Dict[str, str] = {}
1163
+ _query_params: List[Tuple[str, str]] = []
1164
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1165
+ _form_params: List[Tuple[str, str]] = []
1166
+ _files: Dict[
1167
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1168
+ ] = {}
1169
+ _body_params: Optional[bytes] = None
1170
+
1171
+ # process the path parameters
1172
+ # process the query parameters
1173
+ if n is not None:
1174
+
1175
+ _query_params.append(('n', n))
1176
+
1177
+ if offset is not None:
1178
+
1179
+ _query_params.append(('offset', offset))
1180
+
1181
+ if user_id is not None:
1182
+
1183
+ _query_params.append(('userId', user_id))
1184
+
1185
+ if owner_id is not None:
1186
+
1187
+ _query_params.append(('ownerId', owner_id))
1188
+
1189
+ # process the header parameters
1190
+ # process the form parameters
1191
+ # process the body parameter
1192
+
1193
+
1194
+ # set the HTTP header `Accept`
1195
+ if 'Accept' not in _header_params:
1196
+ _header_params['Accept'] = self.api_client.select_header_accept(
1197
+ [
1198
+ 'application/json'
1199
+ ]
1200
+ )
1201
+
1202
+
1203
+ # authentication setting
1204
+ _auth_settings: List[str] = [
1205
+ 'authCookie'
1206
+ ]
1207
+
1208
+ return self.api_client.param_serialize(
1209
+ method='GET',
1210
+ resource_path='/favorite/groups',
1211
+ path_params=_path_params,
1212
+ query_params=_query_params,
1213
+ header_params=_header_params,
1214
+ body=_body_params,
1215
+ post_params=_form_params,
1216
+ files=_files,
1217
+ auth_settings=_auth_settings,
1218
+ collection_formats=_collection_formats,
1219
+ _host=_host,
1220
+ _request_auth=_request_auth
1221
+ )
1222
+
1223
+
1224
+
1225
+
1226
+ @validate_call
1227
+ async def get_favorite_limits(
1228
+ self,
1229
+ _request_timeout: Union[
1230
+ None,
1231
+ Annotated[StrictFloat, Field(gt=0)],
1232
+ Tuple[
1233
+ Annotated[StrictFloat, Field(gt=0)],
1234
+ Annotated[StrictFloat, Field(gt=0)]
1235
+ ]
1236
+ ] = None,
1237
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1238
+ _content_type: Optional[StrictStr] = None,
1239
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1240
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1241
+ ) -> FavoriteLimits:
1242
+ """Get Favorite Limits
1243
+
1244
+ Return information about a specific Favorite.
1245
+
1246
+ :param _request_timeout: timeout setting for this request. If one
1247
+ number provided, it will be total request
1248
+ timeout. It can also be a pair (tuple) of
1249
+ (connection, read) timeouts.
1250
+ :type _request_timeout: int, tuple(int, int), optional
1251
+ :param _request_auth: set to override the auth_settings for an a single
1252
+ request; this effectively ignores the
1253
+ authentication in the spec for a single request.
1254
+ :type _request_auth: dict, optional
1255
+ :param _content_type: force content-type for the request.
1256
+ :type _content_type: str, Optional
1257
+ :param _headers: set to override the headers for a single
1258
+ request; this effectively ignores the headers
1259
+ in the spec for a single request.
1260
+ :type _headers: dict, optional
1261
+ :param _host_index: set to override the host_index for a single
1262
+ request; this effectively ignores the host_index
1263
+ in the spec for a single request.
1264
+ :type _host_index: int, optional
1265
+ :return: Returns the result object.
1266
+ """ # noqa: E501
1267
+
1268
+ _param = self._get_favorite_limits_serialize(
1269
+ _request_auth=_request_auth,
1270
+ _content_type=_content_type,
1271
+ _headers=_headers,
1272
+ _host_index=_host_index
1273
+ )
1274
+
1275
+ _response_types_map: Dict[str, Optional[str]] = {
1276
+ '200': "FavoriteLimits",
1277
+ '401': "Error",
1278
+ }
1279
+ response_data = await self.api_client.call_api(
1280
+ *_param,
1281
+ _request_timeout=_request_timeout
1282
+ )
1283
+ await response_data.read()
1284
+ return self.api_client.response_deserialize(
1285
+ response_data=response_data,
1286
+ response_types_map=_response_types_map,
1287
+ ).data
1288
+
1289
+
1290
+ @validate_call
1291
+ async def get_favorite_limits_with_http_info(
1292
+ self,
1293
+ _request_timeout: Union[
1294
+ None,
1295
+ Annotated[StrictFloat, Field(gt=0)],
1296
+ Tuple[
1297
+ Annotated[StrictFloat, Field(gt=0)],
1298
+ Annotated[StrictFloat, Field(gt=0)]
1299
+ ]
1300
+ ] = None,
1301
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1302
+ _content_type: Optional[StrictStr] = None,
1303
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1304
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1305
+ ) -> ApiResponse[FavoriteLimits]:
1306
+ """Get Favorite Limits
1307
+
1308
+ Return information about a specific Favorite.
1309
+
1310
+ :param _request_timeout: timeout setting for this request. If one
1311
+ number provided, it will be total request
1312
+ timeout. It can also be a pair (tuple) of
1313
+ (connection, read) timeouts.
1314
+ :type _request_timeout: int, tuple(int, int), optional
1315
+ :param _request_auth: set to override the auth_settings for an a single
1316
+ request; this effectively ignores the
1317
+ authentication in the spec for a single request.
1318
+ :type _request_auth: dict, optional
1319
+ :param _content_type: force content-type for the request.
1320
+ :type _content_type: str, Optional
1321
+ :param _headers: set to override the headers for a single
1322
+ request; this effectively ignores the headers
1323
+ in the spec for a single request.
1324
+ :type _headers: dict, optional
1325
+ :param _host_index: set to override the host_index for a single
1326
+ request; this effectively ignores the host_index
1327
+ in the spec for a single request.
1328
+ :type _host_index: int, optional
1329
+ :return: Returns the result object.
1330
+ """ # noqa: E501
1331
+
1332
+ _param = self._get_favorite_limits_serialize(
1333
+ _request_auth=_request_auth,
1334
+ _content_type=_content_type,
1335
+ _headers=_headers,
1336
+ _host_index=_host_index
1337
+ )
1338
+
1339
+ _response_types_map: Dict[str, Optional[str]] = {
1340
+ '200': "FavoriteLimits",
1341
+ '401': "Error",
1342
+ }
1343
+ response_data = await self.api_client.call_api(
1344
+ *_param,
1345
+ _request_timeout=_request_timeout
1346
+ )
1347
+ await response_data.read()
1348
+ return self.api_client.response_deserialize(
1349
+ response_data=response_data,
1350
+ response_types_map=_response_types_map,
1351
+ )
1352
+
1353
+
1354
+ @validate_call
1355
+ async def get_favorite_limits_without_preload_content(
1356
+ self,
1357
+ _request_timeout: Union[
1358
+ None,
1359
+ Annotated[StrictFloat, Field(gt=0)],
1360
+ Tuple[
1361
+ Annotated[StrictFloat, Field(gt=0)],
1362
+ Annotated[StrictFloat, Field(gt=0)]
1363
+ ]
1364
+ ] = None,
1365
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1366
+ _content_type: Optional[StrictStr] = None,
1367
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1368
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1369
+ ) -> RESTResponseType:
1370
+ """Get Favorite Limits
1371
+
1372
+ Return information about a specific Favorite.
1373
+
1374
+ :param _request_timeout: timeout setting for this request. If one
1375
+ number provided, it will be total request
1376
+ timeout. It can also be a pair (tuple) of
1377
+ (connection, read) timeouts.
1378
+ :type _request_timeout: int, tuple(int, int), optional
1379
+ :param _request_auth: set to override the auth_settings for an a single
1380
+ request; this effectively ignores the
1381
+ authentication in the spec for a single request.
1382
+ :type _request_auth: dict, optional
1383
+ :param _content_type: force content-type for the request.
1384
+ :type _content_type: str, Optional
1385
+ :param _headers: set to override the headers for a single
1386
+ request; this effectively ignores the headers
1387
+ in the spec for a single request.
1388
+ :type _headers: dict, optional
1389
+ :param _host_index: set to override the host_index for a single
1390
+ request; this effectively ignores the host_index
1391
+ in the spec for a single request.
1392
+ :type _host_index: int, optional
1393
+ :return: Returns the result object.
1394
+ """ # noqa: E501
1395
+
1396
+ _param = self._get_favorite_limits_serialize(
1397
+ _request_auth=_request_auth,
1398
+ _content_type=_content_type,
1399
+ _headers=_headers,
1400
+ _host_index=_host_index
1401
+ )
1402
+
1403
+ _response_types_map: Dict[str, Optional[str]] = {
1404
+ '200': "FavoriteLimits",
1405
+ '401': "Error",
1406
+ }
1407
+ response_data = await self.api_client.call_api(
1408
+ *_param,
1409
+ _request_timeout=_request_timeout
1410
+ )
1411
+ return response_data.response
1412
+
1413
+
1414
+ def _get_favorite_limits_serialize(
1415
+ self,
1416
+ _request_auth,
1417
+ _content_type,
1418
+ _headers,
1419
+ _host_index,
1420
+ ) -> RequestSerialized:
1421
+
1422
+ _host = None
1423
+
1424
+ _collection_formats: Dict[str, str] = {
1425
+ }
1426
+
1427
+ _path_params: Dict[str, str] = {}
1428
+ _query_params: List[Tuple[str, str]] = []
1429
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1430
+ _form_params: List[Tuple[str, str]] = []
1431
+ _files: Dict[
1432
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1433
+ ] = {}
1434
+ _body_params: Optional[bytes] = None
1435
+
1436
+ # process the path parameters
1437
+ # process the query parameters
1438
+ # process the header parameters
1439
+ # process the form parameters
1440
+ # process the body parameter
1441
+
1442
+
1443
+ # set the HTTP header `Accept`
1444
+ if 'Accept' not in _header_params:
1445
+ _header_params['Accept'] = self.api_client.select_header_accept(
1446
+ [
1447
+ 'application/json'
1448
+ ]
1449
+ )
1450
+
1451
+
1452
+ # authentication setting
1453
+ _auth_settings: List[str] = [
1454
+ 'authCookie'
1455
+ ]
1456
+
1457
+ return self.api_client.param_serialize(
1458
+ method='GET',
1459
+ resource_path='/auth/user/favoritelimits',
1460
+ path_params=_path_params,
1461
+ query_params=_query_params,
1462
+ header_params=_header_params,
1463
+ body=_body_params,
1464
+ post_params=_form_params,
1465
+ files=_files,
1466
+ auth_settings=_auth_settings,
1467
+ collection_formats=_collection_formats,
1468
+ _host=_host,
1469
+ _request_auth=_request_auth
1470
+ )
1471
+
1472
+
1473
+
1474
+
1475
+ @validate_call
1476
+ async def get_favorites(
1477
+ self,
1478
+ n: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="The number of objects to return.")] = None,
1479
+ offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="A zero-based offset from the default object sorting from where search results start.")] = None,
1480
+ type: Annotated[Optional[StrictStr], Field(description="The type of favorites to return, FavoriteType.")] = None,
1481
+ tag: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="Tags to include (comma-separated). Any of the tags needs to be present.")] = None,
1482
+ _request_timeout: Union[
1483
+ None,
1484
+ Annotated[StrictFloat, Field(gt=0)],
1485
+ Tuple[
1486
+ Annotated[StrictFloat, Field(gt=0)],
1487
+ Annotated[StrictFloat, Field(gt=0)]
1488
+ ]
1489
+ ] = None,
1490
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1491
+ _content_type: Optional[StrictStr] = None,
1492
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1493
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1494
+ ) -> List[Favorite]:
1495
+ """List Favorites
1496
+
1497
+ Returns a list of favorites.
1498
+
1499
+ :param n: The number of objects to return.
1500
+ :type n: int
1501
+ :param offset: A zero-based offset from the default object sorting from where search results start.
1502
+ :type offset: int
1503
+ :param type: The type of favorites to return, FavoriteType.
1504
+ :type type: str
1505
+ :param tag: Tags to include (comma-separated). Any of the tags needs to be present.
1506
+ :type tag: str
1507
+ :param _request_timeout: timeout setting for this request. If one
1508
+ number provided, it will be total request
1509
+ timeout. It can also be a pair (tuple) of
1510
+ (connection, read) timeouts.
1511
+ :type _request_timeout: int, tuple(int, int), optional
1512
+ :param _request_auth: set to override the auth_settings for an a single
1513
+ request; this effectively ignores the
1514
+ authentication in the spec for a single request.
1515
+ :type _request_auth: dict, optional
1516
+ :param _content_type: force content-type for the request.
1517
+ :type _content_type: str, Optional
1518
+ :param _headers: set to override the headers for a single
1519
+ request; this effectively ignores the headers
1520
+ in the spec for a single request.
1521
+ :type _headers: dict, optional
1522
+ :param _host_index: set to override the host_index for a single
1523
+ request; this effectively ignores the host_index
1524
+ in the spec for a single request.
1525
+ :type _host_index: int, optional
1526
+ :return: Returns the result object.
1527
+ """ # noqa: E501
1528
+
1529
+ _param = self._get_favorites_serialize(
1530
+ n=n,
1531
+ offset=offset,
1532
+ type=type,
1533
+ tag=tag,
1534
+ _request_auth=_request_auth,
1535
+ _content_type=_content_type,
1536
+ _headers=_headers,
1537
+ _host_index=_host_index
1538
+ )
1539
+
1540
+ _response_types_map: Dict[str, Optional[str]] = {
1541
+ '200': "List[Favorite]",
1542
+ '401': "Error",
1543
+ }
1544
+ response_data = await self.api_client.call_api(
1545
+ *_param,
1546
+ _request_timeout=_request_timeout
1547
+ )
1548
+ await response_data.read()
1549
+ return self.api_client.response_deserialize(
1550
+ response_data=response_data,
1551
+ response_types_map=_response_types_map,
1552
+ ).data
1553
+
1554
+
1555
+ @validate_call
1556
+ async def get_favorites_with_http_info(
1557
+ self,
1558
+ n: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="The number of objects to return.")] = None,
1559
+ offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="A zero-based offset from the default object sorting from where search results start.")] = None,
1560
+ type: Annotated[Optional[StrictStr], Field(description="The type of favorites to return, FavoriteType.")] = None,
1561
+ tag: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="Tags to include (comma-separated). Any of the tags needs to be present.")] = None,
1562
+ _request_timeout: Union[
1563
+ None,
1564
+ Annotated[StrictFloat, Field(gt=0)],
1565
+ Tuple[
1566
+ Annotated[StrictFloat, Field(gt=0)],
1567
+ Annotated[StrictFloat, Field(gt=0)]
1568
+ ]
1569
+ ] = None,
1570
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1571
+ _content_type: Optional[StrictStr] = None,
1572
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1573
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1574
+ ) -> ApiResponse[List[Favorite]]:
1575
+ """List Favorites
1576
+
1577
+ Returns a list of favorites.
1578
+
1579
+ :param n: The number of objects to return.
1580
+ :type n: int
1581
+ :param offset: A zero-based offset from the default object sorting from where search results start.
1582
+ :type offset: int
1583
+ :param type: The type of favorites to return, FavoriteType.
1584
+ :type type: str
1585
+ :param tag: Tags to include (comma-separated). Any of the tags needs to be present.
1586
+ :type tag: str
1587
+ :param _request_timeout: timeout setting for this request. If one
1588
+ number provided, it will be total request
1589
+ timeout. It can also be a pair (tuple) of
1590
+ (connection, read) timeouts.
1591
+ :type _request_timeout: int, tuple(int, int), optional
1592
+ :param _request_auth: set to override the auth_settings for an a single
1593
+ request; this effectively ignores the
1594
+ authentication in the spec for a single request.
1595
+ :type _request_auth: dict, optional
1596
+ :param _content_type: force content-type for the request.
1597
+ :type _content_type: str, Optional
1598
+ :param _headers: set to override the headers for a single
1599
+ request; this effectively ignores the headers
1600
+ in the spec for a single request.
1601
+ :type _headers: dict, optional
1602
+ :param _host_index: set to override the host_index for a single
1603
+ request; this effectively ignores the host_index
1604
+ in the spec for a single request.
1605
+ :type _host_index: int, optional
1606
+ :return: Returns the result object.
1607
+ """ # noqa: E501
1608
+
1609
+ _param = self._get_favorites_serialize(
1610
+ n=n,
1611
+ offset=offset,
1612
+ type=type,
1613
+ tag=tag,
1614
+ _request_auth=_request_auth,
1615
+ _content_type=_content_type,
1616
+ _headers=_headers,
1617
+ _host_index=_host_index
1618
+ )
1619
+
1620
+ _response_types_map: Dict[str, Optional[str]] = {
1621
+ '200': "List[Favorite]",
1622
+ '401': "Error",
1623
+ }
1624
+ response_data = await self.api_client.call_api(
1625
+ *_param,
1626
+ _request_timeout=_request_timeout
1627
+ )
1628
+ await response_data.read()
1629
+ return self.api_client.response_deserialize(
1630
+ response_data=response_data,
1631
+ response_types_map=_response_types_map,
1632
+ )
1633
+
1634
+
1635
+ @validate_call
1636
+ async def get_favorites_without_preload_content(
1637
+ self,
1638
+ n: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="The number of objects to return.")] = None,
1639
+ offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="A zero-based offset from the default object sorting from where search results start.")] = None,
1640
+ type: Annotated[Optional[StrictStr], Field(description="The type of favorites to return, FavoriteType.")] = None,
1641
+ tag: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="Tags to include (comma-separated). Any of the tags needs to be present.")] = None,
1642
+ _request_timeout: Union[
1643
+ None,
1644
+ Annotated[StrictFloat, Field(gt=0)],
1645
+ Tuple[
1646
+ Annotated[StrictFloat, Field(gt=0)],
1647
+ Annotated[StrictFloat, Field(gt=0)]
1648
+ ]
1649
+ ] = None,
1650
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1651
+ _content_type: Optional[StrictStr] = None,
1652
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1653
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1654
+ ) -> RESTResponseType:
1655
+ """List Favorites
1656
+
1657
+ Returns a list of favorites.
1658
+
1659
+ :param n: The number of objects to return.
1660
+ :type n: int
1661
+ :param offset: A zero-based offset from the default object sorting from where search results start.
1662
+ :type offset: int
1663
+ :param type: The type of favorites to return, FavoriteType.
1664
+ :type type: str
1665
+ :param tag: Tags to include (comma-separated). Any of the tags needs to be present.
1666
+ :type tag: str
1667
+ :param _request_timeout: timeout setting for this request. If one
1668
+ number provided, it will be total request
1669
+ timeout. It can also be a pair (tuple) of
1670
+ (connection, read) timeouts.
1671
+ :type _request_timeout: int, tuple(int, int), optional
1672
+ :param _request_auth: set to override the auth_settings for an a single
1673
+ request; this effectively ignores the
1674
+ authentication in the spec for a single request.
1675
+ :type _request_auth: dict, optional
1676
+ :param _content_type: force content-type for the request.
1677
+ :type _content_type: str, Optional
1678
+ :param _headers: set to override the headers for a single
1679
+ request; this effectively ignores the headers
1680
+ in the spec for a single request.
1681
+ :type _headers: dict, optional
1682
+ :param _host_index: set to override the host_index for a single
1683
+ request; this effectively ignores the host_index
1684
+ in the spec for a single request.
1685
+ :type _host_index: int, optional
1686
+ :return: Returns the result object.
1687
+ """ # noqa: E501
1688
+
1689
+ _param = self._get_favorites_serialize(
1690
+ n=n,
1691
+ offset=offset,
1692
+ type=type,
1693
+ tag=tag,
1694
+ _request_auth=_request_auth,
1695
+ _content_type=_content_type,
1696
+ _headers=_headers,
1697
+ _host_index=_host_index
1698
+ )
1699
+
1700
+ _response_types_map: Dict[str, Optional[str]] = {
1701
+ '200': "List[Favorite]",
1702
+ '401': "Error",
1703
+ }
1704
+ response_data = await self.api_client.call_api(
1705
+ *_param,
1706
+ _request_timeout=_request_timeout
1707
+ )
1708
+ return response_data.response
1709
+
1710
+
1711
+ def _get_favorites_serialize(
1712
+ self,
1713
+ n,
1714
+ offset,
1715
+ type,
1716
+ tag,
1717
+ _request_auth,
1718
+ _content_type,
1719
+ _headers,
1720
+ _host_index,
1721
+ ) -> RequestSerialized:
1722
+
1723
+ _host = None
1724
+
1725
+ _collection_formats: Dict[str, str] = {
1726
+ }
1727
+
1728
+ _path_params: Dict[str, str] = {}
1729
+ _query_params: List[Tuple[str, str]] = []
1730
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1731
+ _form_params: List[Tuple[str, str]] = []
1732
+ _files: Dict[
1733
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1734
+ ] = {}
1735
+ _body_params: Optional[bytes] = None
1736
+
1737
+ # process the path parameters
1738
+ # process the query parameters
1739
+ if n is not None:
1740
+
1741
+ _query_params.append(('n', n))
1742
+
1743
+ if offset is not None:
1744
+
1745
+ _query_params.append(('offset', offset))
1746
+
1747
+ if type is not None:
1748
+
1749
+ _query_params.append(('type', type))
1750
+
1751
+ if tag is not None:
1752
+
1753
+ _query_params.append(('tag', tag))
1754
+
1755
+ # process the header parameters
1756
+ # process the form parameters
1757
+ # process the body parameter
1758
+
1759
+
1760
+ # set the HTTP header `Accept`
1761
+ if 'Accept' not in _header_params:
1762
+ _header_params['Accept'] = self.api_client.select_header_accept(
1763
+ [
1764
+ 'application/json'
1765
+ ]
1766
+ )
1767
+
1768
+
1769
+ # authentication setting
1770
+ _auth_settings: List[str] = [
1771
+ 'authCookie'
1772
+ ]
1773
+
1774
+ return self.api_client.param_serialize(
1775
+ method='GET',
1776
+ resource_path='/favorites',
1777
+ path_params=_path_params,
1778
+ query_params=_query_params,
1779
+ header_params=_header_params,
1780
+ body=_body_params,
1781
+ post_params=_form_params,
1782
+ files=_files,
1783
+ auth_settings=_auth_settings,
1784
+ collection_formats=_collection_formats,
1785
+ _host=_host,
1786
+ _request_auth=_request_auth
1787
+ )
1788
+
1789
+
1790
+
1791
+
1792
+ @validate_call
1793
+ async def remove_favorite(
1794
+ self,
1795
+ favorite_id: Annotated[StrictStr, Field(description="Must be a valid favorite ID.")],
1796
+ _request_timeout: Union[
1797
+ None,
1798
+ Annotated[StrictFloat, Field(gt=0)],
1799
+ Tuple[
1800
+ Annotated[StrictFloat, Field(gt=0)],
1801
+ Annotated[StrictFloat, Field(gt=0)]
1802
+ ]
1803
+ ] = None,
1804
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1805
+ _content_type: Optional[StrictStr] = None,
1806
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1807
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1808
+ ) -> Success:
1809
+ """Remove Favorite
1810
+
1811
+ Remove a favorite from your favorites list.
1812
+
1813
+ :param favorite_id: Must be a valid favorite ID. (required)
1814
+ :type favorite_id: str
1815
+ :param _request_timeout: timeout setting for this request. If one
1816
+ number provided, it will be total request
1817
+ timeout. It can also be a pair (tuple) of
1818
+ (connection, read) timeouts.
1819
+ :type _request_timeout: int, tuple(int, int), optional
1820
+ :param _request_auth: set to override the auth_settings for an a single
1821
+ request; this effectively ignores the
1822
+ authentication in the spec for a single request.
1823
+ :type _request_auth: dict, optional
1824
+ :param _content_type: force content-type for the request.
1825
+ :type _content_type: str, Optional
1826
+ :param _headers: set to override the headers for a single
1827
+ request; this effectively ignores the headers
1828
+ in the spec for a single request.
1829
+ :type _headers: dict, optional
1830
+ :param _host_index: set to override the host_index for a single
1831
+ request; this effectively ignores the host_index
1832
+ in the spec for a single request.
1833
+ :type _host_index: int, optional
1834
+ :return: Returns the result object.
1835
+ """ # noqa: E501
1836
+
1837
+ _param = self._remove_favorite_serialize(
1838
+ favorite_id=favorite_id,
1839
+ _request_auth=_request_auth,
1840
+ _content_type=_content_type,
1841
+ _headers=_headers,
1842
+ _host_index=_host_index
1843
+ )
1844
+
1845
+ _response_types_map: Dict[str, Optional[str]] = {
1846
+ '200': "Success",
1847
+ '401': "Error",
1848
+ '404': "Error",
1849
+ }
1850
+ response_data = await self.api_client.call_api(
1851
+ *_param,
1852
+ _request_timeout=_request_timeout
1853
+ )
1854
+ await response_data.read()
1855
+ return self.api_client.response_deserialize(
1856
+ response_data=response_data,
1857
+ response_types_map=_response_types_map,
1858
+ ).data
1859
+
1860
+
1861
+ @validate_call
1862
+ async def remove_favorite_with_http_info(
1863
+ self,
1864
+ favorite_id: Annotated[StrictStr, Field(description="Must be a valid favorite ID.")],
1865
+ _request_timeout: Union[
1866
+ None,
1867
+ Annotated[StrictFloat, Field(gt=0)],
1868
+ Tuple[
1869
+ Annotated[StrictFloat, Field(gt=0)],
1870
+ Annotated[StrictFloat, Field(gt=0)]
1871
+ ]
1872
+ ] = None,
1873
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1874
+ _content_type: Optional[StrictStr] = None,
1875
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1876
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1877
+ ) -> ApiResponse[Success]:
1878
+ """Remove Favorite
1879
+
1880
+ Remove a favorite from your favorites list.
1881
+
1882
+ :param favorite_id: Must be a valid favorite ID. (required)
1883
+ :type favorite_id: str
1884
+ :param _request_timeout: timeout setting for this request. If one
1885
+ number provided, it will be total request
1886
+ timeout. It can also be a pair (tuple) of
1887
+ (connection, read) timeouts.
1888
+ :type _request_timeout: int, tuple(int, int), optional
1889
+ :param _request_auth: set to override the auth_settings for an a single
1890
+ request; this effectively ignores the
1891
+ authentication in the spec for a single request.
1892
+ :type _request_auth: dict, optional
1893
+ :param _content_type: force content-type for the request.
1894
+ :type _content_type: str, Optional
1895
+ :param _headers: set to override the headers for a single
1896
+ request; this effectively ignores the headers
1897
+ in the spec for a single request.
1898
+ :type _headers: dict, optional
1899
+ :param _host_index: set to override the host_index for a single
1900
+ request; this effectively ignores the host_index
1901
+ in the spec for a single request.
1902
+ :type _host_index: int, optional
1903
+ :return: Returns the result object.
1904
+ """ # noqa: E501
1905
+
1906
+ _param = self._remove_favorite_serialize(
1907
+ favorite_id=favorite_id,
1908
+ _request_auth=_request_auth,
1909
+ _content_type=_content_type,
1910
+ _headers=_headers,
1911
+ _host_index=_host_index
1912
+ )
1913
+
1914
+ _response_types_map: Dict[str, Optional[str]] = {
1915
+ '200': "Success",
1916
+ '401': "Error",
1917
+ '404': "Error",
1918
+ }
1919
+ response_data = await self.api_client.call_api(
1920
+ *_param,
1921
+ _request_timeout=_request_timeout
1922
+ )
1923
+ await response_data.read()
1924
+ return self.api_client.response_deserialize(
1925
+ response_data=response_data,
1926
+ response_types_map=_response_types_map,
1927
+ )
1928
+
1929
+
1930
+ @validate_call
1931
+ async def remove_favorite_without_preload_content(
1932
+ self,
1933
+ favorite_id: Annotated[StrictStr, Field(description="Must be a valid favorite ID.")],
1934
+ _request_timeout: Union[
1935
+ None,
1936
+ Annotated[StrictFloat, Field(gt=0)],
1937
+ Tuple[
1938
+ Annotated[StrictFloat, Field(gt=0)],
1939
+ Annotated[StrictFloat, Field(gt=0)]
1940
+ ]
1941
+ ] = None,
1942
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1943
+ _content_type: Optional[StrictStr] = None,
1944
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1945
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1946
+ ) -> RESTResponseType:
1947
+ """Remove Favorite
1948
+
1949
+ Remove a favorite from your favorites list.
1950
+
1951
+ :param favorite_id: Must be a valid favorite ID. (required)
1952
+ :type favorite_id: str
1953
+ :param _request_timeout: timeout setting for this request. If one
1954
+ number provided, it will be total request
1955
+ timeout. It can also be a pair (tuple) of
1956
+ (connection, read) timeouts.
1957
+ :type _request_timeout: int, tuple(int, int), optional
1958
+ :param _request_auth: set to override the auth_settings for an a single
1959
+ request; this effectively ignores the
1960
+ authentication in the spec for a single request.
1961
+ :type _request_auth: dict, optional
1962
+ :param _content_type: force content-type for the request.
1963
+ :type _content_type: str, Optional
1964
+ :param _headers: set to override the headers for a single
1965
+ request; this effectively ignores the headers
1966
+ in the spec for a single request.
1967
+ :type _headers: dict, optional
1968
+ :param _host_index: set to override the host_index for a single
1969
+ request; this effectively ignores the host_index
1970
+ in the spec for a single request.
1971
+ :type _host_index: int, optional
1972
+ :return: Returns the result object.
1973
+ """ # noqa: E501
1974
+
1975
+ _param = self._remove_favorite_serialize(
1976
+ favorite_id=favorite_id,
1977
+ _request_auth=_request_auth,
1978
+ _content_type=_content_type,
1979
+ _headers=_headers,
1980
+ _host_index=_host_index
1981
+ )
1982
+
1983
+ _response_types_map: Dict[str, Optional[str]] = {
1984
+ '200': "Success",
1985
+ '401': "Error",
1986
+ '404': "Error",
1987
+ }
1988
+ response_data = await self.api_client.call_api(
1989
+ *_param,
1990
+ _request_timeout=_request_timeout
1991
+ )
1992
+ return response_data.response
1993
+
1994
+
1995
+ def _remove_favorite_serialize(
1996
+ self,
1997
+ favorite_id,
1998
+ _request_auth,
1999
+ _content_type,
2000
+ _headers,
2001
+ _host_index,
2002
+ ) -> RequestSerialized:
2003
+
2004
+ _host = None
2005
+
2006
+ _collection_formats: Dict[str, str] = {
2007
+ }
2008
+
2009
+ _path_params: Dict[str, str] = {}
2010
+ _query_params: List[Tuple[str, str]] = []
2011
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2012
+ _form_params: List[Tuple[str, str]] = []
2013
+ _files: Dict[
2014
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2015
+ ] = {}
2016
+ _body_params: Optional[bytes] = None
2017
+
2018
+ # process the path parameters
2019
+ if favorite_id is not None:
2020
+ _path_params['favoriteId'] = favorite_id
2021
+ # process the query parameters
2022
+ # process the header parameters
2023
+ # process the form parameters
2024
+ # process the body parameter
2025
+
2026
+
2027
+ # set the HTTP header `Accept`
2028
+ if 'Accept' not in _header_params:
2029
+ _header_params['Accept'] = self.api_client.select_header_accept(
2030
+ [
2031
+ 'application/json'
2032
+ ]
2033
+ )
2034
+
2035
+
2036
+ # authentication setting
2037
+ _auth_settings: List[str] = [
2038
+ 'authCookie'
2039
+ ]
2040
+
2041
+ return self.api_client.param_serialize(
2042
+ method='DELETE',
2043
+ resource_path='/favorites/{favoriteId}',
2044
+ path_params=_path_params,
2045
+ query_params=_query_params,
2046
+ header_params=_header_params,
2047
+ body=_body_params,
2048
+ post_params=_form_params,
2049
+ files=_files,
2050
+ auth_settings=_auth_settings,
2051
+ collection_formats=_collection_formats,
2052
+ _host=_host,
2053
+ _request_auth=_request_auth
2054
+ )
2055
+
2056
+
2057
+
2058
+
2059
+ @validate_call
2060
+ async def update_favorite_group(
2061
+ self,
2062
+ favorite_group_type: Annotated[FavoriteType, Field(description="The type of group to fetch, must be a valid FavoriteType.")],
2063
+ favorite_group_name: Annotated[StrictStr, Field(description="The name of the group to fetch, must be a name of a FavoriteGroup.")],
2064
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
2065
+ update_favorite_group_request: Optional[UpdateFavoriteGroupRequest] = None,
2066
+ _request_timeout: Union[
2067
+ None,
2068
+ Annotated[StrictFloat, Field(gt=0)],
2069
+ Tuple[
2070
+ Annotated[StrictFloat, Field(gt=0)],
2071
+ Annotated[StrictFloat, Field(gt=0)]
2072
+ ]
2073
+ ] = None,
2074
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2075
+ _content_type: Optional[StrictStr] = None,
2076
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2077
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2078
+ ) -> None:
2079
+ """Update Favorite Group
2080
+
2081
+ Update information about a specific favorite group.
2082
+
2083
+ :param favorite_group_type: The type of group to fetch, must be a valid FavoriteType. (required)
2084
+ :type favorite_group_type: FavoriteType
2085
+ :param favorite_group_name: The name of the group to fetch, must be a name of a FavoriteGroup. (required)
2086
+ :type favorite_group_name: str
2087
+ :param user_id: Must be a valid user ID. (required)
2088
+ :type user_id: str
2089
+ :param update_favorite_group_request:
2090
+ :type update_favorite_group_request: UpdateFavoriteGroupRequest
2091
+ :param _request_timeout: timeout setting for this request. If one
2092
+ number provided, it will be total request
2093
+ timeout. It can also be a pair (tuple) of
2094
+ (connection, read) timeouts.
2095
+ :type _request_timeout: int, tuple(int, int), optional
2096
+ :param _request_auth: set to override the auth_settings for an a single
2097
+ request; this effectively ignores the
2098
+ authentication in the spec for a single request.
2099
+ :type _request_auth: dict, optional
2100
+ :param _content_type: force content-type for the request.
2101
+ :type _content_type: str, Optional
2102
+ :param _headers: set to override the headers for a single
2103
+ request; this effectively ignores the headers
2104
+ in the spec for a single request.
2105
+ :type _headers: dict, optional
2106
+ :param _host_index: set to override the host_index for a single
2107
+ request; this effectively ignores the host_index
2108
+ in the spec for a single request.
2109
+ :type _host_index: int, optional
2110
+ :return: Returns the result object.
2111
+ """ # noqa: E501
2112
+
2113
+ _param = self._update_favorite_group_serialize(
2114
+ favorite_group_type=favorite_group_type,
2115
+ favorite_group_name=favorite_group_name,
2116
+ user_id=user_id,
2117
+ update_favorite_group_request=update_favorite_group_request,
2118
+ _request_auth=_request_auth,
2119
+ _content_type=_content_type,
2120
+ _headers=_headers,
2121
+ _host_index=_host_index
2122
+ )
2123
+
2124
+ _response_types_map: Dict[str, Optional[str]] = {
2125
+ '200': None,
2126
+ }
2127
+ response_data = await self.api_client.call_api(
2128
+ *_param,
2129
+ _request_timeout=_request_timeout
2130
+ )
2131
+ await response_data.read()
2132
+ return self.api_client.response_deserialize(
2133
+ response_data=response_data,
2134
+ response_types_map=_response_types_map,
2135
+ ).data
2136
+
2137
+
2138
+ @validate_call
2139
+ async def update_favorite_group_with_http_info(
2140
+ self,
2141
+ favorite_group_type: Annotated[FavoriteType, Field(description="The type of group to fetch, must be a valid FavoriteType.")],
2142
+ favorite_group_name: Annotated[StrictStr, Field(description="The name of the group to fetch, must be a name of a FavoriteGroup.")],
2143
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
2144
+ update_favorite_group_request: Optional[UpdateFavoriteGroupRequest] = None,
2145
+ _request_timeout: Union[
2146
+ None,
2147
+ Annotated[StrictFloat, Field(gt=0)],
2148
+ Tuple[
2149
+ Annotated[StrictFloat, Field(gt=0)],
2150
+ Annotated[StrictFloat, Field(gt=0)]
2151
+ ]
2152
+ ] = None,
2153
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2154
+ _content_type: Optional[StrictStr] = None,
2155
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2156
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2157
+ ) -> ApiResponse[None]:
2158
+ """Update Favorite Group
2159
+
2160
+ Update information about a specific favorite group.
2161
+
2162
+ :param favorite_group_type: The type of group to fetch, must be a valid FavoriteType. (required)
2163
+ :type favorite_group_type: FavoriteType
2164
+ :param favorite_group_name: The name of the group to fetch, must be a name of a FavoriteGroup. (required)
2165
+ :type favorite_group_name: str
2166
+ :param user_id: Must be a valid user ID. (required)
2167
+ :type user_id: str
2168
+ :param update_favorite_group_request:
2169
+ :type update_favorite_group_request: UpdateFavoriteGroupRequest
2170
+ :param _request_timeout: timeout setting for this request. If one
2171
+ number provided, it will be total request
2172
+ timeout. It can also be a pair (tuple) of
2173
+ (connection, read) timeouts.
2174
+ :type _request_timeout: int, tuple(int, int), optional
2175
+ :param _request_auth: set to override the auth_settings for an a single
2176
+ request; this effectively ignores the
2177
+ authentication in the spec for a single request.
2178
+ :type _request_auth: dict, optional
2179
+ :param _content_type: force content-type for the request.
2180
+ :type _content_type: str, Optional
2181
+ :param _headers: set to override the headers for a single
2182
+ request; this effectively ignores the headers
2183
+ in the spec for a single request.
2184
+ :type _headers: dict, optional
2185
+ :param _host_index: set to override the host_index for a single
2186
+ request; this effectively ignores the host_index
2187
+ in the spec for a single request.
2188
+ :type _host_index: int, optional
2189
+ :return: Returns the result object.
2190
+ """ # noqa: E501
2191
+
2192
+ _param = self._update_favorite_group_serialize(
2193
+ favorite_group_type=favorite_group_type,
2194
+ favorite_group_name=favorite_group_name,
2195
+ user_id=user_id,
2196
+ update_favorite_group_request=update_favorite_group_request,
2197
+ _request_auth=_request_auth,
2198
+ _content_type=_content_type,
2199
+ _headers=_headers,
2200
+ _host_index=_host_index
2201
+ )
2202
+
2203
+ _response_types_map: Dict[str, Optional[str]] = {
2204
+ '200': None,
2205
+ }
2206
+ response_data = await self.api_client.call_api(
2207
+ *_param,
2208
+ _request_timeout=_request_timeout
2209
+ )
2210
+ await response_data.read()
2211
+ return self.api_client.response_deserialize(
2212
+ response_data=response_data,
2213
+ response_types_map=_response_types_map,
2214
+ )
2215
+
2216
+
2217
+ @validate_call
2218
+ async def update_favorite_group_without_preload_content(
2219
+ self,
2220
+ favorite_group_type: Annotated[FavoriteType, Field(description="The type of group to fetch, must be a valid FavoriteType.")],
2221
+ favorite_group_name: Annotated[StrictStr, Field(description="The name of the group to fetch, must be a name of a FavoriteGroup.")],
2222
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
2223
+ update_favorite_group_request: Optional[UpdateFavoriteGroupRequest] = None,
2224
+ _request_timeout: Union[
2225
+ None,
2226
+ Annotated[StrictFloat, Field(gt=0)],
2227
+ Tuple[
2228
+ Annotated[StrictFloat, Field(gt=0)],
2229
+ Annotated[StrictFloat, Field(gt=0)]
2230
+ ]
2231
+ ] = None,
2232
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2233
+ _content_type: Optional[StrictStr] = None,
2234
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2235
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2236
+ ) -> RESTResponseType:
2237
+ """Update Favorite Group
2238
+
2239
+ Update information about a specific favorite group.
2240
+
2241
+ :param favorite_group_type: The type of group to fetch, must be a valid FavoriteType. (required)
2242
+ :type favorite_group_type: FavoriteType
2243
+ :param favorite_group_name: The name of the group to fetch, must be a name of a FavoriteGroup. (required)
2244
+ :type favorite_group_name: str
2245
+ :param user_id: Must be a valid user ID. (required)
2246
+ :type user_id: str
2247
+ :param update_favorite_group_request:
2248
+ :type update_favorite_group_request: UpdateFavoriteGroupRequest
2249
+ :param _request_timeout: timeout setting for this request. If one
2250
+ number provided, it will be total request
2251
+ timeout. It can also be a pair (tuple) of
2252
+ (connection, read) timeouts.
2253
+ :type _request_timeout: int, tuple(int, int), optional
2254
+ :param _request_auth: set to override the auth_settings for an a single
2255
+ request; this effectively ignores the
2256
+ authentication in the spec for a single request.
2257
+ :type _request_auth: dict, optional
2258
+ :param _content_type: force content-type for the request.
2259
+ :type _content_type: str, Optional
2260
+ :param _headers: set to override the headers for a single
2261
+ request; this effectively ignores the headers
2262
+ in the spec for a single request.
2263
+ :type _headers: dict, optional
2264
+ :param _host_index: set to override the host_index for a single
2265
+ request; this effectively ignores the host_index
2266
+ in the spec for a single request.
2267
+ :type _host_index: int, optional
2268
+ :return: Returns the result object.
2269
+ """ # noqa: E501
2270
+
2271
+ _param = self._update_favorite_group_serialize(
2272
+ favorite_group_type=favorite_group_type,
2273
+ favorite_group_name=favorite_group_name,
2274
+ user_id=user_id,
2275
+ update_favorite_group_request=update_favorite_group_request,
2276
+ _request_auth=_request_auth,
2277
+ _content_type=_content_type,
2278
+ _headers=_headers,
2279
+ _host_index=_host_index
2280
+ )
2281
+
2282
+ _response_types_map: Dict[str, Optional[str]] = {
2283
+ '200': None,
2284
+ }
2285
+ response_data = await self.api_client.call_api(
2286
+ *_param,
2287
+ _request_timeout=_request_timeout
2288
+ )
2289
+ return response_data.response
2290
+
2291
+
2292
+ def _update_favorite_group_serialize(
2293
+ self,
2294
+ favorite_group_type,
2295
+ favorite_group_name,
2296
+ user_id,
2297
+ update_favorite_group_request,
2298
+ _request_auth,
2299
+ _content_type,
2300
+ _headers,
2301
+ _host_index,
2302
+ ) -> RequestSerialized:
2303
+
2304
+ _host = None
2305
+
2306
+ _collection_formats: Dict[str, str] = {
2307
+ }
2308
+
2309
+ _path_params: Dict[str, str] = {}
2310
+ _query_params: List[Tuple[str, str]] = []
2311
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2312
+ _form_params: List[Tuple[str, str]] = []
2313
+ _files: Dict[
2314
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2315
+ ] = {}
2316
+ _body_params: Optional[bytes] = None
2317
+
2318
+ # process the path parameters
2319
+ if favorite_group_type is not None:
2320
+ _path_params['favoriteGroupType'] = favorite_group_type.value
2321
+ if favorite_group_name is not None:
2322
+ _path_params['favoriteGroupName'] = favorite_group_name
2323
+ if user_id is not None:
2324
+ _path_params['userId'] = user_id
2325
+ # process the query parameters
2326
+ # process the header parameters
2327
+ # process the form parameters
2328
+ # process the body parameter
2329
+ if update_favorite_group_request is not None:
2330
+ _body_params = update_favorite_group_request
2331
+
2332
+
2333
+
2334
+ # set the HTTP header `Content-Type`
2335
+ if _content_type:
2336
+ _header_params['Content-Type'] = _content_type
2337
+ else:
2338
+ _default_content_type = (
2339
+ self.api_client.select_header_content_type(
2340
+ [
2341
+ 'application/json'
2342
+ ]
2343
+ )
2344
+ )
2345
+ if _default_content_type is not None:
2346
+ _header_params['Content-Type'] = _default_content_type
2347
+
2348
+ # authentication setting
2349
+ _auth_settings: List[str] = [
2350
+ 'authCookie'
2351
+ ]
2352
+
2353
+ return self.api_client.param_serialize(
2354
+ method='PUT',
2355
+ resource_path='/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}',
2356
+ path_params=_path_params,
2357
+ query_params=_query_params,
2358
+ header_params=_header_params,
2359
+ body=_body_params,
2360
+ post_params=_form_params,
2361
+ files=_files,
2362
+ auth_settings=_auth_settings,
2363
+ collection_formats=_collection_formats,
2364
+ _host=_host,
2365
+ _request_auth=_request_auth
2366
+ )
2367
+
2368
+