@@ -97,13 +97,14 @@ export default function createCdaApi (http, resolveLinksGlobalSetting) {
9797 * Gets an Entry
9898 * @memberof CDAClient
9999 * @param {string } id
100+ * @param {Object= } query - Object with search parameters. In this method it's only useful for `locale`.
100101 * @return {Promise<Entities.Entry> } Promise for an Entry
101102 * @example
102103 * client.getEntry('entryId')
103104 * .then(entry => console.log(entry))
104105 */
105- function getEntry ( id ) {
106- return http . get ( 'entries/' + id )
106+ function getEntry ( id , query = { } ) {
107+ return http . get ( 'entries/' + id , createRequestConfig ( { query : query } ) )
107108 . then ( response => wrapEntry ( response . data ) , errorHandler )
108109 }
109110
@@ -127,13 +128,14 @@ export default function createCdaApi (http, resolveLinksGlobalSetting) {
127128 * Gets an Asset
128129 * @memberof CDAClient
129130 * @param {string } id
131+ * @param {Object= } query - Object with search parameters. In this method it's only useful for `locale`.
130132 * @return {Promise<Entities.Asset> } Promise for an Asset
131133 * @example
132134 * client.getAsset('assetId')
133135 * .then(asset => console.log(asset))
134136 */
135- function getAsset ( id ) {
136- return http . get ( 'assets/' + id )
137+ function getAsset ( id , query = { } ) {
138+ return http . get ( 'assets/' + id , createRequestConfig ( { query : query } ) )
137139 . then ( response => wrapAsset ( response . data ) , errorHandler )
138140 }
139141
0 commit comments