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,1708 @@
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, StrictBool, StrictStr
19
+ from typing import List, Optional
20
+ from typing_extensions import Annotated
21
+ from vrchatapi.models.boop_request import BoopRequest
22
+ from vrchatapi.models.friend_status import FriendStatus
23
+ from vrchatapi.models.limited_user_friend import LimitedUserFriend
24
+ from vrchatapi.models.notification import Notification
25
+ from vrchatapi.models.success import Success
26
+
27
+ from vrchatapi.api_client import ApiClient, RequestSerialized
28
+ from vrchatapi.api_response import ApiResponse
29
+ from vrchatapi.rest import RESTResponseType
30
+
31
+
32
+ class FriendsApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ async def boop(
47
+ self,
48
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
49
+ boop_request: BoopRequest,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> Success:
63
+ """Send Boop
64
+
65
+ Send a boop to another user.
66
+
67
+ :param user_id: Must be a valid user ID. (required)
68
+ :type user_id: str
69
+ :param boop_request: (required)
70
+ :type boop_request: BoopRequest
71
+ :param _request_timeout: timeout setting for this request. If one
72
+ number provided, it will be total request
73
+ timeout. It can also be a pair (tuple) of
74
+ (connection, read) timeouts.
75
+ :type _request_timeout: int, tuple(int, int), optional
76
+ :param _request_auth: set to override the auth_settings for an a single
77
+ request; this effectively ignores the
78
+ authentication in the spec for a single request.
79
+ :type _request_auth: dict, optional
80
+ :param _content_type: force content-type for the request.
81
+ :type _content_type: str, Optional
82
+ :param _headers: set to override the headers for a single
83
+ request; this effectively ignores the headers
84
+ in the spec for a single request.
85
+ :type _headers: dict, optional
86
+ :param _host_index: set to override the host_index for a single
87
+ request; this effectively ignores the host_index
88
+ in the spec for a single request.
89
+ :type _host_index: int, optional
90
+ :return: Returns the result object.
91
+ """ # noqa: E501
92
+
93
+ _param = self._boop_serialize(
94
+ user_id=user_id,
95
+ boop_request=boop_request,
96
+ _request_auth=_request_auth,
97
+ _content_type=_content_type,
98
+ _headers=_headers,
99
+ _host_index=_host_index
100
+ )
101
+
102
+ _response_types_map: Dict[str, Optional[str]] = {
103
+ '200': "Success",
104
+ '400': "Error",
105
+ '401': "Error",
106
+ '404': "Error",
107
+ }
108
+ response_data = await self.api_client.call_api(
109
+ *_param,
110
+ _request_timeout=_request_timeout
111
+ )
112
+ await response_data.read()
113
+ return self.api_client.response_deserialize(
114
+ response_data=response_data,
115
+ response_types_map=_response_types_map,
116
+ ).data
117
+
118
+
119
+ @validate_call
120
+ async def boop_with_http_info(
121
+ self,
122
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
123
+ boop_request: BoopRequest,
124
+ _request_timeout: Union[
125
+ None,
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Tuple[
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Annotated[StrictFloat, Field(gt=0)]
130
+ ]
131
+ ] = None,
132
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
133
+ _content_type: Optional[StrictStr] = None,
134
+ _headers: Optional[Dict[StrictStr, Any]] = None,
135
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
136
+ ) -> ApiResponse[Success]:
137
+ """Send Boop
138
+
139
+ Send a boop to another user.
140
+
141
+ :param user_id: Must be a valid user ID. (required)
142
+ :type user_id: str
143
+ :param boop_request: (required)
144
+ :type boop_request: BoopRequest
145
+ :param _request_timeout: timeout setting for this request. If one
146
+ number provided, it will be total request
147
+ timeout. It can also be a pair (tuple) of
148
+ (connection, read) timeouts.
149
+ :type _request_timeout: int, tuple(int, int), optional
150
+ :param _request_auth: set to override the auth_settings for an a single
151
+ request; this effectively ignores the
152
+ authentication in the spec for a single request.
153
+ :type _request_auth: dict, optional
154
+ :param _content_type: force content-type for the request.
155
+ :type _content_type: str, Optional
156
+ :param _headers: set to override the headers for a single
157
+ request; this effectively ignores the headers
158
+ in the spec for a single request.
159
+ :type _headers: dict, optional
160
+ :param _host_index: set to override the host_index for a single
161
+ request; this effectively ignores the host_index
162
+ in the spec for a single request.
163
+ :type _host_index: int, optional
164
+ :return: Returns the result object.
165
+ """ # noqa: E501
166
+
167
+ _param = self._boop_serialize(
168
+ user_id=user_id,
169
+ boop_request=boop_request,
170
+ _request_auth=_request_auth,
171
+ _content_type=_content_type,
172
+ _headers=_headers,
173
+ _host_index=_host_index
174
+ )
175
+
176
+ _response_types_map: Dict[str, Optional[str]] = {
177
+ '200': "Success",
178
+ '400': "Error",
179
+ '401': "Error",
180
+ '404': "Error",
181
+ }
182
+ response_data = await self.api_client.call_api(
183
+ *_param,
184
+ _request_timeout=_request_timeout
185
+ )
186
+ await response_data.read()
187
+ return self.api_client.response_deserialize(
188
+ response_data=response_data,
189
+ response_types_map=_response_types_map,
190
+ )
191
+
192
+
193
+ @validate_call
194
+ async def boop_without_preload_content(
195
+ self,
196
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
197
+ boop_request: BoopRequest,
198
+ _request_timeout: Union[
199
+ None,
200
+ Annotated[StrictFloat, Field(gt=0)],
201
+ Tuple[
202
+ Annotated[StrictFloat, Field(gt=0)],
203
+ Annotated[StrictFloat, Field(gt=0)]
204
+ ]
205
+ ] = None,
206
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
207
+ _content_type: Optional[StrictStr] = None,
208
+ _headers: Optional[Dict[StrictStr, Any]] = None,
209
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
210
+ ) -> RESTResponseType:
211
+ """Send Boop
212
+
213
+ Send a boop to another user.
214
+
215
+ :param user_id: Must be a valid user ID. (required)
216
+ :type user_id: str
217
+ :param boop_request: (required)
218
+ :type boop_request: BoopRequest
219
+ :param _request_timeout: timeout setting for this request. If one
220
+ number provided, it will be total request
221
+ timeout. It can also be a pair (tuple) of
222
+ (connection, read) timeouts.
223
+ :type _request_timeout: int, tuple(int, int), optional
224
+ :param _request_auth: set to override the auth_settings for an a single
225
+ request; this effectively ignores the
226
+ authentication in the spec for a single request.
227
+ :type _request_auth: dict, optional
228
+ :param _content_type: force content-type for the request.
229
+ :type _content_type: str, Optional
230
+ :param _headers: set to override the headers for a single
231
+ request; this effectively ignores the headers
232
+ in the spec for a single request.
233
+ :type _headers: dict, optional
234
+ :param _host_index: set to override the host_index for a single
235
+ request; this effectively ignores the host_index
236
+ in the spec for a single request.
237
+ :type _host_index: int, optional
238
+ :return: Returns the result object.
239
+ """ # noqa: E501
240
+
241
+ _param = self._boop_serialize(
242
+ user_id=user_id,
243
+ boop_request=boop_request,
244
+ _request_auth=_request_auth,
245
+ _content_type=_content_type,
246
+ _headers=_headers,
247
+ _host_index=_host_index
248
+ )
249
+
250
+ _response_types_map: Dict[str, Optional[str]] = {
251
+ '200': "Success",
252
+ '400': "Error",
253
+ '401': "Error",
254
+ '404': "Error",
255
+ }
256
+ response_data = await self.api_client.call_api(
257
+ *_param,
258
+ _request_timeout=_request_timeout
259
+ )
260
+ return response_data.response
261
+
262
+
263
+ def _boop_serialize(
264
+ self,
265
+ user_id,
266
+ boop_request,
267
+ _request_auth,
268
+ _content_type,
269
+ _headers,
270
+ _host_index,
271
+ ) -> RequestSerialized:
272
+
273
+ _host = None
274
+
275
+ _collection_formats: Dict[str, str] = {
276
+ }
277
+
278
+ _path_params: Dict[str, str] = {}
279
+ _query_params: List[Tuple[str, str]] = []
280
+ _header_params: Dict[str, Optional[str]] = _headers or {}
281
+ _form_params: List[Tuple[str, str]] = []
282
+ _files: Dict[
283
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
284
+ ] = {}
285
+ _body_params: Optional[bytes] = None
286
+
287
+ # process the path parameters
288
+ if user_id is not None:
289
+ _path_params['userId'] = user_id
290
+ # process the query parameters
291
+ # process the header parameters
292
+ # process the form parameters
293
+ # process the body parameter
294
+ if boop_request is not None:
295
+ _body_params = boop_request
296
+
297
+
298
+ # set the HTTP header `Accept`
299
+ if 'Accept' not in _header_params:
300
+ _header_params['Accept'] = self.api_client.select_header_accept(
301
+ [
302
+ 'application/json'
303
+ ]
304
+ )
305
+
306
+ # set the HTTP header `Content-Type`
307
+ if _content_type:
308
+ _header_params['Content-Type'] = _content_type
309
+ else:
310
+ _default_content_type = (
311
+ self.api_client.select_header_content_type(
312
+ [
313
+ 'application/json'
314
+ ]
315
+ )
316
+ )
317
+ if _default_content_type is not None:
318
+ _header_params['Content-Type'] = _default_content_type
319
+
320
+ # authentication setting
321
+ _auth_settings: List[str] = [
322
+ 'authCookie'
323
+ ]
324
+
325
+ return self.api_client.param_serialize(
326
+ method='POST',
327
+ resource_path='/users/{userId}/boop',
328
+ path_params=_path_params,
329
+ query_params=_query_params,
330
+ header_params=_header_params,
331
+ body=_body_params,
332
+ post_params=_form_params,
333
+ files=_files,
334
+ auth_settings=_auth_settings,
335
+ collection_formats=_collection_formats,
336
+ _host=_host,
337
+ _request_auth=_request_auth
338
+ )
339
+
340
+
341
+
342
+
343
+ @validate_call
344
+ async def delete_friend_request(
345
+ self,
346
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
347
+ _request_timeout: Union[
348
+ None,
349
+ Annotated[StrictFloat, Field(gt=0)],
350
+ Tuple[
351
+ Annotated[StrictFloat, Field(gt=0)],
352
+ Annotated[StrictFloat, Field(gt=0)]
353
+ ]
354
+ ] = None,
355
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
356
+ _content_type: Optional[StrictStr] = None,
357
+ _headers: Optional[Dict[StrictStr, Any]] = None,
358
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
359
+ ) -> Success:
360
+ """Delete Friend Request
361
+
362
+ Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead.
363
+
364
+ :param user_id: Must be a valid user ID. (required)
365
+ :type user_id: str
366
+ :param _request_timeout: timeout setting for this request. If one
367
+ number provided, it will be total request
368
+ timeout. It can also be a pair (tuple) of
369
+ (connection, read) timeouts.
370
+ :type _request_timeout: int, tuple(int, int), optional
371
+ :param _request_auth: set to override the auth_settings for an a single
372
+ request; this effectively ignores the
373
+ authentication in the spec for a single request.
374
+ :type _request_auth: dict, optional
375
+ :param _content_type: force content-type for the request.
376
+ :type _content_type: str, Optional
377
+ :param _headers: set to override the headers for a single
378
+ request; this effectively ignores the headers
379
+ in the spec for a single request.
380
+ :type _headers: dict, optional
381
+ :param _host_index: set to override the host_index for a single
382
+ request; this effectively ignores the host_index
383
+ in the spec for a single request.
384
+ :type _host_index: int, optional
385
+ :return: Returns the result object.
386
+ """ # noqa: E501
387
+
388
+ _param = self._delete_friend_request_serialize(
389
+ user_id=user_id,
390
+ _request_auth=_request_auth,
391
+ _content_type=_content_type,
392
+ _headers=_headers,
393
+ _host_index=_host_index
394
+ )
395
+
396
+ _response_types_map: Dict[str, Optional[str]] = {
397
+ '200': "Success",
398
+ '401': "Error",
399
+ '404': "Error",
400
+ }
401
+ response_data = await self.api_client.call_api(
402
+ *_param,
403
+ _request_timeout=_request_timeout
404
+ )
405
+ await response_data.read()
406
+ return self.api_client.response_deserialize(
407
+ response_data=response_data,
408
+ response_types_map=_response_types_map,
409
+ ).data
410
+
411
+
412
+ @validate_call
413
+ async def delete_friend_request_with_http_info(
414
+ self,
415
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
416
+ _request_timeout: Union[
417
+ None,
418
+ Annotated[StrictFloat, Field(gt=0)],
419
+ Tuple[
420
+ Annotated[StrictFloat, Field(gt=0)],
421
+ Annotated[StrictFloat, Field(gt=0)]
422
+ ]
423
+ ] = None,
424
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
425
+ _content_type: Optional[StrictStr] = None,
426
+ _headers: Optional[Dict[StrictStr, Any]] = None,
427
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
428
+ ) -> ApiResponse[Success]:
429
+ """Delete Friend Request
430
+
431
+ Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead.
432
+
433
+ :param user_id: Must be a valid user ID. (required)
434
+ :type user_id: str
435
+ :param _request_timeout: timeout setting for this request. If one
436
+ number provided, it will be total request
437
+ timeout. It can also be a pair (tuple) of
438
+ (connection, read) timeouts.
439
+ :type _request_timeout: int, tuple(int, int), optional
440
+ :param _request_auth: set to override the auth_settings for an a single
441
+ request; this effectively ignores the
442
+ authentication in the spec for a single request.
443
+ :type _request_auth: dict, optional
444
+ :param _content_type: force content-type for the request.
445
+ :type _content_type: str, Optional
446
+ :param _headers: set to override the headers for a single
447
+ request; this effectively ignores the headers
448
+ in the spec for a single request.
449
+ :type _headers: dict, optional
450
+ :param _host_index: set to override the host_index for a single
451
+ request; this effectively ignores the host_index
452
+ in the spec for a single request.
453
+ :type _host_index: int, optional
454
+ :return: Returns the result object.
455
+ """ # noqa: E501
456
+
457
+ _param = self._delete_friend_request_serialize(
458
+ user_id=user_id,
459
+ _request_auth=_request_auth,
460
+ _content_type=_content_type,
461
+ _headers=_headers,
462
+ _host_index=_host_index
463
+ )
464
+
465
+ _response_types_map: Dict[str, Optional[str]] = {
466
+ '200': "Success",
467
+ '401': "Error",
468
+ '404': "Error",
469
+ }
470
+ response_data = await self.api_client.call_api(
471
+ *_param,
472
+ _request_timeout=_request_timeout
473
+ )
474
+ await response_data.read()
475
+ return self.api_client.response_deserialize(
476
+ response_data=response_data,
477
+ response_types_map=_response_types_map,
478
+ )
479
+
480
+
481
+ @validate_call
482
+ async def delete_friend_request_without_preload_content(
483
+ self,
484
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
485
+ _request_timeout: Union[
486
+ None,
487
+ Annotated[StrictFloat, Field(gt=0)],
488
+ Tuple[
489
+ Annotated[StrictFloat, Field(gt=0)],
490
+ Annotated[StrictFloat, Field(gt=0)]
491
+ ]
492
+ ] = None,
493
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
494
+ _content_type: Optional[StrictStr] = None,
495
+ _headers: Optional[Dict[StrictStr, Any]] = None,
496
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
497
+ ) -> RESTResponseType:
498
+ """Delete Friend Request
499
+
500
+ Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead.
501
+
502
+ :param user_id: Must be a valid user ID. (required)
503
+ :type user_id: str
504
+ :param _request_timeout: timeout setting for this request. If one
505
+ number provided, it will be total request
506
+ timeout. It can also be a pair (tuple) of
507
+ (connection, read) timeouts.
508
+ :type _request_timeout: int, tuple(int, int), optional
509
+ :param _request_auth: set to override the auth_settings for an a single
510
+ request; this effectively ignores the
511
+ authentication in the spec for a single request.
512
+ :type _request_auth: dict, optional
513
+ :param _content_type: force content-type for the request.
514
+ :type _content_type: str, Optional
515
+ :param _headers: set to override the headers for a single
516
+ request; this effectively ignores the headers
517
+ in the spec for a single request.
518
+ :type _headers: dict, optional
519
+ :param _host_index: set to override the host_index for a single
520
+ request; this effectively ignores the host_index
521
+ in the spec for a single request.
522
+ :type _host_index: int, optional
523
+ :return: Returns the result object.
524
+ """ # noqa: E501
525
+
526
+ _param = self._delete_friend_request_serialize(
527
+ user_id=user_id,
528
+ _request_auth=_request_auth,
529
+ _content_type=_content_type,
530
+ _headers=_headers,
531
+ _host_index=_host_index
532
+ )
533
+
534
+ _response_types_map: Dict[str, Optional[str]] = {
535
+ '200': "Success",
536
+ '401': "Error",
537
+ '404': "Error",
538
+ }
539
+ response_data = await self.api_client.call_api(
540
+ *_param,
541
+ _request_timeout=_request_timeout
542
+ )
543
+ return response_data.response
544
+
545
+
546
+ def _delete_friend_request_serialize(
547
+ self,
548
+ user_id,
549
+ _request_auth,
550
+ _content_type,
551
+ _headers,
552
+ _host_index,
553
+ ) -> RequestSerialized:
554
+
555
+ _host = None
556
+
557
+ _collection_formats: Dict[str, str] = {
558
+ }
559
+
560
+ _path_params: Dict[str, str] = {}
561
+ _query_params: List[Tuple[str, str]] = []
562
+ _header_params: Dict[str, Optional[str]] = _headers or {}
563
+ _form_params: List[Tuple[str, str]] = []
564
+ _files: Dict[
565
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
566
+ ] = {}
567
+ _body_params: Optional[bytes] = None
568
+
569
+ # process the path parameters
570
+ if user_id is not None:
571
+ _path_params['userId'] = user_id
572
+ # process the query parameters
573
+ # process the header parameters
574
+ # process the form parameters
575
+ # process the body parameter
576
+
577
+
578
+ # set the HTTP header `Accept`
579
+ if 'Accept' not in _header_params:
580
+ _header_params['Accept'] = self.api_client.select_header_accept(
581
+ [
582
+ 'application/json'
583
+ ]
584
+ )
585
+
586
+
587
+ # authentication setting
588
+ _auth_settings: List[str] = [
589
+ 'authCookie'
590
+ ]
591
+
592
+ return self.api_client.param_serialize(
593
+ method='DELETE',
594
+ resource_path='/user/{userId}/friendRequest',
595
+ path_params=_path_params,
596
+ query_params=_query_params,
597
+ header_params=_header_params,
598
+ body=_body_params,
599
+ post_params=_form_params,
600
+ files=_files,
601
+ auth_settings=_auth_settings,
602
+ collection_formats=_collection_formats,
603
+ _host=_host,
604
+ _request_auth=_request_auth
605
+ )
606
+
607
+
608
+
609
+
610
+ @validate_call
611
+ async def friend(
612
+ self,
613
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
614
+ _request_timeout: Union[
615
+ None,
616
+ Annotated[StrictFloat, Field(gt=0)],
617
+ Tuple[
618
+ Annotated[StrictFloat, Field(gt=0)],
619
+ Annotated[StrictFloat, Field(gt=0)]
620
+ ]
621
+ ] = None,
622
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
623
+ _content_type: Optional[StrictStr] = None,
624
+ _headers: Optional[Dict[StrictStr, Any]] = None,
625
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
626
+ ) -> Notification:
627
+ """Send Friend Request
628
+
629
+ Send a friend request to another user.
630
+
631
+ :param user_id: Must be a valid user ID. (required)
632
+ :type user_id: str
633
+ :param _request_timeout: timeout setting for this request. If one
634
+ number provided, it will be total request
635
+ timeout. It can also be a pair (tuple) of
636
+ (connection, read) timeouts.
637
+ :type _request_timeout: int, tuple(int, int), optional
638
+ :param _request_auth: set to override the auth_settings for an a single
639
+ request; this effectively ignores the
640
+ authentication in the spec for a single request.
641
+ :type _request_auth: dict, optional
642
+ :param _content_type: force content-type for the request.
643
+ :type _content_type: str, Optional
644
+ :param _headers: set to override the headers for a single
645
+ request; this effectively ignores the headers
646
+ in the spec for a single request.
647
+ :type _headers: dict, optional
648
+ :param _host_index: set to override the host_index for a single
649
+ request; this effectively ignores the host_index
650
+ in the spec for a single request.
651
+ :type _host_index: int, optional
652
+ :return: Returns the result object.
653
+ """ # noqa: E501
654
+
655
+ _param = self._friend_serialize(
656
+ user_id=user_id,
657
+ _request_auth=_request_auth,
658
+ _content_type=_content_type,
659
+ _headers=_headers,
660
+ _host_index=_host_index
661
+ )
662
+
663
+ _response_types_map: Dict[str, Optional[str]] = {
664
+ '200': "Notification",
665
+ '400': "Error",
666
+ '401': "Error",
667
+ '404': "Error",
668
+ }
669
+ response_data = await self.api_client.call_api(
670
+ *_param,
671
+ _request_timeout=_request_timeout
672
+ )
673
+ await response_data.read()
674
+ return self.api_client.response_deserialize(
675
+ response_data=response_data,
676
+ response_types_map=_response_types_map,
677
+ ).data
678
+
679
+
680
+ @validate_call
681
+ async def friend_with_http_info(
682
+ self,
683
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
684
+ _request_timeout: Union[
685
+ None,
686
+ Annotated[StrictFloat, Field(gt=0)],
687
+ Tuple[
688
+ Annotated[StrictFloat, Field(gt=0)],
689
+ Annotated[StrictFloat, Field(gt=0)]
690
+ ]
691
+ ] = None,
692
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
693
+ _content_type: Optional[StrictStr] = None,
694
+ _headers: Optional[Dict[StrictStr, Any]] = None,
695
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
696
+ ) -> ApiResponse[Notification]:
697
+ """Send Friend Request
698
+
699
+ Send a friend request to another user.
700
+
701
+ :param user_id: Must be a valid user ID. (required)
702
+ :type user_id: str
703
+ :param _request_timeout: timeout setting for this request. If one
704
+ number provided, it will be total request
705
+ timeout. It can also be a pair (tuple) of
706
+ (connection, read) timeouts.
707
+ :type _request_timeout: int, tuple(int, int), optional
708
+ :param _request_auth: set to override the auth_settings for an a single
709
+ request; this effectively ignores the
710
+ authentication in the spec for a single request.
711
+ :type _request_auth: dict, optional
712
+ :param _content_type: force content-type for the request.
713
+ :type _content_type: str, Optional
714
+ :param _headers: set to override the headers for a single
715
+ request; this effectively ignores the headers
716
+ in the spec for a single request.
717
+ :type _headers: dict, optional
718
+ :param _host_index: set to override the host_index for a single
719
+ request; this effectively ignores the host_index
720
+ in the spec for a single request.
721
+ :type _host_index: int, optional
722
+ :return: Returns the result object.
723
+ """ # noqa: E501
724
+
725
+ _param = self._friend_serialize(
726
+ user_id=user_id,
727
+ _request_auth=_request_auth,
728
+ _content_type=_content_type,
729
+ _headers=_headers,
730
+ _host_index=_host_index
731
+ )
732
+
733
+ _response_types_map: Dict[str, Optional[str]] = {
734
+ '200': "Notification",
735
+ '400': "Error",
736
+ '401': "Error",
737
+ '404': "Error",
738
+ }
739
+ response_data = await self.api_client.call_api(
740
+ *_param,
741
+ _request_timeout=_request_timeout
742
+ )
743
+ await response_data.read()
744
+ return self.api_client.response_deserialize(
745
+ response_data=response_data,
746
+ response_types_map=_response_types_map,
747
+ )
748
+
749
+
750
+ @validate_call
751
+ async def friend_without_preload_content(
752
+ self,
753
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
754
+ _request_timeout: Union[
755
+ None,
756
+ Annotated[StrictFloat, Field(gt=0)],
757
+ Tuple[
758
+ Annotated[StrictFloat, Field(gt=0)],
759
+ Annotated[StrictFloat, Field(gt=0)]
760
+ ]
761
+ ] = None,
762
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
763
+ _content_type: Optional[StrictStr] = None,
764
+ _headers: Optional[Dict[StrictStr, Any]] = None,
765
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
766
+ ) -> RESTResponseType:
767
+ """Send Friend Request
768
+
769
+ Send a friend request to another user.
770
+
771
+ :param user_id: Must be a valid user ID. (required)
772
+ :type user_id: str
773
+ :param _request_timeout: timeout setting for this request. If one
774
+ number provided, it will be total request
775
+ timeout. It can also be a pair (tuple) of
776
+ (connection, read) timeouts.
777
+ :type _request_timeout: int, tuple(int, int), optional
778
+ :param _request_auth: set to override the auth_settings for an a single
779
+ request; this effectively ignores the
780
+ authentication in the spec for a single request.
781
+ :type _request_auth: dict, optional
782
+ :param _content_type: force content-type for the request.
783
+ :type _content_type: str, Optional
784
+ :param _headers: set to override the headers for a single
785
+ request; this effectively ignores the headers
786
+ in the spec for a single request.
787
+ :type _headers: dict, optional
788
+ :param _host_index: set to override the host_index for a single
789
+ request; this effectively ignores the host_index
790
+ in the spec for a single request.
791
+ :type _host_index: int, optional
792
+ :return: Returns the result object.
793
+ """ # noqa: E501
794
+
795
+ _param = self._friend_serialize(
796
+ user_id=user_id,
797
+ _request_auth=_request_auth,
798
+ _content_type=_content_type,
799
+ _headers=_headers,
800
+ _host_index=_host_index
801
+ )
802
+
803
+ _response_types_map: Dict[str, Optional[str]] = {
804
+ '200': "Notification",
805
+ '400': "Error",
806
+ '401': "Error",
807
+ '404': "Error",
808
+ }
809
+ response_data = await self.api_client.call_api(
810
+ *_param,
811
+ _request_timeout=_request_timeout
812
+ )
813
+ return response_data.response
814
+
815
+
816
+ def _friend_serialize(
817
+ self,
818
+ user_id,
819
+ _request_auth,
820
+ _content_type,
821
+ _headers,
822
+ _host_index,
823
+ ) -> RequestSerialized:
824
+
825
+ _host = None
826
+
827
+ _collection_formats: Dict[str, str] = {
828
+ }
829
+
830
+ _path_params: Dict[str, str] = {}
831
+ _query_params: List[Tuple[str, str]] = []
832
+ _header_params: Dict[str, Optional[str]] = _headers or {}
833
+ _form_params: List[Tuple[str, str]] = []
834
+ _files: Dict[
835
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
836
+ ] = {}
837
+ _body_params: Optional[bytes] = None
838
+
839
+ # process the path parameters
840
+ if user_id is not None:
841
+ _path_params['userId'] = user_id
842
+ # process the query parameters
843
+ # process the header parameters
844
+ # process the form parameters
845
+ # process the body parameter
846
+
847
+
848
+ # set the HTTP header `Accept`
849
+ if 'Accept' not in _header_params:
850
+ _header_params['Accept'] = self.api_client.select_header_accept(
851
+ [
852
+ 'application/json'
853
+ ]
854
+ )
855
+
856
+
857
+ # authentication setting
858
+ _auth_settings: List[str] = [
859
+ 'authCookie'
860
+ ]
861
+
862
+ return self.api_client.param_serialize(
863
+ method='POST',
864
+ resource_path='/user/{userId}/friendRequest',
865
+ path_params=_path_params,
866
+ query_params=_query_params,
867
+ header_params=_header_params,
868
+ body=_body_params,
869
+ post_params=_form_params,
870
+ files=_files,
871
+ auth_settings=_auth_settings,
872
+ collection_formats=_collection_formats,
873
+ _host=_host,
874
+ _request_auth=_request_auth
875
+ )
876
+
877
+
878
+
879
+
880
+ @validate_call
881
+ async def get_friend_status(
882
+ self,
883
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
884
+ _request_timeout: Union[
885
+ None,
886
+ Annotated[StrictFloat, Field(gt=0)],
887
+ Tuple[
888
+ Annotated[StrictFloat, Field(gt=0)],
889
+ Annotated[StrictFloat, Field(gt=0)]
890
+ ]
891
+ ] = None,
892
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
893
+ _content_type: Optional[StrictStr] = None,
894
+ _headers: Optional[Dict[StrictStr, Any]] = None,
895
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
896
+ ) -> FriendStatus:
897
+ """Check Friend Status
898
+
899
+ Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification.
900
+
901
+ :param user_id: Must be a valid user ID. (required)
902
+ :type user_id: str
903
+ :param _request_timeout: timeout setting for this request. If one
904
+ number provided, it will be total request
905
+ timeout. It can also be a pair (tuple) of
906
+ (connection, read) timeouts.
907
+ :type _request_timeout: int, tuple(int, int), optional
908
+ :param _request_auth: set to override the auth_settings for an a single
909
+ request; this effectively ignores the
910
+ authentication in the spec for a single request.
911
+ :type _request_auth: dict, optional
912
+ :param _content_type: force content-type for the request.
913
+ :type _content_type: str, Optional
914
+ :param _headers: set to override the headers for a single
915
+ request; this effectively ignores the headers
916
+ in the spec for a single request.
917
+ :type _headers: dict, optional
918
+ :param _host_index: set to override the host_index for a single
919
+ request; this effectively ignores the host_index
920
+ in the spec for a single request.
921
+ :type _host_index: int, optional
922
+ :return: Returns the result object.
923
+ """ # noqa: E501
924
+
925
+ _param = self._get_friend_status_serialize(
926
+ user_id=user_id,
927
+ _request_auth=_request_auth,
928
+ _content_type=_content_type,
929
+ _headers=_headers,
930
+ _host_index=_host_index
931
+ )
932
+
933
+ _response_types_map: Dict[str, Optional[str]] = {
934
+ '200': "FriendStatus",
935
+ '401': "Error",
936
+ }
937
+ response_data = await self.api_client.call_api(
938
+ *_param,
939
+ _request_timeout=_request_timeout
940
+ )
941
+ await response_data.read()
942
+ return self.api_client.response_deserialize(
943
+ response_data=response_data,
944
+ response_types_map=_response_types_map,
945
+ ).data
946
+
947
+
948
+ @validate_call
949
+ async def get_friend_status_with_http_info(
950
+ self,
951
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
952
+ _request_timeout: Union[
953
+ None,
954
+ Annotated[StrictFloat, Field(gt=0)],
955
+ Tuple[
956
+ Annotated[StrictFloat, Field(gt=0)],
957
+ Annotated[StrictFloat, Field(gt=0)]
958
+ ]
959
+ ] = None,
960
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
961
+ _content_type: Optional[StrictStr] = None,
962
+ _headers: Optional[Dict[StrictStr, Any]] = None,
963
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
964
+ ) -> ApiResponse[FriendStatus]:
965
+ """Check Friend Status
966
+
967
+ Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification.
968
+
969
+ :param user_id: Must be a valid user ID. (required)
970
+ :type user_id: str
971
+ :param _request_timeout: timeout setting for this request. If one
972
+ number provided, it will be total request
973
+ timeout. It can also be a pair (tuple) of
974
+ (connection, read) timeouts.
975
+ :type _request_timeout: int, tuple(int, int), optional
976
+ :param _request_auth: set to override the auth_settings for an a single
977
+ request; this effectively ignores the
978
+ authentication in the spec for a single request.
979
+ :type _request_auth: dict, optional
980
+ :param _content_type: force content-type for the request.
981
+ :type _content_type: str, Optional
982
+ :param _headers: set to override the headers for a single
983
+ request; this effectively ignores the headers
984
+ in the spec for a single request.
985
+ :type _headers: dict, optional
986
+ :param _host_index: set to override the host_index for a single
987
+ request; this effectively ignores the host_index
988
+ in the spec for a single request.
989
+ :type _host_index: int, optional
990
+ :return: Returns the result object.
991
+ """ # noqa: E501
992
+
993
+ _param = self._get_friend_status_serialize(
994
+ user_id=user_id,
995
+ _request_auth=_request_auth,
996
+ _content_type=_content_type,
997
+ _headers=_headers,
998
+ _host_index=_host_index
999
+ )
1000
+
1001
+ _response_types_map: Dict[str, Optional[str]] = {
1002
+ '200': "FriendStatus",
1003
+ '401': "Error",
1004
+ }
1005
+ response_data = await self.api_client.call_api(
1006
+ *_param,
1007
+ _request_timeout=_request_timeout
1008
+ )
1009
+ await response_data.read()
1010
+ return self.api_client.response_deserialize(
1011
+ response_data=response_data,
1012
+ response_types_map=_response_types_map,
1013
+ )
1014
+
1015
+
1016
+ @validate_call
1017
+ async def get_friend_status_without_preload_content(
1018
+ self,
1019
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
1020
+ _request_timeout: Union[
1021
+ None,
1022
+ Annotated[StrictFloat, Field(gt=0)],
1023
+ Tuple[
1024
+ Annotated[StrictFloat, Field(gt=0)],
1025
+ Annotated[StrictFloat, Field(gt=0)]
1026
+ ]
1027
+ ] = None,
1028
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1029
+ _content_type: Optional[StrictStr] = None,
1030
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1031
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1032
+ ) -> RESTResponseType:
1033
+ """Check Friend Status
1034
+
1035
+ Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification.
1036
+
1037
+ :param user_id: Must be a valid user ID. (required)
1038
+ :type user_id: str
1039
+ :param _request_timeout: timeout setting for this request. If one
1040
+ number provided, it will be total request
1041
+ timeout. It can also be a pair (tuple) of
1042
+ (connection, read) timeouts.
1043
+ :type _request_timeout: int, tuple(int, int), optional
1044
+ :param _request_auth: set to override the auth_settings for an a single
1045
+ request; this effectively ignores the
1046
+ authentication in the spec for a single request.
1047
+ :type _request_auth: dict, optional
1048
+ :param _content_type: force content-type for the request.
1049
+ :type _content_type: str, Optional
1050
+ :param _headers: set to override the headers for a single
1051
+ request; this effectively ignores the headers
1052
+ in the spec for a single request.
1053
+ :type _headers: dict, optional
1054
+ :param _host_index: set to override the host_index for a single
1055
+ request; this effectively ignores the host_index
1056
+ in the spec for a single request.
1057
+ :type _host_index: int, optional
1058
+ :return: Returns the result object.
1059
+ """ # noqa: E501
1060
+
1061
+ _param = self._get_friend_status_serialize(
1062
+ user_id=user_id,
1063
+ _request_auth=_request_auth,
1064
+ _content_type=_content_type,
1065
+ _headers=_headers,
1066
+ _host_index=_host_index
1067
+ )
1068
+
1069
+ _response_types_map: Dict[str, Optional[str]] = {
1070
+ '200': "FriendStatus",
1071
+ '401': "Error",
1072
+ }
1073
+ response_data = await self.api_client.call_api(
1074
+ *_param,
1075
+ _request_timeout=_request_timeout
1076
+ )
1077
+ return response_data.response
1078
+
1079
+
1080
+ def _get_friend_status_serialize(
1081
+ self,
1082
+ user_id,
1083
+ _request_auth,
1084
+ _content_type,
1085
+ _headers,
1086
+ _host_index,
1087
+ ) -> RequestSerialized:
1088
+
1089
+ _host = None
1090
+
1091
+ _collection_formats: Dict[str, str] = {
1092
+ }
1093
+
1094
+ _path_params: Dict[str, str] = {}
1095
+ _query_params: List[Tuple[str, str]] = []
1096
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1097
+ _form_params: List[Tuple[str, str]] = []
1098
+ _files: Dict[
1099
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1100
+ ] = {}
1101
+ _body_params: Optional[bytes] = None
1102
+
1103
+ # process the path parameters
1104
+ if user_id is not None:
1105
+ _path_params['userId'] = user_id
1106
+ # process the query parameters
1107
+ # process the header parameters
1108
+ # process the form parameters
1109
+ # process the body parameter
1110
+
1111
+
1112
+ # set the HTTP header `Accept`
1113
+ if 'Accept' not in _header_params:
1114
+ _header_params['Accept'] = self.api_client.select_header_accept(
1115
+ [
1116
+ 'application/json'
1117
+ ]
1118
+ )
1119
+
1120
+
1121
+ # authentication setting
1122
+ _auth_settings: List[str] = [
1123
+ 'authCookie'
1124
+ ]
1125
+
1126
+ return self.api_client.param_serialize(
1127
+ method='GET',
1128
+ resource_path='/user/{userId}/friendStatus',
1129
+ path_params=_path_params,
1130
+ query_params=_query_params,
1131
+ header_params=_header_params,
1132
+ body=_body_params,
1133
+ post_params=_form_params,
1134
+ files=_files,
1135
+ auth_settings=_auth_settings,
1136
+ collection_formats=_collection_formats,
1137
+ _host=_host,
1138
+ _request_auth=_request_auth
1139
+ )
1140
+
1141
+
1142
+
1143
+
1144
+ @validate_call
1145
+ async def get_friends(
1146
+ self,
1147
+ 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,
1148
+ n: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="The number of objects to return.")] = None,
1149
+ offline: Annotated[Optional[StrictBool], Field(description="Returns *only* offline users if true, returns only online and active users if false")] = None,
1150
+ _request_timeout: Union[
1151
+ None,
1152
+ Annotated[StrictFloat, Field(gt=0)],
1153
+ Tuple[
1154
+ Annotated[StrictFloat, Field(gt=0)],
1155
+ Annotated[StrictFloat, Field(gt=0)]
1156
+ ]
1157
+ ] = None,
1158
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1159
+ _content_type: Optional[StrictStr] = None,
1160
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1161
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1162
+ ) -> List[LimitedUserFriend]:
1163
+ """List Friends
1164
+
1165
+ List information about friends.
1166
+
1167
+ :param offset: A zero-based offset from the default object sorting from where search results start.
1168
+ :type offset: int
1169
+ :param n: The number of objects to return.
1170
+ :type n: int
1171
+ :param offline: Returns *only* offline users if true, returns only online and active users if false
1172
+ :type offline: bool
1173
+ :param _request_timeout: timeout setting for this request. If one
1174
+ number provided, it will be total request
1175
+ timeout. It can also be a pair (tuple) of
1176
+ (connection, read) timeouts.
1177
+ :type _request_timeout: int, tuple(int, int), optional
1178
+ :param _request_auth: set to override the auth_settings for an a single
1179
+ request; this effectively ignores the
1180
+ authentication in the spec for a single request.
1181
+ :type _request_auth: dict, optional
1182
+ :param _content_type: force content-type for the request.
1183
+ :type _content_type: str, Optional
1184
+ :param _headers: set to override the headers for a single
1185
+ request; this effectively ignores the headers
1186
+ in the spec for a single request.
1187
+ :type _headers: dict, optional
1188
+ :param _host_index: set to override the host_index for a single
1189
+ request; this effectively ignores the host_index
1190
+ in the spec for a single request.
1191
+ :type _host_index: int, optional
1192
+ :return: Returns the result object.
1193
+ """ # noqa: E501
1194
+
1195
+ _param = self._get_friends_serialize(
1196
+ offset=offset,
1197
+ n=n,
1198
+ offline=offline,
1199
+ _request_auth=_request_auth,
1200
+ _content_type=_content_type,
1201
+ _headers=_headers,
1202
+ _host_index=_host_index
1203
+ )
1204
+
1205
+ _response_types_map: Dict[str, Optional[str]] = {
1206
+ '200': "List[LimitedUserFriend]",
1207
+ '401': "Error",
1208
+ }
1209
+ response_data = await self.api_client.call_api(
1210
+ *_param,
1211
+ _request_timeout=_request_timeout
1212
+ )
1213
+ await response_data.read()
1214
+ return self.api_client.response_deserialize(
1215
+ response_data=response_data,
1216
+ response_types_map=_response_types_map,
1217
+ ).data
1218
+
1219
+
1220
+ @validate_call
1221
+ async def get_friends_with_http_info(
1222
+ self,
1223
+ 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,
1224
+ n: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="The number of objects to return.")] = None,
1225
+ offline: Annotated[Optional[StrictBool], Field(description="Returns *only* offline users if true, returns only online and active users if false")] = None,
1226
+ _request_timeout: Union[
1227
+ None,
1228
+ Annotated[StrictFloat, Field(gt=0)],
1229
+ Tuple[
1230
+ Annotated[StrictFloat, Field(gt=0)],
1231
+ Annotated[StrictFloat, Field(gt=0)]
1232
+ ]
1233
+ ] = None,
1234
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1235
+ _content_type: Optional[StrictStr] = None,
1236
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1237
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1238
+ ) -> ApiResponse[List[LimitedUserFriend]]:
1239
+ """List Friends
1240
+
1241
+ List information about friends.
1242
+
1243
+ :param offset: A zero-based offset from the default object sorting from where search results start.
1244
+ :type offset: int
1245
+ :param n: The number of objects to return.
1246
+ :type n: int
1247
+ :param offline: Returns *only* offline users if true, returns only online and active users if false
1248
+ :type offline: bool
1249
+ :param _request_timeout: timeout setting for this request. If one
1250
+ number provided, it will be total request
1251
+ timeout. It can also be a pair (tuple) of
1252
+ (connection, read) timeouts.
1253
+ :type _request_timeout: int, tuple(int, int), optional
1254
+ :param _request_auth: set to override the auth_settings for an a single
1255
+ request; this effectively ignores the
1256
+ authentication in the spec for a single request.
1257
+ :type _request_auth: dict, optional
1258
+ :param _content_type: force content-type for the request.
1259
+ :type _content_type: str, Optional
1260
+ :param _headers: set to override the headers for a single
1261
+ request; this effectively ignores the headers
1262
+ in the spec for a single request.
1263
+ :type _headers: dict, optional
1264
+ :param _host_index: set to override the host_index for a single
1265
+ request; this effectively ignores the host_index
1266
+ in the spec for a single request.
1267
+ :type _host_index: int, optional
1268
+ :return: Returns the result object.
1269
+ """ # noqa: E501
1270
+
1271
+ _param = self._get_friends_serialize(
1272
+ offset=offset,
1273
+ n=n,
1274
+ offline=offline,
1275
+ _request_auth=_request_auth,
1276
+ _content_type=_content_type,
1277
+ _headers=_headers,
1278
+ _host_index=_host_index
1279
+ )
1280
+
1281
+ _response_types_map: Dict[str, Optional[str]] = {
1282
+ '200': "List[LimitedUserFriend]",
1283
+ '401': "Error",
1284
+ }
1285
+ response_data = await self.api_client.call_api(
1286
+ *_param,
1287
+ _request_timeout=_request_timeout
1288
+ )
1289
+ await response_data.read()
1290
+ return self.api_client.response_deserialize(
1291
+ response_data=response_data,
1292
+ response_types_map=_response_types_map,
1293
+ )
1294
+
1295
+
1296
+ @validate_call
1297
+ async def get_friends_without_preload_content(
1298
+ self,
1299
+ 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,
1300
+ n: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="The number of objects to return.")] = None,
1301
+ offline: Annotated[Optional[StrictBool], Field(description="Returns *only* offline users if true, returns only online and active users if false")] = None,
1302
+ _request_timeout: Union[
1303
+ None,
1304
+ Annotated[StrictFloat, Field(gt=0)],
1305
+ Tuple[
1306
+ Annotated[StrictFloat, Field(gt=0)],
1307
+ Annotated[StrictFloat, Field(gt=0)]
1308
+ ]
1309
+ ] = None,
1310
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1311
+ _content_type: Optional[StrictStr] = None,
1312
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1313
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1314
+ ) -> RESTResponseType:
1315
+ """List Friends
1316
+
1317
+ List information about friends.
1318
+
1319
+ :param offset: A zero-based offset from the default object sorting from where search results start.
1320
+ :type offset: int
1321
+ :param n: The number of objects to return.
1322
+ :type n: int
1323
+ :param offline: Returns *only* offline users if true, returns only online and active users if false
1324
+ :type offline: bool
1325
+ :param _request_timeout: timeout setting for this request. If one
1326
+ number provided, it will be total request
1327
+ timeout. It can also be a pair (tuple) of
1328
+ (connection, read) timeouts.
1329
+ :type _request_timeout: int, tuple(int, int), optional
1330
+ :param _request_auth: set to override the auth_settings for an a single
1331
+ request; this effectively ignores the
1332
+ authentication in the spec for a single request.
1333
+ :type _request_auth: dict, optional
1334
+ :param _content_type: force content-type for the request.
1335
+ :type _content_type: str, Optional
1336
+ :param _headers: set to override the headers for a single
1337
+ request; this effectively ignores the headers
1338
+ in the spec for a single request.
1339
+ :type _headers: dict, optional
1340
+ :param _host_index: set to override the host_index for a single
1341
+ request; this effectively ignores the host_index
1342
+ in the spec for a single request.
1343
+ :type _host_index: int, optional
1344
+ :return: Returns the result object.
1345
+ """ # noqa: E501
1346
+
1347
+ _param = self._get_friends_serialize(
1348
+ offset=offset,
1349
+ n=n,
1350
+ offline=offline,
1351
+ _request_auth=_request_auth,
1352
+ _content_type=_content_type,
1353
+ _headers=_headers,
1354
+ _host_index=_host_index
1355
+ )
1356
+
1357
+ _response_types_map: Dict[str, Optional[str]] = {
1358
+ '200': "List[LimitedUserFriend]",
1359
+ '401': "Error",
1360
+ }
1361
+ response_data = await self.api_client.call_api(
1362
+ *_param,
1363
+ _request_timeout=_request_timeout
1364
+ )
1365
+ return response_data.response
1366
+
1367
+
1368
+ def _get_friends_serialize(
1369
+ self,
1370
+ offset,
1371
+ n,
1372
+ offline,
1373
+ _request_auth,
1374
+ _content_type,
1375
+ _headers,
1376
+ _host_index,
1377
+ ) -> RequestSerialized:
1378
+
1379
+ _host = None
1380
+
1381
+ _collection_formats: Dict[str, str] = {
1382
+ }
1383
+
1384
+ _path_params: Dict[str, str] = {}
1385
+ _query_params: List[Tuple[str, str]] = []
1386
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1387
+ _form_params: List[Tuple[str, str]] = []
1388
+ _files: Dict[
1389
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1390
+ ] = {}
1391
+ _body_params: Optional[bytes] = None
1392
+
1393
+ # process the path parameters
1394
+ # process the query parameters
1395
+ if offset is not None:
1396
+
1397
+ _query_params.append(('offset', offset))
1398
+
1399
+ if n is not None:
1400
+
1401
+ _query_params.append(('n', n))
1402
+
1403
+ if offline is not None:
1404
+
1405
+ _query_params.append(('offline', offline))
1406
+
1407
+ # process the header parameters
1408
+ # process the form parameters
1409
+ # process the body parameter
1410
+
1411
+
1412
+ # set the HTTP header `Accept`
1413
+ if 'Accept' not in _header_params:
1414
+ _header_params['Accept'] = self.api_client.select_header_accept(
1415
+ [
1416
+ 'application/json'
1417
+ ]
1418
+ )
1419
+
1420
+
1421
+ # authentication setting
1422
+ _auth_settings: List[str] = [
1423
+ 'authCookie'
1424
+ ]
1425
+
1426
+ return self.api_client.param_serialize(
1427
+ method='GET',
1428
+ resource_path='/auth/user/friends',
1429
+ path_params=_path_params,
1430
+ query_params=_query_params,
1431
+ header_params=_header_params,
1432
+ body=_body_params,
1433
+ post_params=_form_params,
1434
+ files=_files,
1435
+ auth_settings=_auth_settings,
1436
+ collection_formats=_collection_formats,
1437
+ _host=_host,
1438
+ _request_auth=_request_auth
1439
+ )
1440
+
1441
+
1442
+
1443
+
1444
+ @validate_call
1445
+ async def unfriend(
1446
+ self,
1447
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
1448
+ _request_timeout: Union[
1449
+ None,
1450
+ Annotated[StrictFloat, Field(gt=0)],
1451
+ Tuple[
1452
+ Annotated[StrictFloat, Field(gt=0)],
1453
+ Annotated[StrictFloat, Field(gt=0)]
1454
+ ]
1455
+ ] = None,
1456
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1457
+ _content_type: Optional[StrictStr] = None,
1458
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1459
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1460
+ ) -> Success:
1461
+ """Unfriend
1462
+
1463
+ Unfriend a user by ID.
1464
+
1465
+ :param user_id: Must be a valid user ID. (required)
1466
+ :type user_id: str
1467
+ :param _request_timeout: timeout setting for this request. If one
1468
+ number provided, it will be total request
1469
+ timeout. It can also be a pair (tuple) of
1470
+ (connection, read) timeouts.
1471
+ :type _request_timeout: int, tuple(int, int), optional
1472
+ :param _request_auth: set to override the auth_settings for an a single
1473
+ request; this effectively ignores the
1474
+ authentication in the spec for a single request.
1475
+ :type _request_auth: dict, optional
1476
+ :param _content_type: force content-type for the request.
1477
+ :type _content_type: str, Optional
1478
+ :param _headers: set to override the headers for a single
1479
+ request; this effectively ignores the headers
1480
+ in the spec for a single request.
1481
+ :type _headers: dict, optional
1482
+ :param _host_index: set to override the host_index for a single
1483
+ request; this effectively ignores the host_index
1484
+ in the spec for a single request.
1485
+ :type _host_index: int, optional
1486
+ :return: Returns the result object.
1487
+ """ # noqa: E501
1488
+
1489
+ _param = self._unfriend_serialize(
1490
+ user_id=user_id,
1491
+ _request_auth=_request_auth,
1492
+ _content_type=_content_type,
1493
+ _headers=_headers,
1494
+ _host_index=_host_index
1495
+ )
1496
+
1497
+ _response_types_map: Dict[str, Optional[str]] = {
1498
+ '200': "Success",
1499
+ '400': "Error",
1500
+ '401': "Error",
1501
+ }
1502
+ response_data = await self.api_client.call_api(
1503
+ *_param,
1504
+ _request_timeout=_request_timeout
1505
+ )
1506
+ await response_data.read()
1507
+ return self.api_client.response_deserialize(
1508
+ response_data=response_data,
1509
+ response_types_map=_response_types_map,
1510
+ ).data
1511
+
1512
+
1513
+ @validate_call
1514
+ async def unfriend_with_http_info(
1515
+ self,
1516
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
1517
+ _request_timeout: Union[
1518
+ None,
1519
+ Annotated[StrictFloat, Field(gt=0)],
1520
+ Tuple[
1521
+ Annotated[StrictFloat, Field(gt=0)],
1522
+ Annotated[StrictFloat, Field(gt=0)]
1523
+ ]
1524
+ ] = None,
1525
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1526
+ _content_type: Optional[StrictStr] = None,
1527
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1528
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1529
+ ) -> ApiResponse[Success]:
1530
+ """Unfriend
1531
+
1532
+ Unfriend a user by ID.
1533
+
1534
+ :param user_id: Must be a valid user ID. (required)
1535
+ :type user_id: str
1536
+ :param _request_timeout: timeout setting for this request. If one
1537
+ number provided, it will be total request
1538
+ timeout. It can also be a pair (tuple) of
1539
+ (connection, read) timeouts.
1540
+ :type _request_timeout: int, tuple(int, int), optional
1541
+ :param _request_auth: set to override the auth_settings for an a single
1542
+ request; this effectively ignores the
1543
+ authentication in the spec for a single request.
1544
+ :type _request_auth: dict, optional
1545
+ :param _content_type: force content-type for the request.
1546
+ :type _content_type: str, Optional
1547
+ :param _headers: set to override the headers for a single
1548
+ request; this effectively ignores the headers
1549
+ in the spec for a single request.
1550
+ :type _headers: dict, optional
1551
+ :param _host_index: set to override the host_index for a single
1552
+ request; this effectively ignores the host_index
1553
+ in the spec for a single request.
1554
+ :type _host_index: int, optional
1555
+ :return: Returns the result object.
1556
+ """ # noqa: E501
1557
+
1558
+ _param = self._unfriend_serialize(
1559
+ user_id=user_id,
1560
+ _request_auth=_request_auth,
1561
+ _content_type=_content_type,
1562
+ _headers=_headers,
1563
+ _host_index=_host_index
1564
+ )
1565
+
1566
+ _response_types_map: Dict[str, Optional[str]] = {
1567
+ '200': "Success",
1568
+ '400': "Error",
1569
+ '401': "Error",
1570
+ }
1571
+ response_data = await self.api_client.call_api(
1572
+ *_param,
1573
+ _request_timeout=_request_timeout
1574
+ )
1575
+ await response_data.read()
1576
+ return self.api_client.response_deserialize(
1577
+ response_data=response_data,
1578
+ response_types_map=_response_types_map,
1579
+ )
1580
+
1581
+
1582
+ @validate_call
1583
+ async def unfriend_without_preload_content(
1584
+ self,
1585
+ user_id: Annotated[StrictStr, Field(description="Must be a valid user ID.")],
1586
+ _request_timeout: Union[
1587
+ None,
1588
+ Annotated[StrictFloat, Field(gt=0)],
1589
+ Tuple[
1590
+ Annotated[StrictFloat, Field(gt=0)],
1591
+ Annotated[StrictFloat, Field(gt=0)]
1592
+ ]
1593
+ ] = None,
1594
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1595
+ _content_type: Optional[StrictStr] = None,
1596
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1597
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1598
+ ) -> RESTResponseType:
1599
+ """Unfriend
1600
+
1601
+ Unfriend a user by ID.
1602
+
1603
+ :param user_id: Must be a valid user ID. (required)
1604
+ :type user_id: str
1605
+ :param _request_timeout: timeout setting for this request. If one
1606
+ number provided, it will be total request
1607
+ timeout. It can also be a pair (tuple) of
1608
+ (connection, read) timeouts.
1609
+ :type _request_timeout: int, tuple(int, int), optional
1610
+ :param _request_auth: set to override the auth_settings for an a single
1611
+ request; this effectively ignores the
1612
+ authentication in the spec for a single request.
1613
+ :type _request_auth: dict, optional
1614
+ :param _content_type: force content-type for the request.
1615
+ :type _content_type: str, Optional
1616
+ :param _headers: set to override the headers for a single
1617
+ request; this effectively ignores the headers
1618
+ in the spec for a single request.
1619
+ :type _headers: dict, optional
1620
+ :param _host_index: set to override the host_index for a single
1621
+ request; this effectively ignores the host_index
1622
+ in the spec for a single request.
1623
+ :type _host_index: int, optional
1624
+ :return: Returns the result object.
1625
+ """ # noqa: E501
1626
+
1627
+ _param = self._unfriend_serialize(
1628
+ user_id=user_id,
1629
+ _request_auth=_request_auth,
1630
+ _content_type=_content_type,
1631
+ _headers=_headers,
1632
+ _host_index=_host_index
1633
+ )
1634
+
1635
+ _response_types_map: Dict[str, Optional[str]] = {
1636
+ '200': "Success",
1637
+ '400': "Error",
1638
+ '401': "Error",
1639
+ }
1640
+ response_data = await self.api_client.call_api(
1641
+ *_param,
1642
+ _request_timeout=_request_timeout
1643
+ )
1644
+ return response_data.response
1645
+
1646
+
1647
+ def _unfriend_serialize(
1648
+ self,
1649
+ user_id,
1650
+ _request_auth,
1651
+ _content_type,
1652
+ _headers,
1653
+ _host_index,
1654
+ ) -> RequestSerialized:
1655
+
1656
+ _host = None
1657
+
1658
+ _collection_formats: Dict[str, str] = {
1659
+ }
1660
+
1661
+ _path_params: Dict[str, str] = {}
1662
+ _query_params: List[Tuple[str, str]] = []
1663
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1664
+ _form_params: List[Tuple[str, str]] = []
1665
+ _files: Dict[
1666
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1667
+ ] = {}
1668
+ _body_params: Optional[bytes] = None
1669
+
1670
+ # process the path parameters
1671
+ if user_id is not None:
1672
+ _path_params['userId'] = user_id
1673
+ # process the query parameters
1674
+ # process the header parameters
1675
+ # process the form parameters
1676
+ # process the body parameter
1677
+
1678
+
1679
+ # set the HTTP header `Accept`
1680
+ if 'Accept' not in _header_params:
1681
+ _header_params['Accept'] = self.api_client.select_header_accept(
1682
+ [
1683
+ 'application/json'
1684
+ ]
1685
+ )
1686
+
1687
+
1688
+ # authentication setting
1689
+ _auth_settings: List[str] = [
1690
+ 'authCookie'
1691
+ ]
1692
+
1693
+ return self.api_client.param_serialize(
1694
+ method='DELETE',
1695
+ resource_path='/auth/user/friends/{userId}',
1696
+ path_params=_path_params,
1697
+ query_params=_query_params,
1698
+ header_params=_header_params,
1699
+ body=_body_params,
1700
+ post_params=_form_params,
1701
+ files=_files,
1702
+ auth_settings=_auth_settings,
1703
+ collection_formats=_collection_formats,
1704
+ _host=_host,
1705
+ _request_auth=_request_auth
1706
+ )
1707
+
1708
+