Skip to content

Update type of ListOfUsersShowsResponse #204

@manan2501

Description

@manan2501

Describe the bug
Current type of ListOfUsersShowsResponse is extended from PagingObject
but we have two things inside the item, added_at, and show. The show is of type ShowObjectSimplifies.
So I am unable to extract the value of "name".

To Reproduce
Try to extract the name(or any other value) of the show from the response.

Expected behavior
Type of item should be an array of object, and the type of that object will be:
{
added_at: sting;
show: ShowObjectSimplied
}

Screenshots
If applicable, add screenshots to help explain your problem.
This is the response of request:
image

This is the current type of ListOfUsersShowsResponse:

  interface ListOfUsersShowsResponse extends PagingObject<ShowObjectSimplified> {}

  interface PagingObject<T> {
    href: string;
    items: T[];
    limit: number;
    next: string;
    offset: number;
    previous: string;
    total: number;
  }

  interface ShowObjectSimplified {
    available_markets?: string[];
    copyrights: CopyrightObject[];
    description: string;
    explicit: boolean;
    external_urls: ExternalUrlObject;
    href: string;
    id: string;
    images: ImageObject[];
    is_externally_hosted: boolean;
    languages: string[];
    media_type: string;
    name: string;
    publisher: string;
    type: 'show';
    uri: string;
  }

Desktop (please complete the following information):

  • OS: Windows-10
  • Browser: chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions