Comments (9)
Thanks for the contributions. I'll take a look at this in the coming week!
What were your ideas for a less-duplicated version of this code? Do you have an idea about what the interface might look like?
from python-musicbrainzngs.
I've not forgotten this! I'm trying to find some time in the weekends to finish looking at this, but I keep running out of time. The PR looks good in general, so I'll try and get it merged as soon as possible
from python-musicbrainzngs.
Thanks for your friendly reminders. It's still been quite busy here, but this is on my pymb list.
from python-musicbrainzngs.
FYI, my work can be followed at https://github.com/hashhar/python-musicbrainzngs/tree/extended-collections but there won't be anything to see there until someone (@alastair ?) can let me know which way to go.
As a last resort I may submit a PR with what I think is good and can rework it according to whatever feedback I get.
from python-musicbrainzngs.
@alastair I think I'm going with the approach used in the _do_collection_query
and the methods that use it. It'll allow using both named functions and an easy way to add new types of collections.
from python-musicbrainzngs.
I think my idea would've made the interface a little difficult to use. I was thinking of exposing the _do_collection_put
and _do_collection_delete
methods as public ones and not add the specific functions which I've added (add_areas_to_collection
, add_artists_to_collection
etc.).
The users of the package could then directly pass in the correct collection_type
to the _do_collection_put/remove
methods. But that would increase chances of mistakes and would need people to check what all types were available.
In a magical world I'd expect to be able to have the add_type_to_collection
and delete_type_from_collection
methods be autogenerated for all the possible types.
I'm satisfied with what I've done for now - just need to test this a some more (mainly around release-groups
).
from python-musicbrainzngs.
@alastair just wanted to remind you of this PR.
I've tested this with all the new endpoints that I've added and it's working.
One concern I had was that right now I'm throwing exceptions when a list longer than 400 ids is passed in which might break existing users. I was thinking to add a loop inside the function to break into chunks of 400 instead of failing the request altogether. Will make the API easier for the clients to consume - with an increased chance of running into rate limiting.
from python-musicbrainzngs.
@alastair Just wanted to check if you had a chance to look at this.
from python-musicbrainzngs.
I'm yearning for this as well. Would be great if this could get merged :).
Thanks for the great work!
from python-musicbrainzngs.
Related Issues (20)
- Tag voting HOT 1
- Add util scripts to update test data files
- Update url for getting a user's collections
- Cannot inc=tags when browsing releases
- Release? HOT 5
- Add includes=annotation to browse requests
- Improve the way version numbers are handled
- collection browse
- inc=ratings on release browse
- ResponseError on Artist Fetch HOT 3
- Unable to filter out null ISWC's in search_works HOT 1
- Provide a way to configure proxy setting
- get_release_group_image_list gives HTTP 404 if no images exist HOT 2
- Can't run setup.py - UnicodeDecodeError
- maximal number of tracks of a release
- work-level-rels for browsing
- mbxml.py missing some attributes for some elements. HOT 2
- alias-list attribute missing from recordings, releases
- Missing first-release-date from recording
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-musicbrainzngs.