From ad4a8eb1800cfe5efe17737b0be10b3652f50d33 Mon Sep 17 00:00:00 2001 From: golnazads <28757512+golnazads@users.noreply.github.com> Date: Tue, 10 Dec 2024 09:45:58 -0500 Subject: [PATCH] updated text for modified authorlimit defaul --- README.md | 9 +++------ export_with_api.py | 5 +++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 55935f1..8427253 100755 --- a/README.md +++ b/README.md @@ -162,14 +162,11 @@ For example: curl -H "Authorization: Bearer " -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} diff --git a/export_with_api.py b/export_with_api.py index e8fef63..3a29d50 100644 --- a/export_with_api.py +++ b/export_with_api.py @@ -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