MCPcopy Create free account
hub / github.com/microsoft/TypeChat / next

Function next

typescript/examples/music/src/endpoints.ts:402–424  ·  view source on GitHub ↗
(service: SpotifyService, deviceId: string)

Source from the content-addressed store, hash-verified

400}
401
402export async function next(service: SpotifyService, deviceId: string) {
403 const config = {
404 headers: {
405 Authorization: `Bearer ${service.retrieveUser().token}`,
406 },
407 };
408 try {
409 const spotifyResult = await axios.post(
410 `https://api.spotify.com/v1/me/player/next?device_id=${deviceId}`,
411 {},
412 config
413 );
414
415 return spotifyResult.data;
416 } catch (e) {
417 if (e instanceof axios.AxiosError) {
418 console.log(e.message);
419 } else {
420 throw e;
421 }
422 }
423 return undefined;
424}
425
426export async function getPlaylists(service: SpotifyService) {
427 const config = {

Callers 3

handleCallFunction · 0.90
completeMethod · 0.85
handle_callFunction · 0.85

Calls 1

retrieveUserMethod · 0.80

Tested by 1

completeMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…