Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add methods for creating models #7

Open
tkem opened this issue May 21, 2015 · 2 comments
Open

Add methods for creating models #7

tkem opened this issue May 21, 2015 · 2 comments

Comments

@tkem
Copy link
Member

tkem commented May 21, 2015

As discussed in https://discuss.mopidy.com/t/unable-to-create-a-playlist-from-a-podcast-uri-in-mopidy-js/737, clients sometimes may want to create models by themselves, e.g. to add tracks to playlists. Currently, this is only possible by creating a plain JS object with the semi-documented __model__ property.
Although the use case discussed above concerns the playlist API, there may be other cases where creating models, especially Refs, may be desirable. So adding functionality to create these on the client in a way that's guaranteed to work with current and future versions of the API would be a welcome addition.

@jodal
Copy link
Member

jodal commented May 22, 2015

Hopefully this won't be necessary as we're designing the core API with the goal of taking URIs in and returning Refs out. The client should usually not need to pass any models back to Mopidy.

@tkem
Copy link
Member Author

tkem commented May 22, 2015

So, how would a client add a radio station with URI and name to a playlist?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants