|
Lines 11-35
export class CataloguingAPIClient extends HttpClient {
Link Here
|
| 11 |
return { |
11 |
return { |
| 12 |
create: bib_info => |
12 |
create: bib_info => |
| 13 |
this.post({ |
13 |
this.post({ |
| 14 |
endpoint: "new_bib/frameworkcode=%s".format( bib_info.frameworkcode ), |
14 |
endpoint: "new_bib/frameworkcode=%s".format( |
|
|
15 |
bib_info.frameworkcode |
| 16 |
), |
| 15 |
body: bib_info.record.toXML(), |
17 |
body: bib_info.record.toXML(), |
| 16 |
headers: { |
18 |
headers: { |
| 17 |
"Content-Type": |
19 |
"Content-Type": "text/xml", |
| 18 |
"text/xml", |
|
|
| 19 |
}, |
20 |
}, |
| 20 |
}), |
21 |
}), |
| 21 |
update: bib_info => |
22 |
update: bib_info => |
| 22 |
this.post({ |
23 |
this.post({ |
| 23 |
endpoint: "bib/%s?frameworkcode=%s".format( bib_info.id, bib_info.frameworkcode ), |
24 |
endpoint: "bib/%s?frameworkcode=%s".format( |
|
|
25 |
bib_info.id, |
| 26 |
bib_info.frameworkcode |
| 27 |
), |
| 24 |
body: bib_info.record.toXML(), |
28 |
body: bib_info.record.toXML(), |
| 25 |
headers: { |
29 |
headers: { |
| 26 |
"Content-Type": |
30 |
"Content-Type": "text/xml", |
| 27 |
"text/xml", |
|
|
| 28 |
}, |
31 |
}, |
| 29 |
}), |
32 |
}), |
| 30 |
}; |
33 |
}; |
| 31 |
} |
34 |
} |
| 32 |
|
|
|
| 33 |
} |
35 |
} |
| 34 |
|
36 |
|
| 35 |
export default CataloguingAPIClient; |
37 |
export default CataloguingAPIClient; |
| 36 |
- |
|
|