Giter Site home page Giter Site logo

Comments (9)

alastair avatar alastair commented on June 30, 2024 1

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.

alastair avatar alastair commented on June 30, 2024 1

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.

alastair avatar alastair commented on June 30, 2024 1

Thanks for your friendly reminders. It's still been quite busy here, but this is on my pymb list.

from python-musicbrainzngs.

hashhar avatar hashhar commented on June 30, 2024

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.

hashhar avatar hashhar commented on June 30, 2024

@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.

hashhar avatar hashhar commented on June 30, 2024

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.

hashhar avatar hashhar commented on June 30, 2024

@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.

hashhar avatar hashhar commented on June 30, 2024

@alastair Just wanted to check if you had a chance to look at this.

from python-musicbrainzngs.

bartkl avatar bartkl commented on June 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.