Closed LordGiacomoS closed 2 years ago
I have tested it and work.collections
seems to be working great! Calling work.collect(...)
works but always raises an error;
That's why I said it only mostly works... I plan to try and figure out how to fix that in the next few days, but thought that I might as well share what I had since it technically works and only thinks it doesn't. I likely just need to do some testing to see which HTTPS codes would represent actual issues (as they're apparently different than work.bookmark
).
This should fix the issues with HTTP code 200 being seen as problematic, while maintaining functionality of other errors being raised.
Alright, I just found a major issue that I'm going to try and figure out a fix for: Currently, the API can't tell if the collection it tries to add a work to is valid, outputting HTTP code 200 either way.
Okay, this should finally all be working properly, but this branch still does not have the ability to interact and manage items already in collections (i.e. approving works to be added, removing works from collections, listing the works in a collection). Addressing the management of existing collections will likely be done in a separate pull request though, as it is only tangentially related.
In case it hasn't been clear, I have no clue what I'm doing, and apparently do not understand github very well, so a bunch of stuff that I thought was on separate branch was accidentally been committed to this branch, though it has been reverted as far as I can tell.
Adds:
Required things to get this working:
Additional testing to be done, but I thought I'd share what I have so far since it seems to be working... Mostly. Better functionality for what's counted as an error needs to be added, as that has been a major issue and is currently disabled because of that.
Also, I was learning python as I was working on this, so please don't expect the code to be anywhere near competently written.