Convenience constructor that provides default configuration.
CloudwordsClient
__construct
(string $base_api_url, integer $version, string $auth_token)
-
string
$base_api_url: The base domain of the Cloudwords API
-
integer
$version: The version of the Cloudwords API to use
-
string
$auth_token: The authorization token to validate identify when accessing the Cloudwords API
void
download_file_from_metadata
( $metadata)
Implementation of:
- CloudwordsAPI::download_file_from_metadata()
- Convenience method to download the binary content of a Cloudwords file, provided that the contentPath inside the metadata is valid.
void
download_master_translated_file
( $project_id)
Implementation of:
- CloudwordsAPI::download_master_translated_file()
- Download the current master translated material binary for the specified Cloudwords project, provided that such translated material exists for the project. The master project translation file contains all of the current project language(s) translation in one bundled zip. To download an individual language translation file, use download_translated_file(int, language).
void
download_reference_file
( $project_id, $document_id)
Implementation of:
- CloudwordsAPI::download_reference_file()
- Download the specified project reference material binary, provided that such reference material exists for the project.
void
download_source_file
( $project_id)
Implementation of:
- CloudwordsAPI::download_source_file()
- Download the source material binary for the specified project, provided that a source material exists for the project.
void
download_translated_file
( $project_id, $language)
Implementation of:
- CloudwordsAPI::download_translated_file()
- Download the specified translated material binary for the specified Cloudwords project and target language, provided that such translated material exists for the project.
Public methods
void
getBaseUrlWithVersion
()
void
getConnectionTimeout
()
void
getMaxTotalConnections
()
void
get_project
( $project_id)
Implementation of:
- CloudwordsAPI::get_project()
- Get the Cloudwords project associated with the unique Cloudwords project id.
void
get_project_reference
( $project_id, $document_id)
Implementation of:
- CloudwordsAPI::get_project_reference()
- Get the specified project reference material metadata. The metadata will contain a contentPath for downloading the actual binary file.
void
get_project_references
( $project_id)
Implementation of:
- CloudwordsAPI::get_project_references()
- Get the list of project reference material metadata for the specified Cloudwords project. Each item in the returned list will contain a contentPath for downloading the respective binary file.
void
get_project_source
( $project_id)
Implementation of:
- CloudwordsAPI::get_project_source()
- Get the project's source material for a Cloudwords file resource for the specified Cloudwords project id.
void
get_project_translated_file
( $project_id, $language)
Implementation of:
- CloudwordsAPI::get_project_translated_file()
- Get the the current translated project file metadata for the specified Cloudwords project and target language. The returned metadata will contain a contentPath for downloading the actual binary files.
void
get_project_translated_files
( $project_id)
Implementation of:
- CloudwordsAPI::get_project_translated_files()
- Get the list of current project language translation files' metadata for the specified Cloudwords project. Each metadata representation in the list will be specific to a project target language and contain a contentPath for downloading the respective binary file.
void
get_vendor
( $vendor_id)
Implementation of:
- CloudwordsAPI::get_vendor()
- Get the Cloudwords vendor by the unique Cloudwords vendor id.
void
request_bids_for_project
( $project_id, $preferred_vendors, $do_let_cloudwords_choose)
-
$project_id
-
$preferred_vendors
-
$do_let_cloudwords_choose
Implementation of:
- CloudwordsAPI::request_bids_for_project()
- Request bids for the specified project. In order to request a bid for a project, a source material must be already uploaded for the project, and the project must be in a state where requesting bids is allowed.
void
update_project
( $params)
Implementation of:
- CloudwordsAPI::update_project()
- Update the project specified in the input project id with the content represented by the input.
void
update_project_reference
( $project_id, $document_id, $zip_file)
-
$project_id
-
$document_id
-
$zip_file
Implementation of:
- CloudwordsAPI::update_project_reference()
- Upload and replace project reference material for the specified Cloudwords project and specific reference material. The provided file must be a zip file.
void
upload_project_reference
( $project_id, $zip_file)
Implementation of:
- CloudwordsAPI::upload_project_reference()
- Upload and add a new reference material for a given Cloudwords project. The provided file must be a zip file.
void
upload_project_source
( $project_id, $zip_file)
Implementation of:
- CloudwordsAPI::upload_project_source()
- Upload the source material for a given Cloudwords project. The provided file must be a zip file.