structifyai 1.158.0__py3-none-any.whl → 1.176.1__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 (364) hide show
  1. structify/_base_client.py +140 -11
  2. structify/_client.py +1116 -253
  3. structify/_models.py +16 -1
  4. structify/_streaming.py +12 -10
  5. structify/_types.py +12 -2
  6. structify/_version.py +1 -1
  7. structify/lib/__init__.py +5 -0
  8. structify/lib/cost_confirmation.py +63 -0
  9. structify/pagination.py +63 -1
  10. structify/resources/__init__.py +57 -27
  11. structify/resources/admin/__init__.py +26 -40
  12. structify/resources/admin/admin.py +39 -71
  13. structify/resources/admin/chat_templates.py +382 -0
  14. structify/resources/admin/jobs.py +76 -3
  15. structify/resources/admin/sandbox.py +184 -0
  16. structify/resources/admin/teams.py +88 -0
  17. structify/resources/admin/users.py +28 -238
  18. structify/resources/chat.py +232 -0
  19. structify/resources/connector_catalog/__init__.py +33 -0
  20. structify/resources/connector_catalog/admin.py +1510 -0
  21. structify/resources/connector_catalog/connector_catalog.py +394 -0
  22. structify/resources/connectors/__init__.py +33 -0
  23. structify/resources/{connectors.py → connectors/connectors.py} +1155 -325
  24. structify/resources/connectors/type_snippets.py +169 -0
  25. structify/resources/datasets/datasets.py +0 -4
  26. structify/resources/documents.py +1 -123
  27. structify/resources/external.py +35 -2
  28. structify/resources/jobs.py +19 -336
  29. structify/resources/nango.py +234 -0
  30. structify/resources/polars.py +225 -103
  31. structify/resources/sandbox.py +13 -110
  32. structify/resources/scrape.py +0 -16
  33. structify/resources/sessions.py +241 -153
  34. structify/resources/slack.py +1 -151
  35. structify/resources/structure.py +120 -48
  36. structify/resources/teams.py +96 -0
  37. structify/resources/user/__init__.py +14 -0
  38. structify/resources/user/api_keys.py +380 -0
  39. structify/resources/user/user.py +209 -2
  40. structify/resources/whitelabel.py +294 -187
  41. structify/resources/whitelabel_service.py +222 -0
  42. structify/resources/{report.py → wiki.py} +237 -210
  43. structify/resources/workflow_schedule.py +4 -5
  44. structify/types/__init__.py +67 -36
  45. structify/types/add_member_response.py +35 -4
  46. structify/types/admin/__init__.py +13 -88
  47. structify/types/admin/admin_dataset_return.py +6 -0
  48. structify/types/admin/{user_get_credits_response.py → admin_delete_jobs_response.py} +3 -3
  49. structify/types/admin/admin_list_jobs_response.py +35 -1
  50. structify/types/admin/admin_sandbox.py +38 -0
  51. structify/types/admin/chat_template_create_params.py +21 -0
  52. structify/types/admin/{human_llm_start_next_job_params.py → chat_template_list_params.py} +3 -3
  53. structify/types/admin/{human_llm_get_jobs_response.py → chat_template_list_response.py} +3 -3
  54. structify/types/admin/chat_template_update_params.py +22 -0
  55. structify/types/admin/{user_add_credits_response.py → expire_grants_response.py} +5 -3
  56. structify/types/admin/impersonate_response.py +17 -0
  57. structify/types/admin/{next_action_get_batched_training_data_params.py → job_delete_params.py} +2 -2
  58. structify/types/admin/{user_get_credits_params.py → sandbox_list_params.py} +4 -4
  59. structify/types/admin/sandbox_type.py +7 -0
  60. structify/types/admin/{user_set_credits_params.py → team_expire_grants_params.py} +4 -4
  61. structify/types/admin/user.py +16 -0
  62. structify/types/admin/user_create_params.py +1 -0
  63. structify/types/admin/{training_dataset_delete_params.py → user_impersonate_params.py} +3 -3
  64. structify/types/admin/user_list_response.py +14 -4
  65. structify/types/admin_grant_access_response.py +2 -0
  66. structify/types/{slack_user_mapping_response.py → admin_issue_found_response.py} +3 -5
  67. structify/types/chat_add_git_commit_response.py +2 -0
  68. structify/types/{admin/human_llm_get_next_step_params.py → chat_admin_issue_found_params.py} +4 -4
  69. structify/types/chat_create_session_params.py +7 -0
  70. structify/types/chat_dependency.py +17 -0
  71. structify/types/chat_event.py +51 -239
  72. structify/types/chat_get_git_commit_response.py +2 -0
  73. structify/types/chat_get_session_timeline_response.py +31 -1
  74. structify/types/{job_get_steps_response.py → chat_list_templates_response.py} +3 -3
  75. structify/types/chat_prompt.py +2 -0
  76. structify/types/chat_revert_to_commit_response.py +2 -0
  77. structify/types/chat_session.py +14 -0
  78. structify/types/chat_session_with_messages.py +33 -1
  79. structify/types/chat_template.py +31 -0
  80. structify/types/chat_update_session_params.py +2 -0
  81. structify/types/code_generate_code_params.py +7 -0
  82. structify/types/connector.py +16 -25
  83. structify/types/connector_auth_method.py +29 -0
  84. structify/types/connector_auth_method_with_fields.py +15 -0
  85. structify/types/connector_catalog/__init__.py +32 -0
  86. structify/types/connector_catalog/admin_batch_create_credential_fields_params.py +14 -0
  87. structify/types/connector_catalog/admin_batch_create_credential_fields_response.py +10 -0
  88. structify/types/connector_catalog/admin_batch_create_scopes_params.py +14 -0
  89. structify/types/connector_catalog/admin_create_auth_method_params.py +22 -0
  90. structify/types/connector_catalog/admin_create_catalog_params.py +22 -0
  91. structify/types/connector_catalog/admin_create_credential_field_params.py +28 -0
  92. structify/types/connector_catalog/admin_create_scope_params.py +19 -0
  93. structify/types/connector_catalog/admin_list_nango_pending_response.py +10 -0
  94. structify/types/{admin/training_dataset_get_datum_info_params.py → connector_catalog/admin_list_scopes_params.py} +3 -3
  95. structify/types/connector_catalog/admin_update_auth_method_params.py +16 -0
  96. structify/types/connector_catalog/admin_update_catalog_params.py +20 -0
  97. structify/types/connector_catalog/admin_update_credential_field_params.py +26 -0
  98. structify/types/connector_catalog/admin_update_scope_params.py +18 -0
  99. structify/types/connector_catalog/admin_upload_logo_params.py +13 -0
  100. structify/types/connector_catalog/batch_create_scopes_response.py +12 -0
  101. structify/types/connector_catalog/connector_auth_method_scope.py +25 -0
  102. structify/types/connector_catalog/connector_catalog.py +26 -0
  103. structify/types/connector_catalog/create_credential_field_request_param.py +28 -0
  104. structify/types/connector_catalog/create_scope_request_param.py +19 -0
  105. structify/types/connector_catalog/list_scopes_response.py +12 -0
  106. structify/types/connector_catalog/pending_nango_integration.py +17 -0
  107. structify/types/{admin/user_set_credits_response.py → connector_catalog/upload_logo_response.py} +3 -3
  108. structify/types/connector_catalog_list_params.py +20 -0
  109. structify/types/connector_catalog_list_response.py +22 -0
  110. structify/types/connector_catalog_with_methods.py +15 -0
  111. structify/types/connector_category.py +7 -0
  112. structify/types/connector_create_params.py +11 -25
  113. structify/types/connector_credential_field.py +34 -0
  114. structify/types/connector_delete_schema_object_params.py +35 -0
  115. structify/types/connector_explore_params.py +19 -0
  116. structify/types/connector_explorer_chat.py +9 -84
  117. structify/types/connector_get_clarification_requests_response.py +36 -0
  118. structify/types/connector_get_response.py +2 -0
  119. structify/types/connector_list_with_snippets_params.py +12 -0
  120. structify/types/connector_list_with_snippets_response.py +10 -0
  121. structify/types/connector_search_tables_params.py +15 -0
  122. structify/types/connector_search_tables_response.py +160 -0
  123. structify/types/connector_store_response.py +21 -0
  124. structify/types/connector_summaries_params.py +15 -0
  125. structify/types/connector_summaries_response.py +10 -0
  126. structify/types/connector_summary.py +16 -0
  127. structify/types/connector_table_info.py +15 -0
  128. structify/types/connector_update_column_params.py +12 -0
  129. structify/types/connector_update_params.py +4 -25
  130. structify/types/connector_update_table_params.py +14 -0
  131. structify/types/connector_with_secrets.py +2 -0
  132. structify/types/connector_with_snippets.py +11 -0
  133. structify/types/connectors/__init__.py +6 -0
  134. structify/types/connectors/snippet.py +20 -0
  135. structify/types/connectors/type_snippet_upsert_params.py +12 -0
  136. structify/types/create_chat_session_response.py +2 -0
  137. structify/types/dataset_create_params.py +0 -2
  138. structify/types/dataset_descriptor.py +6 -0
  139. structify/types/dataset_descriptor_param.py +6 -0
  140. structify/types/dataset_get_response.py +6 -0
  141. structify/types/dataset_list_response.py +6 -0
  142. structify/types/dataset_view_table_response.py +3 -1
  143. structify/types/delete_chat_session_response.py +2 -0
  144. structify/types/delete_schema_object_request_param.py +35 -0
  145. structify/types/delete_schema_object_response.py +13 -0
  146. structify/types/edge_spec_param.py +13 -0
  147. structify/types/entity_get_source_entities_response.py +0 -2
  148. structify/types/entity_list_jobs_response.py +3 -3
  149. structify/types/entity_view_response.py +0 -2
  150. structify/types/estimate_cost_response.py +9 -0
  151. structify/types/exploration_phase_id.py +79 -0
  152. structify/types/finalize_dag_response.py +11 -0
  153. structify/types/get_chat_session_response.py +14 -6
  154. structify/types/get_dependencies_response.py +15 -0
  155. structify/types/get_job_events_response.py +20 -0
  156. structify/types/get_node_response.py +10 -0
  157. structify/types/job_cancel_response.py +3 -3
  158. structify/types/job_event_body.py +108 -1
  159. structify/types/job_get_source_entities_response.py +0 -2
  160. structify/types/job_list_params.py +1 -1
  161. structify/types/job_list_response.py +35 -1
  162. structify/types/knowledge_graph.py +6 -0
  163. structify/types/knowledge_graph_param.py +6 -0
  164. structify/types/list_chat_sessions_response.py +2 -0
  165. structify/types/list_collaborators_response.py +4 -0
  166. structify/types/list_tables_response.py +12 -0
  167. structify/types/llm_information_store.py +62 -28
  168. structify/types/merge_config.py +2 -0
  169. structify/types/merge_config_param.py +2 -0
  170. structify/types/message.py +2 -0
  171. structify/types/nango_create_session_params.py +21 -0
  172. structify/types/nango_create_session_response.py +15 -0
  173. structify/types/nango_list_integrations_response.py +28 -0
  174. structify/types/{session_create_node_params.py → node_spec_param.py} +4 -4
  175. structify/types/refresh_session_response.py +15 -0
  176. structify/types/sandbox.py +8 -2
  177. structify/types/sandbox_get_params.py +2 -1
  178. structify/types/scrape_list_params.py +1 -22
  179. structify/types/scrape_list_response.py +2 -0
  180. structify/types/scrape_scrape_params.py +1 -14
  181. structify/types/scrape_scrape_response.py +2 -0
  182. structify/types/select_team_response.py +3 -1
  183. structify/types/{connector_approve_version_params.py → session_confirm_node_params.py} +3 -3
  184. structify/types/session_finalize_dag_params.py +20 -0
  185. structify/types/session_get_events_response.py +2 -0
  186. structify/types/session_request_confirmation_params.py +13 -0
  187. structify/types/session_upload_node_output_data_params.py +3 -0
  188. structify/types/slack_event_payload_param.py +18 -2
  189. structify/types/slack_events_params.py +18 -2
  190. structify/types/source_list_response.py +0 -2
  191. structify/types/structure_enhance_property_params.py +2 -17
  192. structify/types/structure_enhance_relationship_params.py +2 -17
  193. structify/types/structure_find_relationship_params.py +2 -18
  194. structify/types/structure_pdf_params.py +22 -0
  195. structify/types/structure_pdf_response.py +11 -0
  196. structify/types/structure_run_async_params.py +10 -17
  197. structify/types/table.py +2 -0
  198. structify/types/table_param.py +2 -0
  199. structify/types/team.py +14 -0
  200. structify/types/{admin/training_dataset_remove_datum_params.py → team_create_link_code_params.py} +3 -3
  201. structify/types/team_update_params.py +10 -0
  202. structify/types/team_wiki_page.py +28 -0
  203. structify/types/teams_link_code_response.py +13 -0
  204. structify/types/token_response.py +6 -2
  205. structify/types/tool_invocation.py +468 -0
  206. structify/types/tool_result.py +99 -0
  207. structify/types/update_table_response.py +46 -0
  208. structify/types/usage_group_key.py +14 -1
  209. structify/types/user/__init__.py +4 -0
  210. structify/types/{admin/training_dataset_size_params.py → user/api_key_create_params.py} +5 -5
  211. structify/types/user/api_key_info.py +24 -0
  212. structify/types/user/create_api_key_response.py +12 -0
  213. structify/types/user/list_api_keys_response.py +12 -0
  214. structify/types/user_enrich_params.py +11 -0
  215. structify/types/user_info.py +22 -0
  216. structify/types/user_refresh_params.py +13 -0
  217. structify/types/user_transactions_response.py +5 -5
  218. structify/types/user_update_params.py +32 -12
  219. structify/types/user_usage_response.py +0 -2
  220. structify/types/wiki_connector_reference.py +63 -0
  221. structify/types/wiki_create_params.py +16 -0
  222. structify/types/{admin/training_dataset_list_response.py → wiki_list_response.py} +4 -2
  223. structify/types/wiki_page_with_references.py +12 -0
  224. structify/types/wiki_update_params.py +16 -0
  225. structify/types/workflow_dag.py +2 -0
  226. structify/types/workflow_node_execution_status.py +3 -1
  227. structify/types/workflow_schedule_info.py +2 -2
  228. structify/types/workflow_session_node.py +10 -0
  229. {structifyai-1.158.0.dist-info → structifyai-1.176.1.dist-info}/METADATA +67 -4
  230. structifyai-1.176.1.dist-info/RECORD +496 -0
  231. {structifyai-1.158.0.dist-info → structifyai-1.176.1.dist-info}/licenses/LICENSE +1 -1
  232. structify/resources/admin/human_llm.py +0 -819
  233. structify/resources/admin/next_action.py +0 -656
  234. structify/resources/admin/training_datasets.py +0 -2028
  235. structify/resources/external/__init__.py +0 -61
  236. structify/resources/external/external.py +0 -166
  237. structify/resources/external/news.py +0 -519
  238. structify/resources/external/people.py +0 -998
  239. structify/resources/external/search_api.py +0 -1525
  240. structify/types/active_version_data.py +0 -21
  241. structify/types/active_version_response.py +0 -13
  242. structify/types/admin/action_training_data_entry.py +0 -219
  243. structify/types/admin/action_training_data_response.py +0 -12
  244. structify/types/admin/datum_status.py +0 -19
  245. structify/types/admin/delete_action_training_data_response.py +0 -9
  246. structify/types/admin/human_llm_add_search_for_job_params.py +0 -13
  247. structify/types/admin/human_llm_add_to_dataset_params.py +0 -186
  248. structify/types/admin/human_llm_finish_job_params.py +0 -13
  249. structify/types/admin/human_llm_get_jobs_params.py +0 -12
  250. structify/types/admin/human_llm_get_next_step_response.py +0 -196
  251. structify/types/admin/human_llm_job.py +0 -73
  252. structify/types/admin/human_llm_prelabel_step_response.py +0 -184
  253. structify/types/admin/human_llm_update_step_params.py +0 -186
  254. structify/types/admin/labeling_stats.py +0 -24
  255. structify/types/admin/next_action_add_training_datum_params.py +0 -203
  256. structify/types/admin/next_action_delete_training_data_params.py +0 -12
  257. structify/types/admin/next_action_get_training_data_params.py +0 -25
  258. structify/types/admin/next_action_get_training_datum_params.py +0 -12
  259. structify/types/admin/next_action_label_training_datum_params.py +0 -90
  260. structify/types/admin/step_choices.py +0 -32
  261. structify/types/admin/training_dataset_add_datum_params.py +0 -13
  262. structify/types/admin/training_dataset_add_params.py +0 -12
  263. structify/types/admin/training_dataset_download_datum_params.py +0 -13
  264. structify/types/admin/training_dataset_get_labeller_stats_params.py +0 -23
  265. structify/types/admin/training_dataset_get_labeller_stats_response.py +0 -10
  266. structify/types/admin/training_dataset_get_next_for_labeling_params.py +0 -15
  267. structify/types/admin/training_dataset_get_next_for_qa_params.py +0 -18
  268. structify/types/admin/training_dataset_get_next_suspicious_params.py +0 -23
  269. structify/types/admin/training_dataset_label_datum_params.py +0 -188
  270. structify/types/admin/training_dataset_list_datums_params.py +0 -17
  271. structify/types/admin/training_dataset_list_datums_response.py +0 -33
  272. structify/types/admin/training_dataset_mark_datum_suspicious_params.py +0 -19
  273. structify/types/admin/training_dataset_size_response.py +0 -37
  274. structify/types/admin/training_dataset_suspicious_count_params.py +0 -23
  275. structify/types/admin/training_dataset_suspicious_count_response.py +0 -9
  276. structify/types/admin/training_dataset_switch_dataset_params.py +0 -13
  277. structify/types/admin/training_dataset_update_datum_status_params.py +0 -18
  278. structify/types/admin/training_dataset_upload_labeled_step_params.py +0 -15
  279. structify/types/admin/training_dataset_verify_datum_params.py +0 -17
  280. structify/types/admin/training_datum_response.py +0 -405
  281. structify/types/admin/user_add_credits_params.py +0 -18
  282. structify/types/chat_prompt_param.py +0 -255
  283. structify/types/connector_column_descriptor.py +0 -21
  284. structify/types/connector_relational_database_descriptor.py +0 -13
  285. structify/types/connector_table_descriptor.py +0 -22
  286. structify/types/document_structure_params.py +0 -21
  287. structify/types/document_structure_response.py +0 -8
  288. structify/types/execution_step.py +0 -198
  289. structify/types/external/__init__.py +0 -96
  290. structify/types/external/companies_search_response.py +0 -28
  291. structify/types/external/company_search_result.py +0 -69
  292. structify/types/external/enriched_organization.py +0 -69
  293. structify/types/external/everything_response.py +0 -19
  294. structify/types/external/google_maps_result.py +0 -38
  295. structify/types/external/google_search_response.py +0 -19
  296. structify/types/external/google_search_result.py +0 -21
  297. structify/types/external/job_posting.py +0 -54
  298. structify/types/external/job_postings_response.py +0 -19
  299. structify/types/external/location_coordinates.py +0 -13
  300. structify/types/external/location_response.py +0 -16
  301. structify/types/external/location_result.py +0 -24
  302. structify/types/external/news_article.py +0 -33
  303. structify/types/external/news_everything_params.py +0 -45
  304. structify/types/external/news_source.py +0 -15
  305. structify/types/external/news_source_detail.py +0 -28
  306. structify/types/external/news_sources_params.py +0 -19
  307. structify/types/external/news_top_headlines_params.py +0 -28
  308. structify/types/external/organization_detail.py +0 -87
  309. structify/types/external/people_match_response.py +0 -18
  310. structify/types/external/people_search_response.py +0 -28
  311. structify/types/external/person_companies_search_params.py +0 -63
  312. structify/types/external/person_match.py +0 -60
  313. structify/types/external/person_organization_job_postings_params.py +0 -16
  314. structify/types/external/person_organizations_enrich_params.py +0 -16
  315. structify/types/external/person_people_match_params.py +0 -49
  316. structify/types/external/person_people_search_params.py +0 -57
  317. structify/types/external/person_search_result.py +0 -48
  318. structify/types/external/search_api_google_flights_calendar_params.py +0 -28
  319. structify/types/external/search_api_google_flights_calendar_response.py +0 -8
  320. structify/types/external/search_api_google_flights_location_search_params.py +0 -16
  321. structify/types/external/search_api_google_flights_location_search_response.py +0 -8
  322. structify/types/external/search_api_google_flights_search_params.py +0 -43
  323. structify/types/external/search_api_google_flights_search_response.py +0 -8
  324. structify/types/external/search_api_google_maps_place_details_params.py +0 -16
  325. structify/types/external/search_api_google_maps_place_details_response.py +0 -8
  326. structify/types/external/search_api_google_maps_place_photos_params.py +0 -16
  327. structify/types/external/search_api_google_maps_place_photos_response.py +0 -8
  328. structify/types/external/search_api_google_maps_place_reviews_params.py +0 -19
  329. structify/types/external/search_api_google_maps_place_reviews_response.py +0 -8
  330. structify/types/external/search_api_google_maps_search_params.py +0 -22
  331. structify/types/external/search_api_google_maps_search_response.py +0 -10
  332. structify/types/external/search_api_google_scholar_author_search_params.py +0 -22
  333. structify/types/external/search_api_google_scholar_author_search_response.py +0 -8
  334. structify/types/external/search_api_google_scholar_citations_params.py +0 -22
  335. structify/types/external/search_api_google_scholar_citations_response.py +0 -8
  336. structify/types/external/search_api_google_scholar_search_params.py +0 -28
  337. structify/types/external/search_api_google_scholar_search_response.py +0 -8
  338. structify/types/external/search_api_google_search_params.py +0 -25
  339. structify/types/external/search_api_location_search_params.py +0 -22
  340. structify/types/external/sources_response.py +0 -16
  341. structify/types/external/top_headlines_response.py +0 -19
  342. structify/types/job_delete_response.py +0 -7
  343. structify/types/job_get_response.py +0 -62
  344. structify/types/job_get_step_graph_response.py +0 -233
  345. structify/types/job_get_step_response.py +0 -196
  346. structify/types/message_param.py +0 -35
  347. structify/types/pending_version_response.py +0 -21
  348. structify/types/report_missing_params.py +0 -18
  349. structify/types/report_missing_response.py +0 -7
  350. structify/types/report_relationship_params.py +0 -18
  351. structify/types/report_relationship_response.py +0 -7
  352. structify/types/report_step_params.py +0 -15
  353. structify/types/report_step_response.py +0 -7
  354. structify/types/report_wrong_params.py +0 -18
  355. structify/types/report_wrong_response.py +0 -7
  356. structify/types/sandbox_create_params.py +0 -20
  357. structify/types/session_create_edge_params.py +0 -13
  358. structify/types/slack_connection_status.py +0 -15
  359. structify/types/slack_user_mapping_params.py +0 -18
  360. structify/types/tool_metadata_param.py +0 -17
  361. structify/types/user_team.py +0 -35
  362. structify/types/workflow_schedule_get_response.py +0 -10
  363. structifyai-1.158.0.dist-info/RECORD +0 -530
  364. {structifyai-1.158.0.dist-info → structifyai-1.176.1.dist-info}/WHEEL +0 -0
