Class CloudwordsClient

Description

Implements interfaces:

Basic implementation of the Cloudwords API client.

Located in /cloudwords_client.php (line 37)


	
			
Class Constant Summary
 AUTHORIZATION_HEADER = 'Authorization: '
 CONTENT_TYPE_HEADER = 'Content-Type: '
 CONTENT_TYPE_JSON = 'application/json'
 CONTENT_TYPE_MULTIPART_FORM_DATA = 'multipart/form-data'
Method Summary
CloudwordsClient __construct (string $base_api_url, integer $version, string $auth_token)
void create_project ( $params)
void download_file_from_metadata ( $metadata)
void download_master_translated_file ( $project_id)
void download_reference_file ( $project_id,  $document_id)
void download_source_file ( $project_id)
void download_translated_file ( $project_id,  $language)
void getAuthToken ()
void get_master_project_translated_file ( $project_id)
void get_project ( $project_id)
void get_project_reference ( $project_id,  $document_id)
void get_project_references ( $project_id)
void get_project_source ( $project_id)
void get_project_translated_file ( $project_id,  $language)
void get_project_translated_files ( $project_id)
void get_vendor ( $vendor_id)
void request_bids_for_project ( $project_id,  $preferred_vendors,  $do_let_cloudwords_choose)
void update_project ( $params)
void update_project_reference ( $project_id,  $document_id,  $zip_file)
void upload_project_reference ( $project_id,  $zip_file)
void upload_project_source ( $project_id,  $zip_file)
Methods
Constructor __construct (line 79)

Convenience constructor that provides default configuration.

  • access: public
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
create_project (line 222)
  • access: public
void create_project ( $params)
  • $params

Implementation of:
CloudwordsAPI::create_project()
Create a new Cloudwords project.
download_file_from_metadata (line 308)
  • access: public
void download_file_from_metadata ( $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.
download_master_translated_file (line 284)
  • access: public
void download_master_translated_file ( $project_id)
  • $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).
download_reference_file (line 274)
  • access: public
void download_reference_file ( $project_id,  $document_id)
  • $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.
download_source_file (line 243)
  • access: public
void download_source_file ( $project_id)
  • $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.
download_translated_file (line 303)
  • access: public
void download_translated_file ( $project_id,  $language)
  • $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.
getAuthToken (line 183)
  • access: public
void getAuthToken ()
getBaseUrlWithVersion (line 179)

Public methods

  • access: public
void getBaseUrlWithVersion ()
getConnectionTimeout (line 187)
  • access: public
void getConnectionTimeout ()
getMaxTotalConnections (line 195)
  • access: public
void getMaxTotalConnections ()
getSocketTimeout (line 191)
  • access: public
void getSocketTimeout ()
get_closed_projects (line 208)
  • access: public
void get_closed_projects ()

Implementation of:
CloudwordsAPI::get_closed_projects()
Get the list of closed projects in Cloudwords.
get_current_bid_request_for_project (line 322)
  • access: public
void get_current_bid_request_for_project ( $project_id)
  • $project_id

Implementation of:
CloudwordsAPI::get_current_bid_request_for_project()
Get the current bid request for the specified project.
get_intended_uses (line 354)
  • access: public
void get_intended_uses ()

Implementation of:
CloudwordsAPI::get_intended_uses()
Get the list of target intended uses currently configured in Cloudwords.
get_master_project_translated_file (line 279)
  • access: public
void get_master_project_translated_file ( $project_id)
  • $project_id

Implementation of:
CloudwordsAPI::get_master_project_translated_file()
Get the current master project translation file metadata, including a contentPath for downloading the actual binary file.
get_open_projects (line 199)
  • access: public
void get_open_projects ()

Implementation of:
CloudwordsAPI::get_open_projects()
Get the list of open projects in Cloudwords.
get_preferred_vendors (line 327)
  • access: public
void get_preferred_vendors ()

Implementation of:
CloudwordsAPI::get_preferred_vendors()
Get the list of preferred vendors currently configured in Cloudwords.
get_project (line 217)
  • access: public
void get_project ( $project_id)
  • $project_id

Implementation of:
CloudwordsAPI::get_project()
Get the Cloudwords project associated with the unique Cloudwords project id.
get_project_reference (line 269)
  • access: public
void get_project_reference ( $project_id,  $document_id)
  • $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.
get_project_references (line 260)
  • access: public
void get_project_references ( $project_id)
  • $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.
get_project_source (line 238)
  • access: public
void get_project_source ( $project_id)
  • $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.
get_project_translated_file (line 298)
  • access: public
void get_project_translated_file ( $project_id,  $language)
  • $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.
get_project_translated_files (line 289)
  • access: public
void get_project_translated_files ( $project_id)
  • $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.
get_source_languages (line 336)
  • access: public
void get_source_languages ()

Implementation of:
CloudwordsAPI::get_source_languages()
Get the list of source languages currently configured in Cloudwords.
get_target_languages (line 345)
  • access: public
void get_target_languages ()

Implementation of:
CloudwordsAPI::get_target_languages()
Get the list of target languages currently configured in Cloudwords.
get_vendor (line 363)
  • access: public
void get_vendor ( $vendor_id)
  • $vendor_id

Implementation of:
CloudwordsAPI::get_vendor()
Get the Cloudwords vendor by the unique Cloudwords vendor id.
request_bids_for_project (line 315)
  • access: public
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.
update_project (line 227)
  • access: public
void update_project ( $params)
  • $params

Implementation of:
CloudwordsAPI::update_project()
Update the project specified in the input project id with the content represented by the input.
update_project_reference (line 254)
  • access: public
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.
upload_project_reference (line 248)
  • access: public
void upload_project_reference ( $project_id,  $zip_file)
  • $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.
upload_project_source (line 232)
  • access: public
void upload_project_source ( $project_id,  $zip_file)
  • $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.
Class Constants
AUTHORIZATION_HEADER = 'Authorization: ' (line 42)

Constants

CONTENT_TYPE_HEADER = 'Content-Type: ' (line 43)
CONTENT_TYPE_JSON = 'application/json' (line 44)
CONTENT_TYPE_MULTIPART_FORM_DATA = 'multipart/form-data' (line 45)
REQUEST_TYPE_GET = 'GET' (line 46)
REQUEST_TYPE_POST = 'POST' (line 47)
REQUEST_TYPE_PUT = 'PUT' (line 48)

Documentation generated on Fri, 05 Aug 2011 11:54:18 -0700 by phpDocumentor 1.4.3