You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/stack/contentType/entry/index.js
+61Lines changed: 61 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ import { create,
12
12
importFormDatafrom'form-data'
13
13
import{createReadStream}from'fs'
14
14
importerrorfrom'../../../core/contentstackError'
15
+
import{Variants}from'./variants/index'
15
16
16
17
/**
17
18
* An entry is the actual piece of content created using one of the defined content types. Read more about <a href='https://www.contentstack.com/docs/guide/content-management'>Entries</a>.
@@ -265,6 +266,66 @@ export function Entry (http, data) {
265
266
throwerror(err)
266
267
}
267
268
}
269
+
270
+
/**
271
+
* @description The variants requestan entry call is used to fetch a specific entry with variants from a content type.
272
+
* @memberof Entry
273
+
* @func variants
274
+
* @returns {Promise<Object>} Response Object.
275
+
* @param {Object} publishing_rule Details for the publish request
276
+
* @param {String} locale Enter the code of the locale that the entry belongs to.
277
+
* @example
278
+
* import * as contentstack from '@contentstack/management'
* An variants is the actual piece of content created using one of the defined content types. Read more about <a href='https://www.contentstack.com/docs/guide/content-management'>Entries</a>.
* @description The Query on Variants will allow to fetch details of all or specific Variants
129
+
* @memberof Variants
130
+
* @func query
131
+
* @param {Int} locale Enter the code of the language of which the entries need to be included. Only the entries published in this locale will be displayed.
132
+
* @param {Object} query Queries that you can use to fetch filtered results.
133
+
* @returns {Array<Variants>} Array of Variants.
134
+
*
135
+
* @example
136
+
* import * as contentstack from '@contentstack/management'
0 commit comments