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

make items optional in SetQueueOptions definition #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nchase
Copy link

@nchase nchase commented Sep 27, 2020

the documentation seems to have some internal conflict about whether or not items is necessary, but in usage it appears to be optional.

Here, items is not defined as optional for MusicKit.SetQueueOptions: https://developer.apple.com/documentation/musickitjs/musickit/setqueueoptions

But here, setQueue is called without items: https://developer.apple.com/documentation/musickitjs/accessing_musickit_features_using_javascript#3004833

^^ If that URL doesn't work, this is the example:

// "You can initialize a playback queue by using the setQueue method,
//  either with individual media items, or with an album or playlist."
//
// "To set a queue using an album's URL:"

let music = MusicKit.getInstance();
let url = 'https://itunes.apple.com/us/album/hamilton-original-broadway-cast-recording/1025210938';
music.setQueue({ url: url }).then(function(queue) {
  // Queue is instantiated and set on music player.
});

And in usage it seems to work.

the documentation seems to have some internal conflict about whether or
not this is necessary, but in usage it appears to be optional.

Here, `items` is not defined as optional for `MusicKit.SetQueueOptions`: https://developer.apple.com/documentation/musickitjs/musickit/setqueueoptions

But here, setQueue is called without `items`: https://developer.apple.com/documentation/musickitjs/accessing_musickit_features_using_javascript#3004833

^^ If that URL doesn't work, this is the example:

```js
// "You can initialize a playback queue by using the setQueue method,
either with individual media items, or with an album or playlist."
// "To set a queue using an album's URL:"

let music = MusicKit.getInstance();
let url = 'https://itunes.apple.com/us/album/hamilton-original-broadway-cast-recording/1025210938';
music.setQueue({ url: url }).then(function(queue) {
  // Queue is instantiated and set on music player.
});
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant