@@ -97,13 +97,14 @@ export default function createCdaApi (http, resolveLinksGlobalSetting) {
97
97
* Gets an Entry
98
98
* @memberof CDAClient
99
99
* @param {string } id
100
+ * @param {Object= } query - Object with search parameters. In this method it's only useful for `locale`.
100
101
* @return {Promise<Entities.Entry> } Promise for an Entry
101
102
* @example
102
103
* client.getEntry('entryId')
103
104
* .then(entry => console.log(entry))
104
105
*/
105
- function getEntry ( id ) {
106
- return http . get ( 'entries/' + id )
106
+ function getEntry ( id , query = { } ) {
107
+ return http . get ( 'entries/' + id , createRequestConfig ( { query : query } ) )
107
108
. then ( response => wrapEntry ( response . data ) , errorHandler )
108
109
}
109
110
@@ -127,13 +128,14 @@ export default function createCdaApi (http, resolveLinksGlobalSetting) {
127
128
* Gets an Asset
128
129
* @memberof CDAClient
129
130
* @param {string } id
131
+ * @param {Object= } query - Object with search parameters. In this method it's only useful for `locale`.
130
132
* @return {Promise<Entities.Asset> } Promise for an Asset
131
133
* @example
132
134
* client.getAsset('assetId')
133
135
* .then(asset => console.log(asset))
134
136
*/
135
- function getAsset ( id ) {
136
- return http . get ( 'assets/' + id )
137
+ function getAsset ( id , query = { } ) {
138
+ return http . get ( 'assets/' + id , createRequestConfig ( { query : query } ) )
137
139
. then ( response => wrapAsset ( response . data ) , errorHandler )
138
140
}
139
141
0 commit comments