@@ -1,1525 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing import Optional
6
-
7
- import httpx
8
-
9
- from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
10
- from ..._utils import maybe_transform, async_maybe_transform
11
- from ..._compat import cached_property
12
- from ..._resource import SyncAPIResource, AsyncAPIResource
13
- from ..._response import (
14
- to_raw_response_wrapper,
15
- to_streamed_response_wrapper,
16
- async_to_raw_response_wrapper,
17
- async_to_streamed_response_wrapper,
18
- )
19
- from ..._base_client import make_request_options
20
- from ...types.external import (
21
- search_api_google_search_params,
22
- search_api_location_search_params,
23
- search_api_google_maps_search_params,
24
- search_api_google_flights_search_params,
25
- search_api_google_scholar_search_params,
26
- search_api_google_flights_calendar_params,
27
- search_api_google_maps_place_photos_params,
28
- search_api_google_scholar_citations_params,
29
- search_api_google_maps_place_details_params,
30
- search_api_google_maps_place_reviews_params,
31
- search_api_google_scholar_author_search_params,
32
- search_api_google_flights_location_search_params,
33
- )
34
- from ...types.external.location_response import LocationResponse
35
- from ...types.external.google_search_response import GoogleSearchResponse
36
- from ...types.external.search_api_google_maps_search_response import SearchAPIGoogleMapsSearchResponse
37
- from ...types.external.search_api_google_flights_search_response import SearchAPIGoogleFlightsSearchResponse
38
- from ...types.external.search_api_google_scholar_search_response import SearchAPIGoogleScholarSearchResponse
39
- from ...types.external.search_api_google_flights_calendar_response import SearchAPIGoogleFlightsCalendarResponse
40
- from ...types.external.search_api_google_maps_place_photos_response import SearchAPIGoogleMapsPlacePhotosResponse
41
- from ...types.external.search_api_google_scholar_citations_response import SearchAPIGoogleScholarCitationsResponse
42
- from ...types.external.search_api_google_maps_place_details_response import SearchAPIGoogleMapsPlaceDetailsResponse
43
- from ...types.external.search_api_google_maps_place_reviews_response import SearchAPIGoogleMapsPlaceReviewsResponse
44
- from ...types.external.search_api_google_scholar_author_search_response import (
45
- SearchAPIGoogleScholarAuthorSearchResponse,
46
- )
47
- from ...types.external.search_api_google_flights_location_search_response import (
48
- SearchAPIGoogleFlightsLocationSearchResponse,
49
- )
50
-
51
- __all__ = ["SearchAPIResource", "AsyncSearchAPIResource"]
52
-
53
-
54
- class SearchAPIResource(SyncAPIResource):
55
- @cached_property
56
- def with_raw_response(self) -> SearchAPIResourceWithRawResponse:
57
- """
58
- This property can be used as a prefix for any HTTP method call to return
59
- the raw response object instead of the parsed content.
60
-
61
- For more information, see https://www.github.com/StructifyAI/structify-python#accessing-raw-response-data-eg-headers
62
- """
63
- return SearchAPIResourceWithRawResponse(self)
64
-
65
- @cached_property
66
- def with_streaming_response(self) -> SearchAPIResourceWithStreamingResponse:
67
- """
68
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
69
-
70
- For more information, see https://www.github.com/StructifyAI/structify-python#with_streaming_response
71
- """
72
- return SearchAPIResourceWithStreamingResponse(self)
73
-
74
- def google_flights_calendar(
75
- self,
76
- *,
77
- arrival_id: str,
78
- departure_id: str,
79
- outbound_date: str,
80
- currency: Optional[str] | Omit = omit,
81
- hl: Optional[str] | Omit = omit,
82
- return_date: Optional[str] | Omit = omit,
83
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
84
- # The extra values given here take precedence over values defined on the client or passed to this method.
85
- extra_headers: Headers | None = None,
86
- extra_query: Query | None = None,
87
- extra_body: Body | None = None,
88
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
89
- ) -> SearchAPIGoogleFlightsCalendarResponse:
90
- """
91
- Get flight prices across different dates (calendar view)
92
-
93
- Args:
94
- arrival_id: Arrival airport code
95
-
96
- departure_id: Departure airport code
97
-
98
- outbound_date: Outbound date (YYYY-MM-DD format)
99
-
100
- currency: Currency (optional, e.g. "USD")
101
-
102
- hl: Language (optional, e.g. "en")
103
-
104
- return_date: Return date (YYYY-MM-DD format, optional)
105
-
106
- extra_headers: Send extra headers
107
-
108
- extra_query: Add additional query parameters to the request
109
-
110
- extra_body: Add additional JSON properties to the request
111
-
112
- timeout: Override the client-level default timeout for this request, in seconds
113
- """
114
- return self._post(
115
- "/external/search/flights/calendar",
116
- body=maybe_transform(
117
- {
118
- "arrival_id": arrival_id,
119
- "departure_id": departure_id,
120
- "outbound_date": outbound_date,
121
- "currency": currency,
122
- "hl": hl,
123
- "return_date": return_date,
124
- },
125
- search_api_google_flights_calendar_params.SearchAPIGoogleFlightsCalendarParams,
126
- ),
127
- options=make_request_options(
128
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
129
- ),
130
- cast_to=SearchAPIGoogleFlightsCalendarResponse,
131
- )
132
-
133
- def google_flights_location_search(
134
- self,
135
- *,
136
- q: str,
137
- hl: Optional[str] | Omit = omit,
138
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
139
- # The extra values given here take precedence over values defined on the client or passed to this method.
140
- extra_headers: Headers | None = None,
141
- extra_query: Query | None = None,
142
- extra_body: Body | None = None,
143
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
144
- ) -> SearchAPIGoogleFlightsLocationSearchResponse:
145
- """
146
- Search for airports and locations for flight booking
147
-
148
- Args:
149
- q: Search query for airport/location
150
-
151
- hl: Language (optional, e.g. "en")
152
-
153
- extra_headers: Send extra headers
154
-
155
- extra_query: Add additional query parameters to the request
156
-
157
- extra_body: Add additional JSON properties to the request
158
-
159
- timeout: Override the client-level default timeout for this request, in seconds
160
- """
161
- return self._post(
162
- "/external/search/flights/location_search",
163
- body=maybe_transform(
164
- {
165
- "q": q,
166
- "hl": hl,
167
- },
168
- search_api_google_flights_location_search_params.SearchAPIGoogleFlightsLocationSearchParams,
169
- ),
170
- options=make_request_options(
171
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
172
- ),
173
- cast_to=SearchAPIGoogleFlightsLocationSearchResponse,
174
- )
175
-
176
- def google_flights_search(
177
- self,
178
- *,
179
- arrival_id: str,
180
- departure_id: str,
181
- outbound_date: str,
182
- adults: Optional[int] | Omit = omit,
183
- children: Optional[int] | Omit = omit,
184
- currency: Optional[str] | Omit = omit,
185
- hl: Optional[str] | Omit = omit,
186
- infants_in_seat: Optional[int] | Omit = omit,
187
- infants_on_lap: Optional[int] | Omit = omit,
188
- return_date: Optional[str] | Omit = omit,
189
- travel_class: Optional[str] | Omit = omit,
190
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
191
- # The extra values given here take precedence over values defined on the client or passed to this method.
192
- extra_headers: Headers | None = None,
193
- extra_query: Query | None = None,
194
- extra_body: Body | None = None,
195
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
196
- ) -> SearchAPIGoogleFlightsSearchResponse:
197
- """
198
- Search for flight options between airports
199
-
200
- Args:
201
- arrival_id: Arrival airport code (e.g., "JFK", "LAX")
202
-
203
- departure_id: Departure airport code (e.g., "JFK", "LAX")
204
-
205
- outbound_date: Outbound date (YYYY-MM-DD format)
206
-
207
- adults: Number of adults (optional, default 1)
208
-
209
- children: Number of children (optional, default 0)
210
-
211
- currency: Currency (optional, e.g. "USD")
212
-
213
- hl: Language (optional, e.g. "en")
214
-
215
- infants_in_seat: Number of infants on lap (optional, default 0)
216
-
217
- infants_on_lap: Number of infants in seat (optional, default 0)
218
-
219
- return_date: Return date (YYYY-MM-DD format, optional for one-way)
220
-
221
- travel_class: Travel class (optional: "economy", "premium_economy", "business", "first")
222
-
223
- extra_headers: Send extra headers
224
-
225
- extra_query: Add additional query parameters to the request
226
-
227
- extra_body: Add additional JSON properties to the request
228
-
229
- timeout: Override the client-level default timeout for this request, in seconds
230
- """
231
- return self._post(
232
- "/external/search/flights/search",
233
- body=maybe_transform(
234
- {
235
- "arrival_id": arrival_id,
236
- "departure_id": departure_id,
237
- "outbound_date": outbound_date,
238
- "adults": adults,
239
- "children": children,
240
- "currency": currency,
241
- "hl": hl,
242
- "infants_in_seat": infants_in_seat,
243
- "infants_on_lap": infants_on_lap,
244
- "return_date": return_date,
245
- "travel_class": travel_class,
246
- },
247
- search_api_google_flights_search_params.SearchAPIGoogleFlightsSearchParams,
248
- ),
249
- options=make_request_options(
250
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
251
- ),
252
- cast_to=SearchAPIGoogleFlightsSearchResponse,
253
- )
254
-
255
- def google_maps_place_details(
256
- self,
257
- *,
258
- place_id: str,
259
- hl: Optional[str] | Omit = omit,
260
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
261
- # The extra values given here take precedence over values defined on the client or passed to this method.
262
- extra_headers: Headers | None = None,
263
- extra_query: Query | None = None,
264
- extra_body: Body | None = None,
265
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
266
- ) -> SearchAPIGoogleMapsPlaceDetailsResponse:
267
- """
268
- Get detailed information about a specific place
269
-
270
- Args:
271
- place_id: Place ID from Google Maps
272
-
273
- hl: Language (optional, e.g. "en", "es")
274
-
275
- extra_headers: Send extra headers
276
-
277
- extra_query: Add additional query parameters to the request
278
-
279
- extra_body: Add additional JSON properties to the request
280
-
281
- timeout: Override the client-level default timeout for this request, in seconds
282
- """
283
- return self._post(
284
- "/external/search/maps/place",
285
- body=maybe_transform(
286
- {
287
- "place_id": place_id,
288
- "hl": hl,
289
- },
290
- search_api_google_maps_place_details_params.SearchAPIGoogleMapsPlaceDetailsParams,
291
- ),
292
- options=make_request_options(
293
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
294
- ),
295
- cast_to=SearchAPIGoogleMapsPlaceDetailsResponse,
296
- )
297
-
298
- def google_maps_place_photos(
299
- self,
300
- *,
301
- place_id: str,
302
- num: Optional[int] | Omit = omit,
303
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
304
- # The extra values given here take precedence over values defined on the client or passed to this method.
305
- extra_headers: Headers | None = None,
306
- extra_query: Query | None = None,
307
- extra_body: Body | None = None,
308
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
309
- ) -> SearchAPIGoogleMapsPlacePhotosResponse:
310
- """
311
- Get photos for a specific place
312
-
313
- Args:
314
- place_id: Place ID from Google Maps
315
-
316
- num: Number of photos to return (optional)
317
-
318
- extra_headers: Send extra headers
319
-
320
- extra_query: Add additional query parameters to the request
321
-
322
- extra_body: Add additional JSON properties to the request
323
-
324
- timeout: Override the client-level default timeout for this request, in seconds
325
- """
326
- return self._post(
327
- "/external/search/maps/photos",
328
- body=maybe_transform(
329
- {
330
- "place_id": place_id,
331
- "num": num,
332
- },
333
- search_api_google_maps_place_photos_params.SearchAPIGoogleMapsPlacePhotosParams,
334
- ),
335
- options=make_request_options(
336
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
337
- ),
338
- cast_to=SearchAPIGoogleMapsPlacePhotosResponse,
339
- )
340
-
341
- def google_maps_place_reviews(
342
- self,
343
- *,
344
- place_id: str,
345
- hl: Optional[str] | Omit = omit,
346
- num: Optional[int] | Omit = omit,
347
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
348
- # The extra values given here take precedence over values defined on the client or passed to this method.
349
- extra_headers: Headers | None = None,
350
- extra_query: Query | None = None,
351
- extra_body: Body | None = None,
352
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
353
- ) -> SearchAPIGoogleMapsPlaceReviewsResponse:
354
- """
355
- Get reviews for a specific place
356
-
357
- Args:
358
- place_id: Place ID from Google Maps
359
-
360
- hl: Language (optional, e.g. "en", "es")
361
-
362
- num: Number of reviews to return (optional)
363
-
364
- extra_headers: Send extra headers
365
-
366
- extra_query: Add additional query parameters to the request
367
-
368
- extra_body: Add additional JSON properties to the request
369
-
370
- timeout: Override the client-level default timeout for this request, in seconds
371
- """
372
- return self._post(
373
- "/external/search/maps/reviews",
374
- body=maybe_transform(
375
- {
376
- "place_id": place_id,
377
- "hl": hl,
378
- "num": num,
379
- },
380
- search_api_google_maps_place_reviews_params.SearchAPIGoogleMapsPlaceReviewsParams,
381
- ),
382
- options=make_request_options(
383
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
384
- ),
385
- cast_to=SearchAPIGoogleMapsPlaceReviewsResponse,
386
- )
387
-
388
- def google_maps_search(
389
- self,
390
- *,
391
- q: str,
392
- gl: Optional[str] | Omit = omit,
393
- hl: Optional[str] | Omit = omit,
394
- num: Optional[int] | Omit = omit,
395
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
396
- # The extra values given here take precedence over values defined on the client or passed to this method.
397
- extra_headers: Headers | None = None,
398
- extra_query: Query | None = None,
399
- extra_body: Body | None = None,
400
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
401
- ) -> SearchAPIGoogleMapsSearchResponse:
402
- """
403
- Search for places on Google Maps
404
-
405
- Args:
406
- q: The search query (e.g., "restaurants near me")
407
-
408
- gl: Geographic location (optional, e.g. "us", "uk")
409
-
410
- hl: Language (optional, e.g. "en", "es")
411
-
412
- num: Number of results to return (optional)
413
-
414
- extra_headers: Send extra headers
415
-
416
- extra_query: Add additional query parameters to the request
417
-
418
- extra_body: Add additional JSON properties to the request
419
-
420
- timeout: Override the client-level default timeout for this request, in seconds
421
- """
422
- return self._post(
423
- "/external/search/maps/search",
424
- body=maybe_transform(
425
- {
426
- "q": q,
427
- "gl": gl,
428
- "hl": hl,
429
- "num": num,
430
- },
431
- search_api_google_maps_search_params.SearchAPIGoogleMapsSearchParams,
432
- ),
433
- options=make_request_options(
434
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
435
- ),
436
- cast_to=SearchAPIGoogleMapsSearchResponse,
437
- )
438
-
439
- def google_scholar_author_search(
440
- self,
441
- *,
442
- author: str,
443
- hl: Optional[str] | Omit = omit,
444
- num: Optional[int] | Omit = omit,
445
- start: Optional[int] | Omit = omit,
446
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
447
- # The extra values given here take precedence over values defined on the client or passed to this method.
448
- extra_headers: Headers | None = None,
449
- extra_query: Query | None = None,
450
- extra_body: Body | None = None,
451
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
452
- ) -> SearchAPIGoogleScholarAuthorSearchResponse:
453
- """
454
- Search for academic authors and their publications
455
-
456
- Args:
457
- author: Author name to search for
458
-
459
- hl: Language (optional, e.g. "en")
460
-
461
- num: Number of results to return (optional)
462
-
463
- start: Starting result index (optional)
464
-
465
- extra_headers: Send extra headers
466
-
467
- extra_query: Add additional query parameters to the request
468
-
469
- extra_body: Add additional JSON properties to the request
470
-
471
- timeout: Override the client-level default timeout for this request, in seconds
472
- """
473
- return self._post(
474
- "/external/search/scholar/author",
475
- body=maybe_transform(
476
- {
477
- "author": author,
478
- "hl": hl,
479
- "num": num,
480
- "start": start,
481
- },
482
- search_api_google_scholar_author_search_params.SearchAPIGoogleScholarAuthorSearchParams,
483
- ),
484
- options=make_request_options(
485
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
486
- ),
487
- cast_to=SearchAPIGoogleScholarAuthorSearchResponse,
488
- )
489
-
490
- def google_scholar_citations(
491
- self,
492
- *,
493
- q: str,
494
- hl: Optional[str] | Omit = omit,
495
- num: Optional[int] | Omit = omit,
496
- start: Optional[int] | Omit = omit,
497
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
498
- # The extra values given here take precedence over values defined on the client or passed to this method.
499
- extra_headers: Headers | None = None,
500
- extra_query: Query | None = None,
501
- extra_body: Body | None = None,
502
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
503
- ) -> SearchAPIGoogleScholarCitationsResponse:
504
- """
505
- Get citations for a specific academic publication
506
-
507
- Args:
508
- q: The publication ID to get citations for
509
-
510
- hl: Language (optional, e.g. "en")
511
-
512
- num: Number of citations to return (optional)
513
-
514
- start: Starting result index (optional)
515
-
516
- extra_headers: Send extra headers
517
-
518
- extra_query: Add additional query parameters to the request
519
-
520
- extra_body: Add additional JSON properties to the request
521
-
522
- timeout: Override the client-level default timeout for this request, in seconds
523
- """
524
- return self._post(
525
- "/external/search/scholar/cite",
526
- body=maybe_transform(
527
- {
528
- "q": q,
529
- "hl": hl,
530
- "num": num,
531
- "start": start,
532
- },
533
- search_api_google_scholar_citations_params.SearchAPIGoogleScholarCitationsParams,
534
- ),
535
- options=make_request_options(
536
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
537
- ),
538
- cast_to=SearchAPIGoogleScholarCitationsResponse,
539
- )
540
-
541
- def google_scholar_search(
542
- self,
543
- *,
544
- q: str,
545
- as_yhi: Optional[int] | Omit = omit,
546
- as_ylo: Optional[int] | Omit = omit,
547
- hl: Optional[str] | Omit = omit,
548
- num: Optional[int] | Omit = omit,
549
- start: Optional[int] | Omit = omit,
550
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
551
- # The extra values given here take precedence over values defined on the client or passed to this method.
552
- extra_headers: Headers | None = None,
553
- extra_query: Query | None = None,
554
- extra_body: Body | None = None,
555
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
556
- ) -> SearchAPIGoogleScholarSearchResponse:
557
- """
558
- Search academic papers and publications on Google Scholar
559
-
560
- Args:
561
- q: The search query
562
-
563
- as_yhi: Year range end (optional, e.g. 2023)
564
-
565
- as_ylo: Year range start (optional, e.g. 2020)
566
-
567
- hl: Language (optional, e.g. "en")
568
-
569
- num: Number of results to return (optional)
570
-
571
- start: Starting result index (optional)
572
-
573
- extra_headers: Send extra headers
574
-
575
- extra_query: Add additional query parameters to the request
576
-
577
- extra_body: Add additional JSON properties to the request
578
-
579
- timeout: Override the client-level default timeout for this request, in seconds
580
- """
581
- return self._post(
582
- "/external/search/scholar/search",
583
- body=maybe_transform(
584
- {
585
- "q": q,
586
- "as_yhi": as_yhi,
587
- "as_ylo": as_ylo,
588
- "hl": hl,
589
- "num": num,
590
- "start": start,
591
- },
592
- search_api_google_scholar_search_params.SearchAPIGoogleScholarSearchParams,
593
- ),
594
- options=make_request_options(
595
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
596
- ),
597
- cast_to=SearchAPIGoogleScholarSearchResponse,
598
- )
599
-
600
- def google_search(
601
- self,
602
- *,
603
- q: str,
604
- gl: Optional[str] | Omit = omit,
605
- hl: Optional[str] | Omit = omit,
606
- num: Optional[int] | Omit = omit,
607
- start: Optional[int] | Omit = omit,
608
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
609
- # The extra values given here take precedence over values defined on the client or passed to this method.
610
- extra_headers: Headers | None = None,
611
- extra_query: Query | None = None,
612
- extra_body: Body | None = None,
613
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
614
- ) -> GoogleSearchResponse:
615
- """
616
- Performs a Google web search using the SearchAPI service
617
-
618
- Args:
619
- q: The search query
620
-
621
- gl: Geographic location (optional, e.g. "us", "uk")
622
-
623
- hl: Language (optional, e.g. "en", "es")
624
-
625
- num: Number of results to return (optional, max 100)
626
-
627
- start: Starting result index (optional)
628
-
629
- extra_headers: Send extra headers
630
-
631
- extra_query: Add additional query parameters to the request
632
-
633
- extra_body: Add additional JSON properties to the request
634
-
635
- timeout: Override the client-level default timeout for this request, in seconds
636
- """
637
- return self._post(
638
- "/external/search/search",
639
- body=maybe_transform(
640
- {
641
- "q": q,
642
- "gl": gl,
643
- "hl": hl,
644
- "num": num,
645
- "start": start,
646
- },
647
- search_api_google_search_params.SearchAPIGoogleSearchParams,
648
- ),
649
- options=make_request_options(
650
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
651
- ),
652
- cast_to=GoogleSearchResponse,
653
- )
654
-
655
- def location_search(
656
- self,
657
- *,
658
- q: str,
659
- gl: Optional[str] | Omit = omit,
660
- hl: Optional[str] | Omit = omit,
661
- num: Optional[int] | Omit = omit,
662
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
663
- # The extra values given here take precedence over values defined on the client or passed to this method.
664
- extra_headers: Headers | None = None,
665
- extra_query: Query | None = None,
666
- extra_body: Body | None = None,
667
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
668
- ) -> LocationResponse:
669
- """
670
- Search for geographic locations, addresses, and places
671
-
672
- Args:
673
- q: The location query to search for
674
-
675
- gl: Geographic location bias (optional, e.g. "us", "uk")
676
-
677
- hl: Language (optional, e.g. "en")
678
-
679
- num: Number of results to return (optional)
680
-
681
- extra_headers: Send extra headers
682
-
683
- extra_query: Add additional query parameters to the request
684
-
685
- extra_body: Add additional JSON properties to the request
686
-
687
- timeout: Override the client-level default timeout for this request, in seconds
688
- """
689
- return self._post(
690
- "/external/search/locations",
691
- body=maybe_transform(
692
- {
693
- "q": q,
694
- "gl": gl,
695
- "hl": hl,
696
- "num": num,
697
- },
698
- search_api_location_search_params.SearchAPILocationSearchParams,
699
- ),
700
- options=make_request_options(
701
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
702
- ),
703
- cast_to=LocationResponse,
704
- )
705
-
706
-
707
- class AsyncSearchAPIResource(AsyncAPIResource):
708
- @cached_property
709
- def with_raw_response(self) -> AsyncSearchAPIResourceWithRawResponse:
710
- """
711
- This property can be used as a prefix for any HTTP method call to return
712
- the raw response object instead of the parsed content.
713
-
714
- For more information, see https://www.github.com/StructifyAI/structify-python#accessing-raw-response-data-eg-headers
715
- """
716
- return AsyncSearchAPIResourceWithRawResponse(self)
717
-
718
- @cached_property
719
- def with_streaming_response(self) -> AsyncSearchAPIResourceWithStreamingResponse:
720
- """
721
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
722
-
723
- For more information, see https://www.github.com/StructifyAI/structify-python#with_streaming_response
724
- """
725
- return AsyncSearchAPIResourceWithStreamingResponse(self)
726
-
727
- async def google_flights_calendar(
728
- self,
729
- *,
730
- arrival_id: str,
731
- departure_id: str,
732
- outbound_date: str,
733
- currency: Optional[str] | Omit = omit,
734
- hl: Optional[str] | Omit = omit,
735
- return_date: Optional[str] | Omit = omit,
736
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
737
- # The extra values given here take precedence over values defined on the client or passed to this method.
738
- extra_headers: Headers | None = None,
739
- extra_query: Query | None = None,
740
- extra_body: Body | None = None,
741
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
742
- ) -> SearchAPIGoogleFlightsCalendarResponse:
743
- """
744
- Get flight prices across different dates (calendar view)
745
-
746
- Args:
747
- arrival_id: Arrival airport code
748
-
749
- departure_id: Departure airport code
750
-
751
- outbound_date: Outbound date (YYYY-MM-DD format)
752
-
753
- currency: Currency (optional, e.g. "USD")
754
-
755
- hl: Language (optional, e.g. "en")
756
-
757
- return_date: Return date (YYYY-MM-DD format, optional)
758
-
759
- extra_headers: Send extra headers
760
-
761
- extra_query: Add additional query parameters to the request
762
-
763
- extra_body: Add additional JSON properties to the request
764
-
765
- timeout: Override the client-level default timeout for this request, in seconds
766
- """
767
- return await self._post(
768
- "/external/search/flights/calendar",
769
- body=await async_maybe_transform(
770
- {
771
- "arrival_id": arrival_id,
772
- "departure_id": departure_id,
773
- "outbound_date": outbound_date,
774
- "currency": currency,
775
- "hl": hl,
776
- "return_date": return_date,
777
- },
778
- search_api_google_flights_calendar_params.SearchAPIGoogleFlightsCalendarParams,
779
- ),
780
- options=make_request_options(
781
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
782
- ),
783
- cast_to=SearchAPIGoogleFlightsCalendarResponse,
784
- )
785
-
786
- async def google_flights_location_search(
787
- self,
788
- *,
789
- q: str,
790
- hl: Optional[str] | Omit = omit,
791
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
792
- # The extra values given here take precedence over values defined on the client or passed to this method.
793
- extra_headers: Headers | None = None,
794
- extra_query: Query | None = None,
795
- extra_body: Body | None = None,
796
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
797
- ) -> SearchAPIGoogleFlightsLocationSearchResponse:
798
- """
799
- Search for airports and locations for flight booking
800
-
801
- Args:
802
- q: Search query for airport/location
803
-
804
- hl: Language (optional, e.g. "en")
805
-
806
- extra_headers: Send extra headers
807
-
808
- extra_query: Add additional query parameters to the request
809
-
810
- extra_body: Add additional JSON properties to the request
811
-
812
- timeout: Override the client-level default timeout for this request, in seconds
813
- """
814
- return await self._post(
815
- "/external/search/flights/location_search",
816
- body=await async_maybe_transform(
817
- {
818
- "q": q,
819
- "hl": hl,
820
- },
821
- search_api_google_flights_location_search_params.SearchAPIGoogleFlightsLocationSearchParams,
822
- ),
823
- options=make_request_options(
824
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
825
- ),
826
- cast_to=SearchAPIGoogleFlightsLocationSearchResponse,
827
- )
828
-
829
- async def google_flights_search(
830
- self,
831
- *,
832
- arrival_id: str,
833
- departure_id: str,
834
- outbound_date: str,
835
- adults: Optional[int] | Omit = omit,
836
- children: Optional[int] | Omit = omit,
837
- currency: Optional[str] | Omit = omit,
838
- hl: Optional[str] | Omit = omit,
839
- infants_in_seat: Optional[int] | Omit = omit,
840
- infants_on_lap: Optional[int] | Omit = omit,
841
- return_date: Optional[str] | Omit = omit,
842
- travel_class: Optional[str] | Omit = omit,
843
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
844
- # The extra values given here take precedence over values defined on the client or passed to this method.
845
- extra_headers: Headers | None = None,
846
- extra_query: Query | None = None,
847
- extra_body: Body | None = None,
848
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
849
- ) -> SearchAPIGoogleFlightsSearchResponse:
850
- """
851
- Search for flight options between airports
852
-
853
- Args:
854
- arrival_id: Arrival airport code (e.g., "JFK", "LAX")
855
-
856
- departure_id: Departure airport code (e.g., "JFK", "LAX")
857
-
858
- outbound_date: Outbound date (YYYY-MM-DD format)
859
-
860
- adults: Number of adults (optional, default 1)
861
-
862
- children: Number of children (optional, default 0)
863
-
864
- currency: Currency (optional, e.g. "USD")
865
-
866
- hl: Language (optional, e.g. "en")
867
-
868
- infants_in_seat: Number of infants on lap (optional, default 0)
869
-
870
- infants_on_lap: Number of infants in seat (optional, default 0)
871
-
872
- return_date: Return date (YYYY-MM-DD format, optional for one-way)
873
-
874
- travel_class: Travel class (optional: "economy", "premium_economy", "business", "first")
875
-
876
- extra_headers: Send extra headers
877
-
878
- extra_query: Add additional query parameters to the request
879
-
880
- extra_body: Add additional JSON properties to the request
881
-
882
- timeout: Override the client-level default timeout for this request, in seconds
883
- """
884
- return await self._post(
885
- "/external/search/flights/search",
886
- body=await async_maybe_transform(
887
- {
888
- "arrival_id": arrival_id,
889
- "departure_id": departure_id,
890
- "outbound_date": outbound_date,
891
- "adults": adults,
892
- "children": children,
893
- "currency": currency,
894
- "hl": hl,
895
- "infants_in_seat": infants_in_seat,
896
- "infants_on_lap": infants_on_lap,
897
- "return_date": return_date,
898
- "travel_class": travel_class,
899
- },
900
- search_api_google_flights_search_params.SearchAPIGoogleFlightsSearchParams,
901
- ),
902
- options=make_request_options(
903
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
904
- ),
905
- cast_to=SearchAPIGoogleFlightsSearchResponse,
906
- )
907
-
908
- async def google_maps_place_details(
909
- self,
910
- *,
911
- place_id: str,
912
- hl: Optional[str] | Omit = omit,
913
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
914
- # The extra values given here take precedence over values defined on the client or passed to this method.
915
- extra_headers: Headers | None = None,
916
- extra_query: Query | None = None,
917
- extra_body: Body | None = None,
918
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
919
- ) -> SearchAPIGoogleMapsPlaceDetailsResponse:
920
- """
921
- Get detailed information about a specific place
922
-
923
- Args:
924
- place_id: Place ID from Google Maps
925
-
926
- hl: Language (optional, e.g. "en", "es")
927
-
928
- extra_headers: Send extra headers
929
-
930
- extra_query: Add additional query parameters to the request
931
-
932
- extra_body: Add additional JSON properties to the request
933
-
934
- timeout: Override the client-level default timeout for this request, in seconds
935
- """
936
- return await self._post(
937
- "/external/search/maps/place",
938
- body=await async_maybe_transform(
939
- {
940
- "place_id": place_id,
941
- "hl": hl,
942
- },
943
- search_api_google_maps_place_details_params.SearchAPIGoogleMapsPlaceDetailsParams,
944
- ),
945
- options=make_request_options(
946
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
947
- ),
948
- cast_to=SearchAPIGoogleMapsPlaceDetailsResponse,
949
- )
950
-
951
- async def google_maps_place_photos(
952
- self,
953
- *,
954
- place_id: str,
955
- num: Optional[int] | Omit = omit,
956
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
957
- # The extra values given here take precedence over values defined on the client or passed to this method.
958
- extra_headers: Headers | None = None,
959
- extra_query: Query | None = None,
960
- extra_body: Body | None = None,
961
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
962
- ) -> SearchAPIGoogleMapsPlacePhotosResponse:
963
- """
964
- Get photos for a specific place
965
-
966
- Args:
967
- place_id: Place ID from Google Maps
968
-
969
- num: Number of photos to return (optional)
970
-
971
- extra_headers: Send extra headers
972
-
973
- extra_query: Add additional query parameters to the request
974
-
975
- extra_body: Add additional JSON properties to the request
976
-
977
- timeout: Override the client-level default timeout for this request, in seconds
978
- """
979
- return await self._post(
980
- "/external/search/maps/photos",
981
- body=await async_maybe_transform(
982
- {
983
- "place_id": place_id,
984
- "num": num,
985
- },
986
- search_api_google_maps_place_photos_params.SearchAPIGoogleMapsPlacePhotosParams,
987
- ),
988
- options=make_request_options(
989
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
990
- ),
991
- cast_to=SearchAPIGoogleMapsPlacePhotosResponse,
992
- )
993
-
994
- async def google_maps_place_reviews(
995
- self,
996
- *,
997
- place_id: str,
998
- hl: Optional[str] | Omit = omit,
999
- num: Optional[int] | Omit = omit,
1000
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1001
- # The extra values given here take precedence over values defined on the client or passed to this method.
1002
- extra_headers: Headers | None = None,
1003
- extra_query: Query | None = None,
1004
- extra_body: Body | None = None,
1005
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
1006
- ) -> SearchAPIGoogleMapsPlaceReviewsResponse:
1007
- """
1008
- Get reviews for a specific place
1009
-
1010
- Args:
1011
- place_id: Place ID from Google Maps
1012
-
1013
- hl: Language (optional, e.g. "en", "es")
1014
-
1015
- num: Number of reviews to return (optional)
1016
-
1017
- extra_headers: Send extra headers
1018
-
1019
- extra_query: Add additional query parameters to the request
1020
-
1021
- extra_body: Add additional JSON properties to the request
1022
-
1023
- timeout: Override the client-level default timeout for this request, in seconds
1024
- """
1025
- return await self._post(
1026
- "/external/search/maps/reviews",
1027
- body=await async_maybe_transform(
1028
- {
1029
- "place_id": place_id,
1030
- "hl": hl,
1031
- "num": num,
1032
- },
1033
- search_api_google_maps_place_reviews_params.SearchAPIGoogleMapsPlaceReviewsParams,
1034
- ),
1035
- options=make_request_options(
1036
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1037
- ),
1038
- cast_to=SearchAPIGoogleMapsPlaceReviewsResponse,
1039
- )
1040
-
1041
- async def google_maps_search(
1042
- self,
1043
- *,
1044
- q: str,
1045
- gl: Optional[str] | Omit = omit,
1046
- hl: Optional[str] | Omit = omit,
1047
- num: Optional[int] | Omit = omit,
1048
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1049
- # The extra values given here take precedence over values defined on the client or passed to this method.
1050
- extra_headers: Headers | None = None,
1051
- extra_query: Query | None = None,
1052
- extra_body: Body | None = None,
1053
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
1054
- ) -> SearchAPIGoogleMapsSearchResponse:
1055
- """
1056
- Search for places on Google Maps
1057
-
1058
- Args:
1059
- q: The search query (e.g., "restaurants near me")
1060
-
1061
- gl: Geographic location (optional, e.g. "us", "uk")
1062
-
1063
- hl: Language (optional, e.g. "en", "es")
1064
-
1065
- num: Number of results to return (optional)
1066
-
1067
- extra_headers: Send extra headers
1068
-
1069
- extra_query: Add additional query parameters to the request
1070
-
1071
- extra_body: Add additional JSON properties to the request
1072
-
1073
- timeout: Override the client-level default timeout for this request, in seconds
1074
- """
1075
- return await self._post(
1076
- "/external/search/maps/search",
1077
- body=await async_maybe_transform(
1078
- {
1079
- "q": q,
1080
- "gl": gl,
1081
- "hl": hl,
1082
- "num": num,
1083
- },
1084
- search_api_google_maps_search_params.SearchAPIGoogleMapsSearchParams,
1085
- ),
1086
- options=make_request_options(
1087
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1088
- ),
1089
- cast_to=SearchAPIGoogleMapsSearchResponse,
1090
- )
1091
-
1092
- async def google_scholar_author_search(
1093
- self,
1094
- *,
1095
- author: str,
1096
- hl: Optional[str] | Omit = omit,
1097
- num: Optional[int] | Omit = omit,
1098
- start: Optional[int] | Omit = omit,
1099
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1100
- # The extra values given here take precedence over values defined on the client or passed to this method.
1101
- extra_headers: Headers | None = None,
1102
- extra_query: Query | None = None,
1103
- extra_body: Body | None = None,
1104
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
1105
- ) -> SearchAPIGoogleScholarAuthorSearchResponse:
1106
- """
1107
- Search for academic authors and their publications
1108
-
1109
- Args:
1110
- author: Author name to search for
1111
-
1112
- hl: Language (optional, e.g. "en")
1113
-
1114
- num: Number of results to return (optional)
1115
-
1116
- start: Starting result index (optional)
1117
-
1118
- extra_headers: Send extra headers
1119
-
1120
- extra_query: Add additional query parameters to the request
1121
-
1122
- extra_body: Add additional JSON properties to the request
1123
-
1124
- timeout: Override the client-level default timeout for this request, in seconds
1125
- """
1126
- return await self._post(
1127
- "/external/search/scholar/author",
1128
- body=await async_maybe_transform(
1129
- {
1130
- "author": author,
1131
- "hl": hl,
1132
- "num": num,
1133
- "start": start,
1134
- },
1135
- search_api_google_scholar_author_search_params.SearchAPIGoogleScholarAuthorSearchParams,
1136
- ),
1137
- options=make_request_options(
1138
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1139
- ),
1140
- cast_to=SearchAPIGoogleScholarAuthorSearchResponse,
1141
- )
1142
-
1143
- async def google_scholar_citations(
1144
- self,
1145
- *,
1146
- q: str,
1147
- hl: Optional[str] | Omit = omit,
1148
- num: Optional[int] | Omit = omit,
1149
- start: Optional[int] | Omit = omit,
1150
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1151
- # The extra values given here take precedence over values defined on the client or passed to this method.
1152
- extra_headers: Headers | None = None,
1153
- extra_query: Query | None = None,
1154
- extra_body: Body | None = None,
1155
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
1156
- ) -> SearchAPIGoogleScholarCitationsResponse:
1157
- """
1158
- Get citations for a specific academic publication
1159
-
1160
- Args:
1161
- q: The publication ID to get citations for
1162
-
1163
- hl: Language (optional, e.g. "en")
1164
-
1165
- num: Number of citations to return (optional)
1166
-
1167
- start: Starting result index (optional)
1168
-
1169
- extra_headers: Send extra headers
1170
-
1171
- extra_query: Add additional query parameters to the request
1172
-
1173
- extra_body: Add additional JSON properties to the request
1174
-
1175
- timeout: Override the client-level default timeout for this request, in seconds
1176
- """
1177
- return await self._post(
1178
- "/external/search/scholar/cite",
1179
- body=await async_maybe_transform(
1180
- {
1181
- "q": q,
1182
- "hl": hl,
1183
- "num": num,
1184
- "start": start,
1185
- },
1186
- search_api_google_scholar_citations_params.SearchAPIGoogleScholarCitationsParams,
1187
- ),
1188
- options=make_request_options(
1189
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1190
- ),
1191
- cast_to=SearchAPIGoogleScholarCitationsResponse,
1192
- )
1193
-
1194
- async def google_scholar_search(
1195
- self,
1196
- *,
1197
- q: str,
1198
- as_yhi: Optional[int] | Omit = omit,
1199
- as_ylo: Optional[int] | Omit = omit,
1200
- hl: Optional[str] | Omit = omit,
1201
- num: Optional[int] | Omit = omit,
1202
- start: Optional[int] | Omit = omit,
1203
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1204
- # The extra values given here take precedence over values defined on the client or passed to this method.
1205
- extra_headers: Headers | None = None,
1206
- extra_query: Query | None = None,
1207
- extra_body: Body | None = None,
1208
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
1209
- ) -> SearchAPIGoogleScholarSearchResponse:
1210
- """
1211
- Search academic papers and publications on Google Scholar
1212
-
1213
- Args:
1214
- q: The search query
1215
-
1216
- as_yhi: Year range end (optional, e.g. 2023)
1217
-
1218
- as_ylo: Year range start (optional, e.g. 2020)
1219
-
1220
- hl: Language (optional, e.g. "en")
1221
-
1222
- num: Number of results to return (optional)
1223
-
1224
- start: Starting result index (optional)
1225
-
1226
- extra_headers: Send extra headers
1227
-
1228
- extra_query: Add additional query parameters to the request
1229
-
1230
- extra_body: Add additional JSON properties to the request
1231
-
1232
- timeout: Override the client-level default timeout for this request, in seconds
1233
- """
1234
- return await self._post(
1235
- "/external/search/scholar/search",
1236
- body=await async_maybe_transform(
1237
- {
1238
- "q": q,
1239
- "as_yhi": as_yhi,
1240
- "as_ylo": as_ylo,
1241
- "hl": hl,
1242
- "num": num,
1243
- "start": start,
1244
- },
1245
- search_api_google_scholar_search_params.SearchAPIGoogleScholarSearchParams,
1246
- ),
1247
- options=make_request_options(
1248
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1249
- ),
1250
- cast_to=SearchAPIGoogleScholarSearchResponse,
1251
- )
1252
-
1253
- async def google_search(
1254
- self,
1255
- *,
1256
- q: str,
1257
- gl: Optional[str] | Omit = omit,
1258
- hl: Optional[str] | Omit = omit,
1259
- num: Optional[int] | Omit = omit,
1260
- start: Optional[int] | Omit = omit,
1261
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1262
- # The extra values given here take precedence over values defined on the client or passed to this method.
1263
- extra_headers: Headers | None = None,
1264
- extra_query: Query | None = None,
1265
- extra_body: Body | None = None,
1266
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
1267
- ) -> GoogleSearchResponse:
1268
- """
1269
- Performs a Google web search using the SearchAPI service
1270
-
1271
- Args:
1272
- q: The search query
1273
-
1274
- gl: Geographic location (optional, e.g. "us", "uk")
1275
-
1276
- hl: Language (optional, e.g. "en", "es")
1277
-
1278
- num: Number of results to return (optional, max 100)
1279
-
1280
- start: Starting result index (optional)
1281
-
1282
- extra_headers: Send extra headers
1283
-
1284
- extra_query: Add additional query parameters to the request
1285
-
1286
- extra_body: Add additional JSON properties to the request
1287
-
1288
- timeout: Override the client-level default timeout for this request, in seconds
1289
- """
1290
- return await self._post(
1291
- "/external/search/search",
1292
- body=await async_maybe_transform(
1293
- {
1294
- "q": q,
1295
- "gl": gl,
1296
- "hl": hl,
1297
- "num": num,
1298
- "start": start,
1299
- },
1300
- search_api_google_search_params.SearchAPIGoogleSearchParams,
1301
- ),
1302
- options=make_request_options(
1303
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1304
- ),
1305
- cast_to=GoogleSearchResponse,
1306
- )
1307
-
1308
- async def location_search(
1309
- self,
1310
- *,
1311
- q: str,
1312
- gl: Optional[str] | Omit = omit,
1313
- hl: Optional[str] | Omit = omit,
1314
- num: Optional[int] | Omit = omit,
1315
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1316
- # The extra values given here take precedence over values defined on the client or passed to this method.
1317
- extra_headers: Headers | None = None,
1318
- extra_query: Query | None = None,
1319
- extra_body: Body | None = None,
1320
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
1321
- ) -> LocationResponse:
1322
- """
1323
- Search for geographic locations, addresses, and places
1324
-
1325
- Args:
1326
- q: The location query to search for
1327
-
1328
- gl: Geographic location bias (optional, e.g. "us", "uk")
1329
-
1330
- hl: Language (optional, e.g. "en")
1331
-
1332
- num: Number of results to return (optional)
1333
-
1334
- extra_headers: Send extra headers
1335
-
1336
- extra_query: Add additional query parameters to the request
1337
-
1338
- extra_body: Add additional JSON properties to the request
1339
-
1340
- timeout: Override the client-level default timeout for this request, in seconds
1341
- """
1342
- return await self._post(
1343
- "/external/search/locations",
1344
- body=await async_maybe_transform(
1345
- {
1346
- "q": q,
1347
- "gl": gl,
1348
- "hl": hl,
1349
- "num": num,
1350
- },
1351
- search_api_location_search_params.SearchAPILocationSearchParams,
1352
- ),
1353
- options=make_request_options(
1354
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1355
- ),
1356
- cast_to=LocationResponse,
1357
- )
1358
-
1359
-
1360
- class SearchAPIResourceWithRawResponse:
1361
- def __init__(self, search_api: SearchAPIResource) -> None:
1362
- self._search_api = search_api
1363
-
1364
- self.google_flights_calendar = to_raw_response_wrapper(
1365
- search_api.google_flights_calendar,
1366
- )
1367
- self.google_flights_location_search = to_raw_response_wrapper(
1368
- search_api.google_flights_location_search,
1369
- )
1370
- self.google_flights_search = to_raw_response_wrapper(
1371
- search_api.google_flights_search,
1372
- )
1373
- self.google_maps_place_details = to_raw_response_wrapper(
1374
- search_api.google_maps_place_details,
1375
- )
1376
- self.google_maps_place_photos = to_raw_response_wrapper(
1377
- search_api.google_maps_place_photos,
1378
- )
1379
- self.google_maps_place_reviews = to_raw_response_wrapper(
1380
- search_api.google_maps_place_reviews,
1381
- )
1382
- self.google_maps_search = to_raw_response_wrapper(
1383
- search_api.google_maps_search,
1384
- )
1385
- self.google_scholar_author_search = to_raw_response_wrapper(
1386
- search_api.google_scholar_author_search,
1387
- )
1388
- self.google_scholar_citations = to_raw_response_wrapper(
1389
- search_api.google_scholar_citations,
1390
- )
1391
- self.google_scholar_search = to_raw_response_wrapper(
1392
- search_api.google_scholar_search,
1393
- )
1394
- self.google_search = to_raw_response_wrapper(
1395
- search_api.google_search,
1396
- )
1397
- self.location_search = to_raw_response_wrapper(
1398
- search_api.location_search,
1399
- )
1400
-
1401
-
1402
- class AsyncSearchAPIResourceWithRawResponse:
1403
- def __init__(self, search_api: AsyncSearchAPIResource) -> None:
1404
- self._search_api = search_api
1405
-
1406
- self.google_flights_calendar = async_to_raw_response_wrapper(
1407
- search_api.google_flights_calendar,
1408
- )
1409
- self.google_flights_location_search = async_to_raw_response_wrapper(
1410
- search_api.google_flights_location_search,
1411
- )
1412
- self.google_flights_search = async_to_raw_response_wrapper(
1413
- search_api.google_flights_search,
1414
- )
1415
- self.google_maps_place_details = async_to_raw_response_wrapper(
1416
- search_api.google_maps_place_details,
1417
- )
1418
- self.google_maps_place_photos = async_to_raw_response_wrapper(
1419
- search_api.google_maps_place_photos,
1420
- )
1421
- self.google_maps_place_reviews = async_to_raw_response_wrapper(
1422
- search_api.google_maps_place_reviews,
1423
- )
1424
- self.google_maps_search = async_to_raw_response_wrapper(
1425
- search_api.google_maps_search,
1426
- )
1427
- self.google_scholar_author_search = async_to_raw_response_wrapper(
1428
- search_api.google_scholar_author_search,
1429
- )
1430
- self.google_scholar_citations = async_to_raw_response_wrapper(
1431
- search_api.google_scholar_citations,
1432
- )
1433
- self.google_scholar_search = async_to_raw_response_wrapper(
1434
- search_api.google_scholar_search,
1435
- )
1436
- self.google_search = async_to_raw_response_wrapper(
1437
- search_api.google_search,
1438
- )
1439
- self.location_search = async_to_raw_response_wrapper(
1440
- search_api.location_search,
1441
- )
1442
-
1443
-
1444
- class SearchAPIResourceWithStreamingResponse:
1445
- def __init__(self, search_api: SearchAPIResource) -> None:
1446
- self._search_api = search_api
1447
-
1448
- self.google_flights_calendar = to_streamed_response_wrapper(
1449
- search_api.google_flights_calendar,
1450
- )
1451
- self.google_flights_location_search = to_streamed_response_wrapper(
1452
- search_api.google_flights_location_search,
1453
- )
1454
- self.google_flights_search = to_streamed_response_wrapper(
1455
- search_api.google_flights_search,
1456
- )
1457
- self.google_maps_place_details = to_streamed_response_wrapper(
1458
- search_api.google_maps_place_details,
1459
- )
1460
- self.google_maps_place_photos = to_streamed_response_wrapper(
1461
- search_api.google_maps_place_photos,
1462
- )
1463
- self.google_maps_place_reviews = to_streamed_response_wrapper(
1464
- search_api.google_maps_place_reviews,
1465
- )
1466
- self.google_maps_search = to_streamed_response_wrapper(
1467
- search_api.google_maps_search,
1468
- )
1469
- self.google_scholar_author_search = to_streamed_response_wrapper(
1470
- search_api.google_scholar_author_search,
1471
- )
1472
- self.google_scholar_citations = to_streamed_response_wrapper(
1473
- search_api.google_scholar_citations,
1474
- )
1475
- self.google_scholar_search = to_streamed_response_wrapper(
1476
- search_api.google_scholar_search,
1477
- )
1478
- self.google_search = to_streamed_response_wrapper(
1479
- search_api.google_search,
1480
- )
1481
- self.location_search = to_streamed_response_wrapper(
1482
- search_api.location_search,
1483
- )
1484
-
1485
-
1486
- class AsyncSearchAPIResourceWithStreamingResponse:
1487
- def __init__(self, search_api: AsyncSearchAPIResource) -> None:
1488
- self._search_api = search_api
1489
-
1490
- self.google_flights_calendar = async_to_streamed_response_wrapper(
1491
- search_api.google_flights_calendar,
1492
- )
1493
- self.google_flights_location_search = async_to_streamed_response_wrapper(
1494
- search_api.google_flights_location_search,
1495
- )
1496
- self.google_flights_search = async_to_streamed_response_wrapper(
1497
- search_api.google_flights_search,
1498
- )
1499
- self.google_maps_place_details = async_to_streamed_response_wrapper(
1500
- search_api.google_maps_place_details,
1501
- )
1502
- self.google_maps_place_photos = async_to_streamed_response_wrapper(
1503
- search_api.google_maps_place_photos,
1504
- )
1505
- self.google_maps_place_reviews = async_to_streamed_response_wrapper(
1506
- search_api.google_maps_place_reviews,
1507
- )
1508
- self.google_maps_search = async_to_streamed_response_wrapper(
1509
- search_api.google_maps_search,
1510
- )
1511
- self.google_scholar_author_search = async_to_streamed_response_wrapper(
1512
- search_api.google_scholar_author_search,
1513
- )
1514
- self.google_scholar_citations = async_to_streamed_response_wrapper(
1515
- search_api.google_scholar_citations,
1516
- )
1517
- self.google_scholar_search = async_to_streamed_response_wrapper(
1518
- search_api.google_scholar_search,
1519
- )
1520
- self.google_search = async_to_streamed_response_wrapper(
1521
- search_api.google_search,
1522
- )
1523
- self.location_search = async_to_streamed_response_wrapper(
1524
- search_api.location_search,
1525
- )