BioData / LabguruPython

Labguru API via Python
MIT License
14 stars 9 forks source link

list_inventory_items ignores page_num argument #11

Open johnbachman opened 2 years ago

johnbachman commented 2 years ago

Hi, when I use list_inventory_items to query the API for Bacteria, it seems to ignore the page_num argument and only gives me the first page of results. When I made the request directly through the API at https://my.labguru.com/api-docs/index.html it worked as expected.

Inspection of the code for list_inventory_items here points to the list method of InventoryItem here and in turn to the find method of Response, here.

The page_num arg is passed as one of the kwargs to find, but it doesn't look like it's actually used there. kwargs is only passed to filter_none, which doesn't do anything with paging.

uri-tayvah commented 1 year ago

I'm having a similar issue with list_experiments (changing the page_num argument doesn't change the response). When I make the request on the website like John mentioned, it looks like it uses a different parameter (page instead of page_num). I think this is the issue since when I changed page_num to page here, the function works as expected.

pelleImu commented 1 week ago

I can confirm @uri-tayvah change "fixes" the issue