Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: 📝 added docs for get locales
  • Loading branch information
harshithad0703 committed Apr 3, 2024
commit 0e69248ec79a3d9db241dcc2d79ae4d78632cb09
14 changes: 14 additions & 0 deletions lib/stack/contentType/entry/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ export function Entry (http, data) {
* client.stack({ api_key: 'api_key'}).contentType('content_type_uid').entry('uid').setWorkflowStage({ workflow_stage, locale: 'en-us'})
* .then((response) => console.log(response.notice));
*/

this.setWorkflowStage = async ({ workflow_stage, locale }) => {
const publishDetails = {
workflow: { workflow_stage }
Expand All @@ -265,6 +266,19 @@ export function Entry (http, data) {
throw error(err)
}
}

/**
* @description The get locales request allows to get the languages of an entry.
* @memberof Entry
* @func locales
* @returns {Promise<Object>} Response Object.
* @example
* import * as contentstack from '@contentstack/management'
* const client = contentstack.client()
*
* client.stack({ api_key: 'api_key'}).contentType('content_type_uid').entry('uid').locales()
* .then((response) => console.log(response));
*/
this.locales = async () => {
const headers = {}
if (this.stackHeaders) {
Expand Down