Skip to main content

Get the current project

Log in to add to favourites

Call the project.get() method in our delivery client to get the current project

Call signature

TypeScript
get(): Promise<Project>

Returns

A Promise that will resolve with the Project

Example

TypeScript
// 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);
JavaScript
// Using Common JS promise callback syntax
client.project.get()
  .then(function(project) {
    console.log(currentProject.name);
    console.log(currentProject.primaryLanguage);
    console.log(currentProject.supportedLanguages);
  });

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request