File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,17 @@ class ApiResponse {
5555 return null ;
5656 }
5757
58+ /**
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+
5869 /**
5970 * Value of the "Last-Modified-Version" header in response if present. Specialised classes provide
6071 version depending on context
@@ -144,6 +155,14 @@ module:zotero-api-client~MultiReadResponse#getData}
144155 return this . raw . map ( r => 'meta' in r && r . meta || null ) ;
145156 }
146157
158+ /**
159+ * @return {Array } a list of formatted references (if requested via `options.include=bib`), indexes of the array match indexes of entities in {@link
160+ module:zotero-api-client~MultiReadResponse#getData}
161+ */
162+ getBib ( ) {
163+ return this . raw . map ( r => 'bib' in r && r . bib || null ) ;
164+ }
165+
147166 /**
148167 * @return {?number } Total number of results
149168 */
You can’t perform that action at this time.
0 commit comments