Interface CloudwordsAPI

Description

Client interface for the Cloudwords API. For more details and best practices please refer to the Cloudwords API documentation found at http://www.cloudwords.com/developers.

This API is primarily designed to:

  • Create and update a Cloudwords project
  • Upload and download of a project's source content and reference materials
  • Request bids for a project
  • Download translated content (both by individual language and via the aggragated "master deliverable" that contains all deliverables across all languages)

Located in /cloudwords_api.php (line 33)


	
			
Method Summary
CloudwordsProject create_project (array $project)
resource download_file_from_metadata (array $metadata)
resource download_master_translated_file (integer $project_id)
resource download_reference_file (integer $project_id, integer $document_id)
resource download_source_file (integer $project_id)
resource download_translated_file (integer $project_id, string $language)
CloudwordsProject get_project (integer $project_id)
CloudwordsFile get_project_reference (integer $project_id, integer $document_id)
array get_project_references (integer $project_id)
CloudwordsFile get_project_source (integer $project_id)
CloudwordsFile get_project_translated_file (integer $project_id, string $language)
array get_project_translated_files (integer $project_id)
CloudwordsVendor get_vendor (integer $vendor_id)
CloudwordsBidRequest request_bids_for_project (integer $project_id, array $preferred_vendors, boolean $do_let_cloudwords_choose)
CloudwordsProject update_project (array $project)
CloudwordsFile update_project_reference (integer $project_id, integer $document_id, string $zip_file)
CloudwordsFile upload_project_reference (integer $project_id, string $zip_file)
CloudwordsFile upload_project_source (integer $project_id, string $zip_file)
Methods
create_project (line 69)

Create a new Cloudwords project.

  • return: The newly created project resource
  • throws: CloudwordsApiException
  • access: public
CloudwordsProject create_project (array $project)
  • array $project: The project resource to be created
download_file_from_metadata (line 255)

Convenience method to download the binary content of a Cloudwords file, provided that the contentPath inside the metadata is valid.

  • return: The file if the file exists
  • throws: CloudwordsApiException
  • access: public
resource download_file_from_metadata (array $metadata)
  • array $metadata: The specific file to download content for
download_master_translated_file (line 233)

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).

  • return: The file if reference file exists
  • throws: CloudwordsApiException
  • access: public
resource download_master_translated_file (integer $project_id)
  • integer $project_id: The id of the project to download the master translated file for
download_reference_file (line 185)

Download the specified project reference material binary, provided that such reference material exists for the project.

  • return: The file if reference file exists
  • throws: CloudwordsApiException
  • access: public
resource download_reference_file (integer $project_id, integer $document_id)
  • integer $project_id: The id of the project to download reference material for
  • integer $document_id: The id of the specific reference material to download
download_source_file (line 119)

Download the source material binary for the specified project, provided that a source material exists for the project.

  • return: The binary content of the file
  • throws: CloudwordsApiException
  • access: public
resource download_source_file (integer $project_id)
  • integer $project_id: The id of project to download source for
download_translated_file (line 245)

Download the specified translated material binary for the specified Cloudwords project and target language, provided that such translated material exists for the project.

  • return: The file if reference file exists
  • throws: CloudwordsApiException
  • access: public
resource download_translated_file (integer $project_id, string $language)
  • integer $project_id: The id of the project to get the translated file for
  • string $language: The specific language
get_closed_projects (line 49)

Get the list of closed projects in Cloudwords.

  • return: The list of closed customer project resources
  • throws: CloudwordsApiException
  • access: public
array get_closed_projects ()
get_current_bid_request_for_project (line 283)

Get the current bid request for the specified project.

  • return: The current bid request resource for the project if bids have already been requested for this project
  • throws: CloudwordsApiException
  • access: public
CloudwordsBidRequest get_current_bid_request_for_project (integer $project_id)
  • integer $project_id: The id of the project to get the bid request for
get_intended_uses (line 315)

Get the list of target intended uses currently configured in Cloudwords.

  • return: The list of customer intended use resources
  • throws: CloudwordsApiException
  • access: public
array get_intended_uses ()
get_master_project_translated_file (line 197)

Get the current master project translation file metadata, including a contentPath for downloading the actual binary file.

The master project translation file contains all of the current project language(s) translations in one bundled zip. To get an individual language translation file's metadata, use get_project_translated_file(int, language).

  • return: The master translated Cloudwords file resource
  • throws: CloudwordsApiException
  • access: public
CloudwordsFile get_master_project_translated_file (integer $project_id)
  • integer $project_id: The id of the project to get the master file for
get_open_projects (line 41)

Get the list of open projects in Cloudwords.

  • return: The list of open customer project resources
  • throws: CloudwordsApiException
  • access: public
array get_open_projects ()
get_preferred_vendors (line 291)

Get the list of preferred vendors currently configured in Cloudwords.

  • return: The list of preferred vendor resources
  • throws: CloudwordsApiException
  • access: public
array get_preferred_vendors ()
get_project (line 59)

Get the Cloudwords project associated with the unique Cloudwords project id.

  • return: The project resource
  • throws: CloudwordsApiException
  • access: public
