ittybit 0.8.7 → 0.9.0
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.
- checksums.yaml +4 -4
- data/lib/ittybit/automations/client.rb +61 -58
- data/lib/ittybit/automations/types/automations_create_request_workflow_item.rb +81 -0
- data/lib/ittybit/automations/types/automations_create_request_workflow_item_kind.rb +20 -0
- data/lib/ittybit/automations/types/automations_create_request_workflow_item_next_item.rb +71 -0
- data/lib/ittybit/automations/types/automations_create_response.rb +107 -0
- data/lib/ittybit/automations/types/automations_create_response_data.rb +133 -0
- data/lib/ittybit/automations/types/automations_create_response_data_status.rb +10 -0
- data/lib/ittybit/automations/types/automations_create_response_data_trigger.rb +67 -0
- data/lib/ittybit/automations/types/automations_create_response_data_workflow_item.rb +61 -0
- data/lib/ittybit/automations/types/automations_create_response_data_workflow_item_conditions.rb +86 -0
- data/lib/ittybit/automations/types/automations_create_response_data_workflow_item_conditions_conditions_item.rb +72 -0
- data/lib/ittybit/automations/types/automations_create_response_data_workflow_item_conditions_next_item.rb +71 -0
- data/lib/ittybit/automations/types/automations_create_response_data_workflow_item_ref.rb +83 -0
- data/lib/ittybit/automations/types/automations_create_response_data_workflow_item_ref_kind.rb +20 -0
- data/lib/ittybit/automations/types/automations_create_response_data_workflow_item_ref_next_item.rb +71 -0
- data/lib/ittybit/automations/types/automations_create_response_error.rb +59 -0
- data/lib/ittybit/automations/types/automations_create_response_links.rb +69 -0
- data/lib/ittybit/automations/types/automations_create_response_meta.rb +98 -0
- data/lib/ittybit/automations/types/automations_create_response_meta_type.rb +10 -0
- data/lib/ittybit/automations/types/automations_delete_response.rb +107 -0
- data/lib/ittybit/automations/types/automations_delete_response_data.rb +59 -0
- data/lib/ittybit/automations/types/automations_delete_response_error.rb +59 -0
- data/lib/ittybit/automations/types/automations_delete_response_links.rb +69 -0
- data/lib/ittybit/automations/types/automations_delete_response_meta.rb +98 -0
- data/lib/ittybit/automations/types/automations_delete_response_meta_type.rb +10 -0
- data/lib/ittybit/automations/types/automations_get_response.rb +107 -0
- data/lib/ittybit/automations/types/automations_get_response_data.rb +133 -0
- data/lib/ittybit/automations/types/automations_get_response_data_status.rb +10 -0
- data/lib/ittybit/automations/types/automations_get_response_data_trigger.rb +67 -0
- data/lib/ittybit/automations/types/automations_get_response_data_workflow_item.rb +61 -0
- data/lib/ittybit/automations/types/automations_get_response_data_workflow_item_conditions.rb +86 -0
- data/lib/ittybit/automations/types/automations_get_response_data_workflow_item_conditions_conditions_item.rb +71 -0
- data/lib/ittybit/automations/types/automations_get_response_data_workflow_item_conditions_next_item.rb +71 -0
- data/lib/ittybit/automations/types/automations_get_response_data_workflow_item_ref.rb +83 -0
- data/lib/ittybit/automations/types/automations_get_response_data_workflow_item_ref_kind.rb +20 -0
- data/lib/ittybit/automations/types/automations_get_response_data_workflow_item_ref_next_item.rb +71 -0
- data/lib/ittybit/automations/types/automations_get_response_error.rb +59 -0
- data/lib/ittybit/automations/types/automations_get_response_links.rb +69 -0
- data/lib/ittybit/automations/types/automations_get_response_meta.rb +98 -0
- data/lib/ittybit/automations/types/automations_get_response_meta_type.rb +10 -0
- data/lib/ittybit/automations/types/automations_list_response.rb +105 -0
- data/lib/ittybit/automations/types/automations_list_response_data_item.rb +133 -0
- data/lib/ittybit/automations/types/automations_list_response_data_item_status.rb +10 -0
- data/lib/ittybit/automations/types/automations_list_response_data_item_trigger.rb +68 -0
- data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item.rb +61 -0
- data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item_conditions.rb +86 -0
- data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item_conditions_conditions_item.rb +72 -0
- data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item_conditions_next_item.rb +71 -0
- data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item_ref.rb +83 -0
- data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item_ref_kind.rb +20 -0
- data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item_ref_next_item.rb +71 -0
- data/lib/ittybit/automations/types/automations_list_response_error.rb +59 -0
- data/lib/ittybit/automations/types/automations_list_response_links.rb +90 -0
- data/lib/ittybit/automations/types/automations_list_response_meta.rb +130 -0
- data/lib/ittybit/automations/types/automations_list_response_meta_type.rb +10 -0
- data/lib/ittybit/automations/types/automations_update_request_workflow_item.rb +81 -0
- data/lib/ittybit/automations/types/automations_update_request_workflow_item_kind.rb +20 -0
- data/lib/ittybit/automations/types/automations_update_request_workflow_item_next_item.rb +71 -0
- data/lib/ittybit/automations/types/automations_update_response.rb +107 -0
- data/lib/ittybit/automations/types/automations_update_response_data.rb +133 -0
- data/lib/ittybit/automations/types/automations_update_response_data_status.rb +10 -0
- data/lib/ittybit/automations/types/automations_update_response_data_trigger.rb +67 -0
- data/lib/ittybit/automations/types/automations_update_response_data_workflow_item.rb +61 -0
- data/lib/ittybit/automations/types/automations_update_response_data_workflow_item_conditions.rb +86 -0
- data/lib/ittybit/automations/types/automations_update_response_data_workflow_item_conditions_conditions_item.rb +72 -0
- data/lib/ittybit/automations/types/automations_update_response_data_workflow_item_conditions_next_item.rb +71 -0
- data/lib/ittybit/automations/types/automations_update_response_data_workflow_item_ref.rb +83 -0
- data/lib/ittybit/automations/types/automations_update_response_data_workflow_item_ref_kind.rb +20 -0
- data/lib/ittybit/automations/types/automations_update_response_data_workflow_item_ref_next_item.rb +71 -0
- data/lib/ittybit/automations/types/automations_update_response_error.rb +59 -0
- data/lib/ittybit/automations/types/automations_update_response_links.rb +69 -0
- data/lib/ittybit/automations/types/automations_update_response_meta.rb +98 -0
- data/lib/ittybit/automations/types/automations_update_response_meta_type.rb +10 -0
- data/lib/ittybit/files/client.rb +47 -45
- data/lib/ittybit/files/types/files_create_response.rb +107 -0
- data/lib/ittybit/files/types/files_create_response_data.rb +317 -0
- data/lib/ittybit/files/types/files_create_response_data_kind.rb +11 -0
- data/lib/ittybit/files/types/files_create_response_data_object.rb +11 -0
- data/lib/ittybit/files/types/files_create_response_data_status.rb +12 -0
- data/lib/ittybit/files/types/files_create_response_error.rb +59 -0
- data/lib/ittybit/files/types/files_create_response_links.rb +69 -0
- data/lib/ittybit/files/types/files_create_response_meta.rb +98 -0
- data/lib/ittybit/files/types/files_create_response_meta_type.rb +10 -0
- data/lib/ittybit/files/types/files_delete_response.rb +107 -0
- data/lib/ittybit/files/types/files_delete_response_data.rb +59 -0
- data/lib/ittybit/files/types/files_delete_response_error.rb +59 -0
- data/lib/ittybit/files/types/files_delete_response_links.rb +69 -0
- data/lib/ittybit/files/types/files_delete_response_meta.rb +98 -0
- data/lib/ittybit/files/types/files_delete_response_meta_type.rb +10 -0
- data/lib/ittybit/files/types/files_get_response.rb +107 -0
- data/lib/ittybit/files/types/files_get_response_data.rb +317 -0
- data/lib/ittybit/files/types/files_get_response_data_kind.rb +11 -0
- data/lib/ittybit/files/types/files_get_response_data_object.rb +11 -0
- data/lib/ittybit/files/types/files_get_response_data_status.rb +12 -0
- data/lib/ittybit/files/types/files_get_response_error.rb +59 -0
- data/lib/ittybit/files/types/files_get_response_links.rb +69 -0
- data/lib/ittybit/files/types/files_get_response_meta.rb +98 -0
- data/lib/ittybit/files/types/files_get_response_meta_type.rb +10 -0
- data/lib/ittybit/files/types/files_list_response.rb +105 -0
- data/lib/ittybit/files/types/files_list_response_data_item.rb +317 -0
- data/lib/ittybit/files/types/files_list_response_data_item_kind.rb +11 -0
- data/lib/ittybit/files/types/files_list_response_data_item_object.rb +11 -0
- data/lib/ittybit/files/types/files_list_response_data_item_status.rb +12 -0
- data/lib/ittybit/files/types/files_list_response_error.rb +59 -0
- data/lib/ittybit/files/types/files_list_response_links.rb +90 -0
- data/lib/ittybit/files/types/files_list_response_meta.rb +130 -0
- data/lib/ittybit/files/types/files_list_response_meta_type.rb +10 -0
- data/lib/ittybit/files/types/files_update_response.rb +107 -0
- data/lib/ittybit/files/types/files_update_response_data.rb +317 -0
- data/lib/ittybit/files/types/files_update_response_data_kind.rb +11 -0
- data/lib/ittybit/files/types/files_update_response_data_object.rb +11 -0
- data/lib/ittybit/files/types/files_update_response_data_status.rb +12 -0
- data/lib/ittybit/files/types/files_update_response_error.rb +59 -0
- data/lib/ittybit/files/types/files_update_response_links.rb +69 -0
- data/lib/ittybit/files/types/files_update_response_meta.rb +98 -0
- data/lib/ittybit/files/types/files_update_response_meta_type.rb +10 -0
- data/lib/ittybit/media/client.rb +42 -40
- data/lib/ittybit/media/types/media_create_response.rb +107 -0
- data/lib/ittybit/media/types/media_create_response_data.rb +175 -0
- data/lib/ittybit/media/types/media_create_response_data_files_item.rb +262 -0
- data/lib/ittybit/media/types/media_create_response_data_files_item_kind.rb +11 -0
- data/lib/ittybit/media/types/media_create_response_data_files_item_object.rb +11 -0
- data/lib/ittybit/media/types/media_create_response_data_files_item_orientation.rb +11 -0
- data/lib/ittybit/media/types/media_create_response_data_files_item_status.rb +12 -0
- data/lib/ittybit/media/types/media_create_response_data_kind.rb +11 -0
- data/lib/ittybit/media/types/media_create_response_error.rb +59 -0
- data/lib/ittybit/media/types/media_create_response_links.rb +69 -0
- data/lib/ittybit/media/types/media_create_response_meta.rb +98 -0
- data/lib/ittybit/media/types/media_create_response_meta_type.rb +10 -0
- data/lib/ittybit/media/types/media_delete_response.rb +107 -0
- data/lib/ittybit/media/types/media_delete_response_data.rb +59 -0
- data/lib/ittybit/media/types/media_delete_response_error.rb +59 -0
- data/lib/ittybit/media/types/media_delete_response_links.rb +69 -0
- data/lib/ittybit/media/types/media_delete_response_meta.rb +98 -0
- data/lib/ittybit/media/types/media_delete_response_meta_type.rb +10 -0
- data/lib/ittybit/media/types/media_get_response.rb +107 -0
- data/lib/ittybit/media/types/media_get_response_data.rb +175 -0
- data/lib/ittybit/media/types/media_get_response_data_files_item.rb +262 -0
- data/lib/ittybit/media/types/media_get_response_data_files_item_kind.rb +11 -0
- data/lib/ittybit/media/types/media_get_response_data_files_item_object.rb +11 -0
- data/lib/ittybit/media/types/media_get_response_data_files_item_orientation.rb +11 -0
- data/lib/ittybit/media/types/media_get_response_data_files_item_status.rb +12 -0
- data/lib/ittybit/media/types/media_get_response_data_kind.rb +11 -0
- data/lib/ittybit/media/types/media_get_response_error.rb +59 -0
- data/lib/ittybit/media/types/media_get_response_links.rb +69 -0
- data/lib/ittybit/media/types/media_get_response_meta.rb +98 -0
- data/lib/ittybit/media/types/media_get_response_meta_type.rb +10 -0
- data/lib/ittybit/media/types/media_update_response.rb +107 -0
- data/lib/ittybit/media/types/media_update_response_data.rb +175 -0
- data/lib/ittybit/media/types/media_update_response_data_files_item.rb +262 -0
- data/lib/ittybit/media/types/media_update_response_data_files_item_kind.rb +11 -0
- data/lib/ittybit/media/types/media_update_response_data_files_item_object.rb +11 -0
- data/lib/ittybit/media/types/media_update_response_data_files_item_orientation.rb +11 -0
- data/lib/ittybit/media/types/media_update_response_data_files_item_status.rb +12 -0
- data/lib/ittybit/media/types/media_update_response_data_kind.rb +11 -0
- data/lib/ittybit/media/types/media_update_response_error.rb +59 -0
- data/lib/ittybit/media/types/media_update_response_links.rb +69 -0
- data/lib/ittybit/media/types/media_update_response_meta.rb +98 -0
- data/lib/ittybit/media/types/media_update_response_meta_type.rb +10 -0
- data/lib/ittybit/signatures/client.rb +9 -9
- data/lib/ittybit/signatures/types/signatures_create_response.rb +107 -0
- data/lib/ittybit/signatures/types/signatures_create_response_data.rb +112 -0
- data/lib/ittybit/signatures/types/signatures_create_response_error.rb +59 -0
- data/lib/ittybit/signatures/types/signatures_create_response_links.rb +69 -0
- data/lib/ittybit/signatures/types/signatures_create_response_meta.rb +98 -0
- data/lib/ittybit/signatures/types/signatures_create_response_meta_type.rb +10 -0
- data/lib/ittybit/tasks/client.rb +35 -30
- data/lib/ittybit/tasks/types/tasks_create_response.rb +107 -0
- data/lib/ittybit/tasks/types/tasks_create_response_data.rb +186 -0
- data/lib/ittybit/tasks/types/tasks_create_response_data_kind.rb +23 -0
- data/lib/ittybit/tasks/types/tasks_create_response_data_results.rb +76 -0
- data/lib/ittybit/tasks/types/tasks_create_response_data_status.rb +16 -0
- data/lib/ittybit/tasks/types/tasks_create_response_error.rb +59 -0
- data/lib/ittybit/tasks/types/tasks_create_response_links.rb +69 -0
- data/lib/ittybit/tasks/types/tasks_create_response_meta.rb +98 -0
- data/lib/ittybit/tasks/types/tasks_create_response_meta_type.rb +10 -0
- data/lib/ittybit/tasks/types/tasks_get_response.rb +107 -0
- data/lib/ittybit/tasks/types/tasks_get_response_data.rb +186 -0
- data/lib/ittybit/tasks/types/tasks_get_response_data_kind.rb +23 -0
- data/lib/ittybit/tasks/types/tasks_get_response_data_results.rb +76 -0
- data/lib/ittybit/tasks/types/tasks_get_response_data_status.rb +16 -0
- data/lib/ittybit/tasks/types/tasks_get_response_error.rb +59 -0
- data/lib/ittybit/tasks/types/tasks_get_response_links.rb +69 -0
- data/lib/ittybit/tasks/types/tasks_get_response_meta.rb +98 -0
- data/lib/ittybit/tasks/types/tasks_get_response_meta_type.rb +10 -0
- data/lib/ittybit/tasks/types/tasks_list_response.rb +105 -0
- data/lib/ittybit/tasks/types/tasks_list_response_data_item.rb +186 -0
- data/lib/ittybit/tasks/types/tasks_list_response_data_item_kind.rb +23 -0
- data/lib/ittybit/tasks/types/tasks_list_response_data_item_results.rb +76 -0
- data/lib/ittybit/tasks/types/tasks_list_response_data_item_status.rb +16 -0
- data/lib/ittybit/tasks/types/tasks_list_response_error.rb +59 -0
- data/lib/ittybit/tasks/types/tasks_list_response_links.rb +90 -0
- data/lib/ittybit/tasks/types/tasks_list_response_meta.rb +130 -0
- data/lib/ittybit/tasks/types/tasks_list_response_meta_type.rb +10 -0
- data/lib/ittybit/types/automation_list_response.rb +19 -19
- data/lib/ittybit/types/automation_list_response_data_item.rb +131 -0
- data/lib/ittybit/types/automation_list_response_data_item_status.rb +8 -0
- data/lib/ittybit/types/automation_list_response_data_item_trigger.rb +66 -0
- data/lib/ittybit/types/automation_list_response_data_item_workflow_item.rb +57 -0
- data/lib/ittybit/types/automation_list_response_data_item_workflow_item_conditions.rb +84 -0
- data/lib/ittybit/types/automation_list_response_data_item_workflow_item_conditions_conditions_item.rb +70 -0
- data/lib/ittybit/types/automation_list_response_data_item_workflow_item_conditions_next_item.rb +69 -0
- data/lib/ittybit/types/automation_list_response_data_item_workflow_item_ref.rb +81 -0
- data/lib/ittybit/types/automation_list_response_data_item_workflow_item_ref_kind.rb +18 -0
- data/lib/ittybit/types/automation_list_response_data_item_workflow_item_ref_next_item.rb +69 -0
- data/lib/ittybit/types/automation_list_response_error.rb +57 -0
- data/lib/ittybit/types/automation_list_response_links.rb +88 -0
- data/lib/ittybit/types/automation_list_response_meta.rb +128 -0
- data/lib/ittybit/types/automation_list_response_meta_type.rb +8 -0
- data/lib/ittybit/types/automation_response.rb +25 -20
- data/lib/ittybit/types/automation_response_data.rb +131 -0
- data/lib/ittybit/types/automation_response_data_status.rb +8 -0
- data/lib/ittybit/types/automation_response_data_trigger.rb +65 -0
- data/lib/ittybit/types/automation_response_data_workflow_item.rb +54 -0
- data/lib/ittybit/types/automation_response_data_workflow_item_conditions.rb +84 -0
- data/lib/ittybit/types/automation_response_data_workflow_item_conditions_conditions_item.rb +69 -0
- data/lib/ittybit/types/automation_response_data_workflow_item_conditions_next_item.rb +69 -0
- data/lib/ittybit/types/automation_response_data_workflow_item_ref.rb +80 -0
- data/lib/ittybit/types/automation_response_data_workflow_item_ref_kind.rb +18 -0
- data/lib/ittybit/types/automation_response_data_workflow_item_ref_next_item.rb +69 -0
- data/lib/ittybit/types/automation_response_error.rb +57 -0
- data/lib/ittybit/types/automation_response_links.rb +67 -0
- data/lib/ittybit/types/automation_response_meta.rb +96 -0
- data/lib/ittybit/types/automation_response_meta_type.rb +8 -0
- data/lib/ittybit/types/automation_workflow_item.rb +8 -8
- data/lib/ittybit/types/automation_workflow_item_conditions.rb +82 -0
- data/lib/ittybit/types/automation_workflow_item_conditions_conditions_item.rb +69 -0
- data/lib/ittybit/types/automation_workflow_item_conditions_next_item.rb +69 -0
- data/lib/ittybit/types/automation_workflow_item_ref.rb +79 -0
- data/lib/ittybit/types/automation_workflow_item_ref_kind.rb +18 -0
- data/lib/ittybit/types/automation_workflow_item_ref_next_item.rb +67 -0
- data/lib/ittybit/types/confirmation_response.rb +25 -20
- data/lib/ittybit/types/confirmation_response_data.rb +57 -0
- data/lib/ittybit/types/confirmation_response_error.rb +57 -0
- data/lib/ittybit/types/confirmation_response_links.rb +67 -0
- data/lib/ittybit/types/confirmation_response_meta.rb +96 -0
- data/lib/ittybit/types/confirmation_response_meta_type.rb +8 -0
- data/lib/ittybit/types/created_by.rb +5 -0
- data/lib/ittybit/types/error.rb +1 -53
- data/lib/ittybit/types/file_list_response.rb +19 -19
- data/lib/ittybit/types/file_list_response_data_item.rb +315 -0
- data/lib/ittybit/types/file_list_response_data_item_kind.rb +9 -0
- data/lib/ittybit/types/file_list_response_data_item_object.rb +9 -0
- data/lib/ittybit/types/file_list_response_data_item_status.rb +10 -0
- data/lib/ittybit/types/file_list_response_error.rb +57 -0
- data/lib/ittybit/types/file_list_response_links.rb +88 -0
- data/lib/ittybit/types/file_list_response_meta.rb +128 -0
- data/lib/ittybit/types/file_list_response_meta_type.rb +8 -0
- data/lib/ittybit/types/file_response.rb +25 -20
- data/lib/ittybit/types/file_response_data.rb +315 -0
- data/lib/ittybit/types/file_response_data_kind.rb +9 -0
- data/lib/ittybit/types/file_response_data_object.rb +9 -0
- data/lib/ittybit/types/file_response_data_status.rb +10 -0
- data/lib/ittybit/types/file_response_error.rb +57 -0
- data/lib/ittybit/types/file_response_links.rb +67 -0
- data/lib/ittybit/types/file_response_meta.rb +96 -0
- data/lib/ittybit/types/file_response_meta_type.rb +8 -0
- data/lib/ittybit/types/kind.rb +21 -0
- data/lib/ittybit/types/media.rb +4 -4
- data/lib/ittybit/types/media_files_item.rb +260 -0
- data/lib/ittybit/types/media_files_item_kind.rb +9 -0
- data/lib/ittybit/types/media_files_item_object.rb +9 -0
- data/lib/ittybit/types/media_files_item_orientation.rb +9 -0
- data/lib/ittybit/types/media_files_item_status.rb +10 -0
- data/lib/ittybit/types/media_list_response.rb +19 -19
- data/lib/ittybit/types/media_list_response_data_item.rb +173 -0
- data/lib/ittybit/types/media_list_response_data_item_files_item.rb +260 -0
- data/lib/ittybit/types/media_list_response_data_item_files_item_kind.rb +9 -0
- data/lib/ittybit/types/media_list_response_data_item_files_item_object.rb +9 -0
- data/lib/ittybit/types/media_list_response_data_item_files_item_orientation.rb +9 -0
- data/lib/ittybit/types/media_list_response_data_item_files_item_status.rb +10 -0
- data/lib/ittybit/types/media_list_response_data_item_kind.rb +9 -0
- data/lib/ittybit/types/media_list_response_error.rb +57 -0
- data/lib/ittybit/types/media_list_response_links.rb +88 -0
- data/lib/ittybit/types/media_list_response_meta.rb +128 -0
- data/lib/ittybit/types/media_list_response_meta_type.rb +8 -0
- data/lib/ittybit/types/media_response.rb +25 -20
- data/lib/ittybit/types/media_response_data.rb +173 -0
- data/lib/ittybit/types/media_response_data_files_item.rb +260 -0
- data/lib/ittybit/types/media_response_data_files_item_kind.rb +9 -0
- data/lib/ittybit/types/media_response_data_files_item_object.rb +9 -0
- data/lib/ittybit/types/media_response_data_files_item_orientation.rb +9 -0
- data/lib/ittybit/types/media_response_data_files_item_status.rb +10 -0
- data/lib/ittybit/types/media_response_data_kind.rb +9 -0
- data/lib/ittybit/types/media_response_error.rb +57 -0
- data/lib/ittybit/types/media_response_links.rb +67 -0
- data/lib/ittybit/types/media_response_meta.rb +96 -0
- data/lib/ittybit/types/media_response_meta_type.rb +8 -0
- data/lib/ittybit/types/parent_id.rb +5 -0
- data/lib/ittybit/types/progress.rb +5 -0
- data/lib/ittybit/types/signature_response.rb +25 -20
- data/lib/ittybit/types/signature_response_data.rb +110 -0
- data/lib/ittybit/types/signature_response_error.rb +57 -0
- data/lib/ittybit/types/signature_response_links.rb +67 -0
- data/lib/ittybit/types/signature_response_meta.rb +96 -0
- data/lib/ittybit/types/signature_response_meta_type.rb +8 -0
- data/lib/ittybit/types/status.rb +14 -0
- data/lib/ittybit/types/task_list_response.rb +19 -19
- data/lib/ittybit/types/task_list_response_data_item.rb +184 -0
- data/lib/ittybit/types/task_list_response_data_item_kind.rb +21 -0
- data/lib/ittybit/types/task_list_response_data_item_results.rb +74 -0
- data/lib/ittybit/types/task_list_response_data_item_status.rb +14 -0
- data/lib/ittybit/types/task_list_response_error.rb +57 -0
- data/lib/ittybit/types/task_list_response_links.rb +88 -0
- data/lib/ittybit/types/task_list_response_meta.rb +128 -0
- data/lib/ittybit/types/task_list_response_meta_type.rb +8 -0
- data/lib/ittybit/types/task_response.rb +25 -20
- data/lib/ittybit/types/task_response_data.rb +184 -0
- data/lib/ittybit/types/task_response_data_kind.rb +21 -0
- data/lib/ittybit/types/task_response_data_results.rb +74 -0
- data/lib/ittybit/types/task_response_data_status.rb +14 -0
- data/lib/ittybit/types/task_response_error.rb +57 -0
- data/lib/ittybit/types/task_response_links.rb +67 -0
- data/lib/ittybit/types/task_response_meta.rb +96 -0
- data/lib/ittybit/types/task_response_meta_type.rb +8 -0
- data/lib/ittybit.rb +8 -8
- data/lib/requests.rb +24 -24
- data/lib/types_export.rb +300 -2
- metadata +299 -2
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Ittybit
|
7
|
+
class Automations
|
8
|
+
class AutomationsUpdateResponseError
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :message
|
11
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
12
|
+
attr_reader :additional_properties
|
13
|
+
# @return [Object]
|
14
|
+
attr_reader :_field_set
|
15
|
+
protected :_field_set
|
16
|
+
|
17
|
+
OMIT = Object.new
|
18
|
+
|
19
|
+
# @param message [String]
|
20
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
21
|
+
# @return [Ittybit::Automations::AutomationsUpdateResponseError]
|
22
|
+
def initialize(message: OMIT, additional_properties: nil)
|
23
|
+
@message = message if message != OMIT
|
24
|
+
@additional_properties = additional_properties
|
25
|
+
@_field_set = { "message": message }.reject do |_k, v|
|
26
|
+
v == OMIT
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# Deserialize a JSON object to an instance of AutomationsUpdateResponseError
|
31
|
+
#
|
32
|
+
# @param json_object [String]
|
33
|
+
# @return [Ittybit::Automations::AutomationsUpdateResponseError]
|
34
|
+
def self.from_json(json_object:)
|
35
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
+
parsed_json = JSON.parse(json_object)
|
37
|
+
message = parsed_json["message"]
|
38
|
+
new(message: message, additional_properties: struct)
|
39
|
+
end
|
40
|
+
|
41
|
+
# Serialize an instance of AutomationsUpdateResponseError to a JSON object
|
42
|
+
#
|
43
|
+
# @return [String]
|
44
|
+
def to_json(*_args)
|
45
|
+
@_field_set&.to_json
|
46
|
+
end
|
47
|
+
|
48
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
49
|
+
# hash and check each fields type against the current object's property
|
50
|
+
# definitions.
|
51
|
+
#
|
52
|
+
# @param obj [Object]
|
53
|
+
# @return [Void]
|
54
|
+
def self.validate_raw(obj:)
|
55
|
+
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Ittybit
|
7
|
+
class Automations
|
8
|
+
class AutomationsUpdateResponseLinks
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :self_
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :parent
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param self_ [String]
|
22
|
+
# @param parent [String]
|
23
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
+
# @return [Ittybit::Automations::AutomationsUpdateResponseLinks]
|
25
|
+
def initialize(self_: OMIT, parent: OMIT, additional_properties: nil)
|
26
|
+
@self_ = self_ if self_ != OMIT
|
27
|
+
@parent = parent if parent != OMIT
|
28
|
+
@additional_properties = additional_properties
|
29
|
+
@_field_set = { "self": self_, "parent": parent }.reject do |_k, v|
|
30
|
+
v == OMIT
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# Deserialize a JSON object to an instance of AutomationsUpdateResponseLinks
|
35
|
+
#
|
36
|
+
# @param json_object [String]
|
37
|
+
# @return [Ittybit::Automations::AutomationsUpdateResponseLinks]
|
38
|
+
def self.from_json(json_object:)
|
39
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
40
|
+
parsed_json = JSON.parse(json_object)
|
41
|
+
self_ = parsed_json["self"]
|
42
|
+
parent = parsed_json["parent"]
|
43
|
+
new(
|
44
|
+
self_: self_,
|
45
|
+
parent: parent,
|
46
|
+
additional_properties: struct
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Serialize an instance of AutomationsUpdateResponseLinks to a JSON object
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
def to_json(*_args)
|
54
|
+
@_field_set&.to_json
|
55
|
+
end
|
56
|
+
|
57
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
58
|
+
# hash and check each fields type against the current object's property
|
59
|
+
# definitions.
|
60
|
+
#
|
61
|
+
# @param obj [Object]
|
62
|
+
# @return [Void]
|
63
|
+
def self.validate_raw(obj:)
|
64
|
+
obj.self_&.is_a?(String) != false || raise("Passed value for field obj.self_ is not the expected type, validation failed.")
|
65
|
+
obj.parent&.is_a?(String) != false || raise("Passed value for field obj.parent is not the expected type, validation failed.")
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "automations_update_response_meta_type"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Ittybit
|
8
|
+
class Automations
|
9
|
+
class AutomationsUpdateResponseMeta
|
10
|
+
# @return [String]
|
11
|
+
attr_reader :request_id
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :org_id
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :project_id
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :version
|
18
|
+
# @return [Ittybit::Automations::AutomationsUpdateResponseMetaType]
|
19
|
+
attr_reader :type
|
20
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
21
|
+
attr_reader :additional_properties
|
22
|
+
# @return [Object]
|
23
|
+
attr_reader :_field_set
|
24
|
+
protected :_field_set
|
25
|
+
|
26
|
+
OMIT = Object.new
|
27
|
+
|
28
|
+
# @param request_id [String]
|
29
|
+
# @param org_id [String]
|
30
|
+
# @param project_id [String]
|
31
|
+
# @param version [String]
|
32
|
+
# @param type [Ittybit::Automations::AutomationsUpdateResponseMetaType]
|
33
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
34
|
+
# @return [Ittybit::Automations::AutomationsUpdateResponseMeta]
|
35
|
+
def initialize(request_id: OMIT, org_id: OMIT, project_id: OMIT, version: OMIT, type: OMIT,
|
36
|
+
additional_properties: nil)
|
37
|
+
@request_id = request_id if request_id != OMIT
|
38
|
+
@org_id = org_id if org_id != OMIT
|
39
|
+
@project_id = project_id if project_id != OMIT
|
40
|
+
@version = version if version != OMIT
|
41
|
+
@type = type if type != OMIT
|
42
|
+
@additional_properties = additional_properties
|
43
|
+
@_field_set = {
|
44
|
+
"request_id": request_id,
|
45
|
+
"org_id": org_id,
|
46
|
+
"project_id": project_id,
|
47
|
+
"version": version,
|
48
|
+
"type": type
|
49
|
+
}.reject do |_k, v|
|
50
|
+
v == OMIT
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# Deserialize a JSON object to an instance of AutomationsUpdateResponseMeta
|
55
|
+
#
|
56
|
+
# @param json_object [String]
|
57
|
+
# @return [Ittybit::Automations::AutomationsUpdateResponseMeta]
|
58
|
+
def self.from_json(json_object:)
|
59
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
60
|
+
parsed_json = JSON.parse(json_object)
|
61
|
+
request_id = parsed_json["request_id"]
|
62
|
+
org_id = parsed_json["org_id"]
|
63
|
+
project_id = parsed_json["project_id"]
|
64
|
+
version = parsed_json["version"]
|
65
|
+
type = parsed_json["type"]
|
66
|
+
new(
|
67
|
+
request_id: request_id,
|
68
|
+
org_id: org_id,
|
69
|
+
project_id: project_id,
|
70
|
+
version: version,
|
71
|
+
type: type,
|
72
|
+
additional_properties: struct
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
# Serialize an instance of AutomationsUpdateResponseMeta to a JSON object
|
77
|
+
#
|
78
|
+
# @return [String]
|
79
|
+
def to_json(*_args)
|
80
|
+
@_field_set&.to_json
|
81
|
+
end
|
82
|
+
|
83
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
84
|
+
# hash and check each fields type against the current object's property
|
85
|
+
# definitions.
|
86
|
+
#
|
87
|
+
# @param obj [Object]
|
88
|
+
# @return [Void]
|
89
|
+
def self.validate_raw(obj:)
|
90
|
+
obj.request_id&.is_a?(String) != false || raise("Passed value for field obj.request_id is not the expected type, validation failed.")
|
91
|
+
obj.org_id&.is_a?(String) != false || raise("Passed value for field obj.org_id is not the expected type, validation failed.")
|
92
|
+
obj.project_id&.is_a?(String) != false || raise("Passed value for field obj.project_id is not the expected type, validation failed.")
|
93
|
+
obj.version&.is_a?(String) != false || raise("Passed value for field obj.version is not the expected type, validation failed.")
|
94
|
+
obj.type&.is_a?(Ittybit::Automations::AutomationsUpdateResponseMetaType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
data/lib/ittybit/files/client.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "../../requests"
|
4
|
-
require_relative "
|
5
|
-
require_relative "
|
6
|
-
require_relative "
|
4
|
+
require_relative "types/files_list_response"
|
5
|
+
require_relative "types/files_create_response"
|
6
|
+
require_relative "types/files_get_response"
|
7
|
+
require_relative "types/files_delete_response"
|
8
|
+
require_relative "types/files_update_response"
|
7
9
|
require "async"
|
8
10
|
|
9
11
|
module Ittybit
|
@@ -22,18 +24,18 @@ module Ittybit
|
|
22
24
|
# @param page [Integer]
|
23
25
|
# @param limit [Integer]
|
24
26
|
# @param request_options [Ittybit::RequestOptions]
|
25
|
-
# @return [Ittybit::
|
27
|
+
# @return [Ittybit::Files::FilesListResponse]
|
26
28
|
# @example
|
27
29
|
# api = Ittybit::Client.new(
|
28
30
|
# base_url: "https://api.example.com",
|
29
31
|
# environment: Ittybit::Environment::DEFAULT,
|
30
|
-
#
|
32
|
+
# api_key: "YOUR_AUTH_TOKEN"
|
31
33
|
# )
|
32
34
|
# api.files.list
|
33
35
|
def list(page: nil, limit: nil, request_options: nil)
|
34
36
|
response = @request_client.conn.get do |req|
|
35
37
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
36
|
-
req.headers["Authorization"] = request_options.
|
38
|
+
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
37
39
|
req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
|
38
40
|
req.headers = {
|
39
41
|
**(req.headers || {}),
|
@@ -46,7 +48,7 @@ module Ittybit
|
|
46
48
|
end
|
47
49
|
req.url "#{@request_client.get_url(request_options: request_options)}/files"
|
48
50
|
end
|
49
|
-
Ittybit::
|
51
|
+
Ittybit::Files::FilesListResponse.from_json(json_object: response.body)
|
50
52
|
end
|
51
53
|
|
52
54
|
# Creates a new file from a publicly accessible or signed URL.
|
@@ -58,23 +60,23 @@ module Ittybit
|
|
58
60
|
# @param ref [String]
|
59
61
|
# @param metadata [Hash{String => Object}]
|
60
62
|
# @param request_options [Ittybit::RequestOptions]
|
61
|
-
# @return [Ittybit::
|
63
|
+
# @return [Ittybit::Files::FilesCreateResponse]
|
62
64
|
# @example
|
63
65
|
# api = Ittybit::Client.new(
|
64
66
|
# base_url: "https://api.example.com",
|
65
67
|
# environment: Ittybit::Environment::DEFAULT,
|
66
|
-
#
|
68
|
+
# api_key: "YOUR_AUTH_TOKEN"
|
67
69
|
# )
|
68
70
|
# api.files.create(
|
69
71
|
# url: "https://ittyb.it/sample.mp4",
|
70
72
|
# folder: "ittybit/samples",
|
71
73
|
# filename: "video.mp4",
|
72
|
-
# metadata: { "
|
74
|
+
# metadata: { "customKey": "your custom value" }
|
73
75
|
# )
|
74
76
|
def create(url:, media_id: nil, folder: nil, filename: nil, ref: nil, metadata: nil, request_options: nil)
|
75
77
|
response = @request_client.conn.post do |req|
|
76
78
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
77
|
-
req.headers["Authorization"] = request_options.
|
79
|
+
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
78
80
|
req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
|
79
81
|
req.headers = {
|
80
82
|
**(req.headers || {}),
|
@@ -95,25 +97,25 @@ module Ittybit
|
|
95
97
|
}.compact
|
96
98
|
req.url "#{@request_client.get_url(request_options: request_options)}/files"
|
97
99
|
end
|
98
|
-
Ittybit::
|
100
|
+
Ittybit::Files::FilesCreateResponse.from_json(json_object: response.body)
|
99
101
|
end
|
100
102
|
|
101
103
|
# Retrieve the file object for a file with the given ID.
|
102
104
|
#
|
103
105
|
# @param id [String]
|
104
106
|
# @param request_options [Ittybit::RequestOptions]
|
105
|
-
# @return [Ittybit::
|
107
|
+
# @return [Ittybit::Files::FilesGetResponse]
|
106
108
|
# @example
|
107
109
|
# api = Ittybit::Client.new(
|
108
110
|
# base_url: "https://api.example.com",
|
109
111
|
# environment: Ittybit::Environment::DEFAULT,
|
110
|
-
#
|
112
|
+
# api_key: "YOUR_AUTH_TOKEN"
|
111
113
|
# )
|
112
114
|
# api.files.get(id: "file_abcdefgh1234")
|
113
115
|
def get(id:, request_options: nil)
|
114
116
|
response = @request_client.conn.get do |req|
|
115
117
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
116
|
-
req.headers["Authorization"] = request_options.
|
118
|
+
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
117
119
|
req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
|
118
120
|
req.headers = {
|
119
121
|
**(req.headers || {}),
|
@@ -128,25 +130,25 @@ module Ittybit
|
|
128
130
|
end
|
129
131
|
req.url "#{@request_client.get_url(request_options: request_options)}/files/#{id}"
|
130
132
|
end
|
131
|
-
Ittybit::
|
133
|
+
Ittybit::Files::FilesGetResponse.from_json(json_object: response.body)
|
132
134
|
end
|
133
135
|
|
134
136
|
# Permanently removes a file from the system. This action cannot be undone.
|
135
137
|
#
|
136
138
|
# @param id [String]
|
137
139
|
# @param request_options [Ittybit::RequestOptions]
|
138
|
-
# @return [Ittybit::
|
140
|
+
# @return [Ittybit::Files::FilesDeleteResponse]
|
139
141
|
# @example
|
140
142
|
# api = Ittybit::Client.new(
|
141
143
|
# base_url: "https://api.example.com",
|
142
144
|
# environment: Ittybit::Environment::DEFAULT,
|
143
|
-
#
|
145
|
+
# api_key: "YOUR_AUTH_TOKEN"
|
144
146
|
# )
|
145
147
|
# api.files.delete(id: "file_abcdefgh1234")
|
146
148
|
def delete(id:, request_options: nil)
|
147
149
|
response = @request_client.conn.delete do |req|
|
148
150
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
149
|
-
req.headers["Authorization"] = request_options.
|
151
|
+
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
150
152
|
req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
|
151
153
|
req.headers = {
|
152
154
|
**(req.headers || {}),
|
@@ -161,7 +163,7 @@ module Ittybit
|
|
161
163
|
end
|
162
164
|
req.url "#{@request_client.get_url(request_options: request_options)}/files/#{id}"
|
163
165
|
end
|
164
|
-
Ittybit::
|
166
|
+
Ittybit::Files::FilesDeleteResponse.from_json(json_object: response.body)
|
165
167
|
end
|
166
168
|
|
167
169
|
# Update a file's `filename`, `folder`, `ref`, or `metadata`. Only the specified
|
@@ -173,12 +175,12 @@ module Ittybit
|
|
173
175
|
# @param ref [String]
|
174
176
|
# @param metadata [Hash{String => Object}]
|
175
177
|
# @param request_options [Ittybit::RequestOptions]
|
176
|
-
# @return [Ittybit::
|
178
|
+
# @return [Ittybit::Files::FilesUpdateResponse]
|
177
179
|
# @example
|
178
180
|
# api = Ittybit::Client.new(
|
179
181
|
# base_url: "https://api.example.com",
|
180
182
|
# environment: Ittybit::Environment::DEFAULT,
|
181
|
-
#
|
183
|
+
# api_key: "YOUR_AUTH_TOKEN"
|
182
184
|
# )
|
183
185
|
# api.files.update(
|
184
186
|
# id: "file_abcdefgh1234",
|
@@ -189,7 +191,7 @@ module Ittybit
|
|
189
191
|
def update(id:, folder: nil, filename: nil, ref: nil, metadata: nil, request_options: nil)
|
190
192
|
response = @request_client.conn.patch do |req|
|
191
193
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
192
|
-
req.headers["Authorization"] = request_options.
|
194
|
+
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
193
195
|
req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
|
194
196
|
req.headers = {
|
195
197
|
**(req.headers || {}),
|
@@ -208,7 +210,7 @@ module Ittybit
|
|
208
210
|
}.compact
|
209
211
|
req.url "#{@request_client.get_url(request_options: request_options)}/files/#{id}"
|
210
212
|
end
|
211
|
-
Ittybit::
|
213
|
+
Ittybit::Files::FilesUpdateResponse.from_json(json_object: response.body)
|
212
214
|
end
|
213
215
|
end
|
214
216
|
|
@@ -227,19 +229,19 @@ module Ittybit
|
|
227
229
|
# @param page [Integer]
|
228
230
|
# @param limit [Integer]
|
229
231
|
# @param request_options [Ittybit::RequestOptions]
|
230
|
-
# @return [Ittybit::
|
232
|
+
# @return [Ittybit::Files::FilesListResponse]
|
231
233
|
# @example
|
232
234
|
# api = Ittybit::Client.new(
|
233
235
|
# base_url: "https://api.example.com",
|
234
236
|
# environment: Ittybit::Environment::DEFAULT,
|
235
|
-
#
|
237
|
+
# api_key: "YOUR_AUTH_TOKEN"
|
236
238
|
# )
|
237
239
|
# api.files.list
|
238
240
|
def list(page: nil, limit: nil, request_options: nil)
|
239
241
|
Async do
|
240
242
|
response = @request_client.conn.get do |req|
|
241
243
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
242
|
-
req.headers["Authorization"] = request_options.
|
244
|
+
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
243
245
|
req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
|
244
246
|
req.headers = {
|
245
247
|
**(req.headers || {}),
|
@@ -252,7 +254,7 @@ module Ittybit
|
|
252
254
|
end
|
253
255
|
req.url "#{@request_client.get_url(request_options: request_options)}/files"
|
254
256
|
end
|
255
|
-
Ittybit::
|
257
|
+
Ittybit::Files::FilesListResponse.from_json(json_object: response.body)
|
256
258
|
end
|
257
259
|
end
|
258
260
|
|
@@ -265,24 +267,24 @@ module Ittybit
|
|
265
267
|
# @param ref [String]
|
266
268
|
# @param metadata [Hash{String => Object}]
|
267
269
|
# @param request_options [Ittybit::RequestOptions]
|
268
|
-
# @return [Ittybit::
|
270
|
+
# @return [Ittybit::Files::FilesCreateResponse]
|
269
271
|
# @example
|
270
272
|
# api = Ittybit::Client.new(
|
271
273
|
# base_url: "https://api.example.com",
|
272
274
|
# environment: Ittybit::Environment::DEFAULT,
|
273
|
-
#
|
275
|
+
# api_key: "YOUR_AUTH_TOKEN"
|
274
276
|
# )
|
275
277
|
# api.files.create(
|
276
278
|
# url: "https://ittyb.it/sample.mp4",
|
277
279
|
# folder: "ittybit/samples",
|
278
280
|
# filename: "video.mp4",
|
279
|
-
# metadata: { "
|
281
|
+
# metadata: { "customKey": "your custom value" }
|
280
282
|
# )
|
281
283
|
def create(url:, media_id: nil, folder: nil, filename: nil, ref: nil, metadata: nil, request_options: nil)
|
282
284
|
Async do
|
283
285
|
response = @request_client.conn.post do |req|
|
284
286
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
285
|
-
req.headers["Authorization"] = request_options.
|
287
|
+
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
286
288
|
req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
|
287
289
|
req.headers = {
|
288
290
|
**(req.headers || {}),
|
@@ -303,7 +305,7 @@ module Ittybit
|
|
303
305
|
}.compact
|
304
306
|
req.url "#{@request_client.get_url(request_options: request_options)}/files"
|
305
307
|
end
|
306
|
-
Ittybit::
|
308
|
+
Ittybit::Files::FilesCreateResponse.from_json(json_object: response.body)
|
307
309
|
end
|
308
310
|
end
|
309
311
|
|
@@ -311,19 +313,19 @@ module Ittybit
|
|
311
313
|
#
|
312
314
|
# @param id [String]
|
313
315
|
# @param request_options [Ittybit::RequestOptions]
|
314
|
-
# @return [Ittybit::
|
316
|
+
# @return [Ittybit::Files::FilesGetResponse]
|
315
317
|
# @example
|
316
318
|
# api = Ittybit::Client.new(
|
317
319
|
# base_url: "https://api.example.com",
|
318
320
|
# environment: Ittybit::Environment::DEFAULT,
|
319
|
-
#
|
321
|
+
# api_key: "YOUR_AUTH_TOKEN"
|
320
322
|
# )
|
321
323
|
# api.files.get(id: "file_abcdefgh1234")
|
322
324
|
def get(id:, request_options: nil)
|
323
325
|
Async do
|
324
326
|
response = @request_client.conn.get do |req|
|
325
327
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
326
|
-
req.headers["Authorization"] = request_options.
|
328
|
+
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
327
329
|
req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
|
328
330
|
req.headers = {
|
329
331
|
**(req.headers || {}),
|
@@ -338,7 +340,7 @@ module Ittybit
|
|
338
340
|
end
|
339
341
|
req.url "#{@request_client.get_url(request_options: request_options)}/files/#{id}"
|
340
342
|
end
|
341
|
-
Ittybit::
|
343
|
+
Ittybit::Files::FilesGetResponse.from_json(json_object: response.body)
|
342
344
|
end
|
343
345
|
end
|
344
346
|
|
@@ -346,19 +348,19 @@ module Ittybit
|
|
346
348
|
#
|
347
349
|
# @param id [String]
|
348
350
|
# @param request_options [Ittybit::RequestOptions]
|
349
|
-
# @return [Ittybit::
|
351
|
+
# @return [Ittybit::Files::FilesDeleteResponse]
|
350
352
|
# @example
|
351
353
|
# api = Ittybit::Client.new(
|
352
354
|
# base_url: "https://api.example.com",
|
353
355
|
# environment: Ittybit::Environment::DEFAULT,
|
354
|
-
#
|
356
|
+
# api_key: "YOUR_AUTH_TOKEN"
|
355
357
|
# )
|
356
358
|
# api.files.delete(id: "file_abcdefgh1234")
|
357
359
|
def delete(id:, request_options: nil)
|
358
360
|
Async do
|
359
361
|
response = @request_client.conn.delete do |req|
|
360
362
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
361
|
-
req.headers["Authorization"] = request_options.
|
363
|
+
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
362
364
|
req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
|
363
365
|
req.headers = {
|
364
366
|
**(req.headers || {}),
|
@@ -373,7 +375,7 @@ module Ittybit
|
|
373
375
|
end
|
374
376
|
req.url "#{@request_client.get_url(request_options: request_options)}/files/#{id}"
|
375
377
|
end
|
376
|
-
Ittybit::
|
378
|
+
Ittybit::Files::FilesDeleteResponse.from_json(json_object: response.body)
|
377
379
|
end
|
378
380
|
end
|
379
381
|
|
@@ -386,12 +388,12 @@ module Ittybit
|
|
386
388
|
# @param ref [String]
|
387
389
|
# @param metadata [Hash{String => Object}]
|
388
390
|
# @param request_options [Ittybit::RequestOptions]
|
389
|
-
# @return [Ittybit::
|
391
|
+
# @return [Ittybit::Files::FilesUpdateResponse]
|
390
392
|
# @example
|
391
393
|
# api = Ittybit::Client.new(
|
392
394
|
# base_url: "https://api.example.com",
|
393
395
|
# environment: Ittybit::Environment::DEFAULT,
|
394
|
-
#
|
396
|
+
# api_key: "YOUR_AUTH_TOKEN"
|
395
397
|
# )
|
396
398
|
# api.files.update(
|
397
399
|
# id: "file_abcdefgh1234",
|
@@ -403,7 +405,7 @@ module Ittybit
|
|
403
405
|
Async do
|
404
406
|
response = @request_client.conn.patch do |req|
|
405
407
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
406
|
-
req.headers["Authorization"] = request_options.
|
408
|
+
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
407
409
|
req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
|
408
410
|
req.headers = {
|
409
411
|
**(req.headers || {}),
|
@@ -422,7 +424,7 @@ module Ittybit
|
|
422
424
|
}.compact
|
423
425
|
req.url "#{@request_client.get_url(request_options: request_options)}/files/#{id}"
|
424
426
|
end
|
425
|
-
Ittybit::
|
427
|
+
Ittybit::Files::FilesUpdateResponse.from_json(json_object: response.body)
|
426
428
|
end
|
427
429
|
end
|
428
430
|
end
|