libraries.io icon indicating copy to clipboard operation
libraries.io copied to clipboard

Can't use API to set or update include_prerelease to False - possible bug

Open discdiver opened this issue 6 years ago • 2 comments

Thank you for this project! I

I can subscribe to a package via the API, but can't set include_prerelease to False.

Sending via POST with params doesn't work, and neither does sending 'include_prerelease':'false' as data. (I'm using Python requests).

Post content with the params method:

https://libraries.io/api/subscriptions/pypi/pandas?include_prerelease=False&api_key=xyz123

always returns include_prerelease: True.

Same situation for PUT when trying to update a subscription.

Is this a bug or am I doing something wrong?

API Docs say:

Subscribe to a project Subscribe to receive notifications about new releases of a project.

Parameters: include_prerelease

The docs don't show an example using include_prerelease. Same with the Update method.

I've looked through the code base and not found any obvious cause.

FYI, I'm able to change the subscription setting from the libraries.io GUI and see that change reflected when I query from the command line.

discdiver avatar May 24 '19 16:05 discdiver

same result if use CURL from the command line with

curl -X POST https://libraries.io/api/subscriptions/pypi/pandas?api_key=*******&include_prerelease=False

discdiver avatar May 24 '19 16:05 discdiver

For what it's worth:

curl -d "include_prerelease=False" -X POST  https://libraries.io/api/subscriptio
ns/pypi/pandas?api_key=****

Results in

{"error":"Error 403, you don't have permissions for this operation."}

discdiver avatar May 24 '19 16:05 discdiver