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

API breaking change: Fix broken playlist api #1998

Merged
merged 1 commit into from
Aug 1, 2019

Conversation

Chocobozzz
Copy link
Owner

Breaking change of the undocumented playlist API (when listing videos, updating a playlist element or deleting an element from a playlist).

Unfortunately we made some mistakes when we designed these endpoints, and we have to change them:

  • /api/v1/video-playlists/:playlistId/videos no longer accepts categoryOneOf, licenceOneOf, languageOneOf, tagsOneOf, tagsAllOf and filter query parameters.
  • /api/v1/video-playlists/:playlistId/videos now returns { total: number, data: VideoPlaylistElement[] } // (before it was a Video object):
export enum VideoPlaylistElementType {
  REGULAR = 0,
  DELETED = 1,
  PRIVATE = 2,
  UNAVAILABLE = 3 // Blacklisted, blocked by the user/instance, NSFW...
}

export interface VideoPlaylistElement {
  id: number
  position: number
  startTimestamp: number
  stopTimestamp: number

  type: VideoPlaylistElementType

  video?: Video
}
  • PUT and DELETE on /api/v1/video-playlists/:playlistId/videos/:videoId is now on /api/v1/video-playlists/:playlistId/videos/:playlistElementId

The goal of these changes is the API returns playlist elements even if they are unavailable or private.

Fixes #1867 & #1978

@Chocobozzz Chocobozzz force-pushed the feature/fix-playlist-elements branch from 49af377 to c2fb180 Compare July 31, 2019 15:37
@Chocobozzz Chocobozzz force-pushed the feature/fix-playlist-elements branch from c2fb180 to 251e12a Compare August 1, 2019 06:11
@Chocobozzz Chocobozzz merged commit bfbd912 into develop Aug 1, 2019
@Chocobozzz Chocobozzz deleted the feature/fix-playlist-elements branch August 7, 2019 10:08
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.

Video available only by private link invisible in playlist
1 participant