File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed
Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,18 @@ class ApiResponse {
5656 }
5757
5858 /**
59- * Value of "Last-Modified-Version" header in response if present. Specialised classes provide
59+ * Bib available in the response if requested via `options.include=bib`. Specialised classes provide extracted meta data depending on context.
60+ * @return {object }
61+ */
62+ getBib ( ) {
63+ if ( 'bib' in this . raw ) {
64+ return this . raw . bib ;
65+ }
66+ return null ;
67+ }
68+
69+ /**
70+ * Value of "Last-Modified-Version" header in response if present. Specialised classes provide
6071 version depending on context
6172 * @return {?number } Version of the content in response
6273 */
@@ -143,8 +154,16 @@ module:zotero-api-client~MultiReadResponse#getData}
143154 }
144155
145156 /**
146- * @return {string } Total number of results
147- */
157+ * @return {Array } a list of formatted references (if requested via `options.include=bib`), indexes of the array match indexes of entities in {@link
158+ module:zotero-api-client~MultiReadResponse#getData}
159+ */
160+ getBib ( ) {
161+ return this . raw . map ( r => 'bib' in r && r . bib || null ) ;
162+ }
163+
164+ /**
165+ * @return {string } Total number of results
166+ */
148167 getTotalResults ( ) {
149168 return parseIntHeaders ( this . response . headers , 'Total-Results' ) ;
150169 }
You can’t perform that action at this time.
0 commit comments