CloudwordsProject get_project (integer $project_id)
  • integer $project_id: The project id
get_project_reference (line 174)

Get the specified project reference material metadata. The metadata will contain a contentPath for downloading the actual binary file.

  • return: The reference material for the Cloudwords file resource
  • throws: CloudwordsApiException
  • access: public
CloudwordsFile get_project_reference (integer $project_id, integer $document_id)
  • integer $project_id: The id of the project to get reference material for
  • integer $document_id: The id of the specific reference material to return
get_project_references (line 162)

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.

  • return: The list of project reference material Cloudwords file resources
  • throws: CloudwordsApiException
  • access: public
array get_project_references (integer $project_id)
  • integer $project_id: The id of the project to return reference materials for
get_project_source (line 109)

Get the project's source material for a Cloudwords file resource for the specified Cloudwords project id.

The metadata will contain a contentPath for downloading the actual binary file.

  • return: The project source for the Cloudwords file resource
  • throws: CloudwordsApiException
  • access: public
CloudwordsFile get_project_source (integer $project_id)
  • integer $project_id: The id of the project to return source materials for
get_project_translated_file (line 221)

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.

  • return: The translated project file for the specified language
  • throws: CloudwordsApiException
  • access: public
CloudwordsFile get_project_translated_file (integer $project_id, string $language)
  • integer $project_id: The id of the project to get the translated file for
  • string $language: The specific language
get_project_translated_files (line 209)

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.

  • return: The list of translated project Cloudwords language file resources
  • throws: CloudwordsApiException
  • access: public
array get_project_translated_files (integer $project_id)
  • integer $project_id: The id of the project to get the translated files for
get_source_languages (line 299)

Get the list of source languages currently configured in Cloudwords.

  • return: The list of customer source language resources
  • throws: CloudwordsApiException
  • access: public
array get_source_languages ()
get_target_languages (line 307)

Get the list of target languages currently configured in Cloudwords.

  • return: The list of customer target language resources
  • throws: CloudwordsApiException
  • access: public
array get_target_languages ()
get_vendor (line 325)

Get the Cloudwords vendor by the unique Cloudwords vendor id.

  • return: The specified vendor
  • throws: CloudwordsApiException
  • access: public
CloudwordsVendor get_vendor (integer $vendor_id)
  • integer $vendor_id: The id of the vendor
request_bids_for_project (line 273)

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.

Additionally, you must either specify the list of Cloudwords preferred vendor(s) to request bids from or to allow Cloudwords to automatically find vendors that best match the project requirements, or both.

Please refer to the API documentation for more information.

  • return: The created bid request resource
  • throws: CloudwordsApiException
  • access: public
CloudwordsBidRequest request_bids_for_project (integer $project_id, array $preferred_vendors, boolean $do_let_cloudwords_choose)
  • integer $project_id: The id of the project to request bids for
  • array $preferred_vendors: The list of vendors to request bids from
  • boolean $do_let_cloudwords_choose: Allow Cloudwords to find vendor that best match the project
update_project (line 81)

Update the project specified in the input project id with the content represented by the input.

Please note that there are various restrictions as to what and when a project can be updated in Cloudwords. Please refer to API documentation for more detail.

  • return: The updated project resource
  • throws: CloudwordsApiException
  • access: public
CloudwordsProject update_project (array $project)
  • array $project: The project to update
update_project_reference (line 151)

Upload and replace project reference material for the specified Cloudwords project and specific reference material. The provided file must be a zip file.

Please note that this project must already exists in Cloudwords, and the project must be in a state where reference material can be uploaded. Please refer to the API documentation for more information.

  • return: The updated reference material for a Cloudwords file resource
  • throws: CloudwordsApiException
  • access: public
CloudwordsFile update_project_reference (integer $project_id, integer $document_id, string $zip_file)
  • integer $project_id: The id of the project whose reference materials are to be updated
  • integer $document_id: The id of the specific reference material to update
  • string $zip_file: A zip file to be uploaded for this project
upload_project_reference (line 134)

Upload and add a new reference material for a given Cloudwords project. The provided file must be a zip file.

Please note that this project must already exists in Cloudwords, and the project must be in a state where reference material can be uploaded. Please refer to the API documentation for more information.

  • return: The uploaded reference material for the Cloudwords file resource
  • throws: CloudwordsApiException
  • access: public
CloudwordsFile upload_project_reference (integer $project_id, string $zip_file)
  • integer $project_id: The id of the project to upload reference materials for
  • string $zip_file: A zip file to be uploaded for this project
upload_project_source (line 98)

Upload the source material for a given Cloudwords project. The provided file must be a zip file.

Please note that this project must already exists in Cloudwords, and the project must be in a state where source material can be uploaded. If source material for this project already exists, then this operation will overwrite the source material associated with the project. Please refer to the API documentation for more information.

  • return: The uploaded source material for a Cloudwords file resource
  • throws: CloudwordsApiException
  • access: public
CloudwordsFile upload_project_source (integer $project_id, string $zip_file)
  • integer $project_id: The id of the project to upload source for
  • string $zip_file: The zip file to be uploaded for this project

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