Skip to content

Commit

Permalink
updated text for modified authorlimit defaul
Browse files Browse the repository at this point in the history
  • Loading branch information
golnazads committed Dec 10, 2024
1 parent 9038a60 commit ad4a8eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,11 @@ For example:
curl -H "Authorization: Bearer <your API token>" -H "Content-Type: application/json" -X POST -d '{"format":"\\\\bibitem[%\\2m%(y)]\\{%za1%y} %\\8l %\\Y,%\\j,%\\V,%\\p"}' https://api.adsabs.harvard.edu/v1/export/convert


## Limiting number of authors and affilations from the UI
A new parameter, `authorlimit`, has been introduced to limit the number of authors and their affiliations returned in exported records. This addresses the growing issue of excessively large author lists, with some papers featuring thousands of authors.

A new optional parameter, `authorlimit`, has been introduced to limit the number of authors and their affiliations returned in exported records. This parameter addresses the growing issue of excessively large author lists, which are becoming increasingly common, with some papers featuring thousands of authors.

The `authorlimit` parameter specifies the maximum number of authors and affiliations to retrieve from Solr and format in the service.

This parameter will be utilized in the ADS UI. However, when using the API, it is optional. If omitted, the service will return all authors and affiliations.
At the request of stakeholders, the `authorlimit` parameter has been set to a default value of 200 in the service. While this default is hardcoded, it remains configurable through both the ADS UI and the API, ensuring flexibility in controlling the number of authors and affiliations displayed based on user needs.

If the authorlimit parameter is omitted when using the API, the default value of 200 will apply. However, as mentioned, users can override this limit by explicitly specifying their desired value in the API request.

{"bibcode": ["1980ApJS...44..137K", "1980ApJS...44..489B"], "authorlimit": 500}

Expand Down
5 changes: 3 additions & 2 deletions export_with_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ def get_records_export(data, endpoint):
identifiers = [doc['bibcode'] for doc in docs]
data = {"bibcode": identifiers}

# 2- include optional parameters (the same for all the formats), skip otherwise
data.update({"sort": "date desc, bibcode desc", "authorlimit": 500})
# 2 - include optional parameters (applicable to all formats); skip if not needed
# default values for these optional parameters are set below and can be modified as needed
data.update({"sort": "date desc, bibcode desc", "authorlimit": 200})

# 3- optional/required parameters for some of the export formats (ie, BibTex has an optional parameter keyformat)
# check the readme for the parameter(s) of your selected format
Expand Down

0 comments on commit ad4a8eb

Please sign in to comment.