Comments (6)
Thanks for showing interest. This type of question is more appropriate for the ADS github pages, as this library doesn't support ADS libraries (https://github.com/adsabs).
However, here's a quick answer. As the error message states, there's something wrong with your usage of the API. You can see how to use the API at the dev-api pages: https://github.com/adsabs/adsabs-dev-api/blob/master/libraries.md. What you're trying to do should look something like this (didn't check, but should work after some tweaking):
import requests
library_id = 'library ID'
ads_token = 'my token'
r = requests.post(
'https://api.adsabs.harvard.edu/v1/biblib/documents/{}'.format(library_id),
data={
'bibcode': ['2016yCat..35970030A'],
'action': 'add'
},
headers={'Authorization: Bearer {}'.format(ads_token)}
)
You can find more details at this set of un-merged documentation: https://github.com/adsabs/adsabs.github.io/blob/new-api/content/v1/libraries.md. Or you can look at how the tests used the API: https://github.com/adsabs/biblib-service/blob/master/biblib/tests/
from ads.
Should also add -- is there any need to include this in the API, over say, BigQuery?
from ads.
What is the signature of LibraryQuery()
? I guess you could pass it a "query" that corresponds to a specific user? I'd like to question if it makes sense copy the SearchQuery
interface for this feature.
Did you have any specific input you needed?
from ads.
At the moment there's no search functionality for libraries on the ADS side. Token -> user's libraries. You can request/access someone else's library if it's public (and you know the ID).
LibrarQuery was just to keep a similar format to the other query classes, but doesn't have to be that way.
Input: would anyone even use this, it's a relatively large addition, which is only worth it if it's useful. I can think of other things like BigQuery that is most likely less work and less complex.
from ads.
Not sure how to gauge interest in libraries-- I'd say go for it if you're keen on adding it personally.
I have noticed the big query use case come up many times though.
from ads.
I would like to use libraries API. More precisely, I need an option to add papers to the library.
Cannot make it running directly via API somehow - I get
{'error': 'You passed the wrong type. See the API documentation: http://adsabs.github.io/help/api/'}
when I try to post something like
https://api.adsabs.harvard.edu/v1/biblib/documents/...id...?action=add&bibcode=2016yCat..35970030A
from ads.
Related Issues (20)
- Feature Request: search by arxiv-id HOT 7
- Non-lazy loading leads to missing properties in SeachQuery HOT 2
- `ads.SearchQuery` returns a status 500 APIResponseError HOT 6
- SearchQuery not respecting start parameter HOT 27
- docs: link to available search field needs updating HOT 3
- author_count return None HOT 3
- How do you search on a range of years? HOT 1
- citation_count returns None HOT 2
- Missing paper.journal attribute HOT 1
- Missing .adsurl attribute HOT 1
- API Response Error HOT 2
- Search parameters wrapped in parentheses should not be auto-quoted
- readthedocs rendering is broken HOT 2
- support for Positional Field Searches HOT 1
- ExportQuery not working properly HOT 1
- Not able to use timeAllowed and cursorMark combination HOT 1
- Why is the total number of filtered articles and citation_count cumulative number inconsistent with manual searches? HOT 1
- API Response Error while running example HOT 1
- ads version 0.12.3 not working with python 3.8 HOT 2
- Over-dependency on `httpready` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ads.