Zotero's API allows the details of public collections to be extracted and re-used.
It could be useful for these details to be pull, formatted and presented as part of a simple-site page.
Public collection URLs are in the form: https://www.zotero.org/USERNAME/collections/COLLECTIONCODE
API calls are in the form: https://api.zotero.org/users/USERID/collections/COLLECTIONCODE/items
The USERID is not easy to get from the USERNAME via the API but it can be scraped from any public URL is a section of javascript:
<script type="application/json" id="zotero-web-library-config">
{
"apiConfig": {
"apiAuthorityPart": "api.zotero.org"
},
"streamingApiUrl": "wss:\/\/stream.zotero.org",
"translateUrl": "https:\/\/t0guvf0w17.execute-api.us-east-1.amazonaws.com\/Prod\/",
"libraries": {
"include": [
{
"key": "uUSERID",
"isGroupLibrary": false,
"name": "USER DISPLAY NAME's Library",
"slug": "USERNAME"
}
],
"includeMyLibrary": false,
"includeUserGroups": false
}
} </script>
So given a public URL an extension would need to:
- Scrape the USERID
- Create the API URL
- Pull in the JSON details
- Extract what is needed
- Format an html based list
Some thought swill need to be given to exactly what data is used and how it should be displayed
Zotero's API allows the details of public collections to be extracted and re-used.
It could be useful for these details to be pull, formatted and presented as part of a simple-site page.
Public collection URLs are in the form: https://www.zotero.org/USERNAME/collections/COLLECTIONCODE
API calls are in the form: https://api.zotero.org/users/USERID/collections/COLLECTIONCODE/items
The USERID is not easy to get from the USERNAME via the API but it can be scraped from any public URL is a section of javascript:
So given a public URL an extension would need to:
Some thought swill need to be given to exactly what data is used and how it should be displayed