Project
Log in to add to favouritesPage last updated 10 December 2024
A project resource can be retrieved from the Delivery API and could be used to find the languages that the project supports and determine which language is the primary language
Properties
| Name | Type | Format | Description |
|---|---|---|---|
| id | string | The project identifier, e.g. "movieDb". Found in the project overview screen of the management console. | |
| name | string | The friendly name given to the project. | |
| description | string | The description text given to a project. | |
| supportedLanguages | string […] | An array of all the languages supported by the project. | |
| primaryLanguage | string | Language code | The primary language for the project. |
Example
// Using TypeScript, or ES Module await syntax
const project = await client.project.get();
console.log(project.name);
console.log(project.primaryLanguage);
console.log(project.supportedLanguages);// Using Common JS promise callback syntax
client.project.get()
.then(function(project) {
console.log(currentProject.name);
console.log(currentProject.primaryLanguage);
console.log(currentProject.supportedLanguages);
});