REST API

Programas

Detalhes de um programa

GET /v1/shows/find/:slug

Retorna detalhes de um programa.

Parâmetros
slug string

O slug do programa.

Exemplo de resposta:
{
    "show": {
        "id": "2",
        "title": "Rapidinhas do Gordinho",
        "slug": "rapidinhas-do-gordinho",
        "playlist": "PLX8KwdeP5PJ4Tqn5-C5HalQu2IgPJS_3a",
        "description": "Lorem ipsum sit amet",
        "thumbnail": "/NierAutomata_01.jpg",
        "created_at": "2018-05-04 12:08:50",
        "updated_at": "2018-05-07 15:33:47",
        "thumbnail_uri": "http://localhost:5000/storage/app/media//NierAutomata_01.jpg",
        "presenters": [
            {
                "id": "1",
                "name": "Rodney Gross",
                "avatar": null,
                "created_at": "2018-05-03 12:23:03",
                "updated_at": "2018-05-03 12:23:03",
                "pivot": {
                    "show_id": "2",
                    "presenter_id": "1"
                }
            }
        ]
    }
}

Listar programas

GET /v1/shows

Retorna array contendo todos os programas

Exemplo de resposta:
{
    "shows": [
        {
            "id": "1",
            "title": "Game Retro",
            "slug": "game-retro",
            "playlist": "PLX8KwdeP5PJ5s7GhSYHSUrQCVi9AbuNfU",
            "description": "Lorem ipsum sit amet",
            "thumbnail": "/NierAutomata_02.jpg",
            "created_at": "2018-05-03 12:18:55",
            "updated_at": "2018-05-07 16:02:13",
            "thumbnail_uri": "http://localhost:5000/storage/app/media//NierAutomata_02.jpg",
            "presenters": [
                {
                    "id": "1",
                    "name": "Rodney Gross",
                    "avatar": null,
                    "created_at": "2018-05-03 12:23:03",
                    "updated_at": "2018-05-03 12:23:03",
                    "pivot": {
                        "show_id": "1",
                        "presenter_id": "1"
                    }
                }
            ]
        },
        {
            "id": "2",
            "title": "Rapidinhas do Gordinho",
            "slug": "rapidinhas-do-gordinho",
            "playlist": "PLX8KwdeP5PJ4Tqn5-C5HalQu2IgPJS_3a",
            "description": "Lorem ipsum sit amet",
            "thumbnail": "/NierAutomata_01.jpg",
            "created_at": "2018-05-04 12:08:50",
            "updated_at": "2018-05-07 15:33:47",
            "thumbnail_uri": "http://localhost:5000/storage/app/media//NierAutomata_01.jpg",
            "presenters": [
                {
                    "id": "1",
                    "name": "Rodney Gross",
                    "avatar": null,
                    "created_at": "2018-05-03 12:23:03",
                    "updated_at": "2018-05-03 12:23:03",
                    "pivot": {
                        "show_id": "2",
                        "presenter_id": "1"
                    }
                }
            ]
        }
    ]
}

Buscar programas

GET /v1/shows/search/:keyword

Retorna array de programas relacionados à palavra-chave.

Parâmetros
keyword string

Palavra-chave utilizada para buscar registros.

Exemplo de resposta
{
    "shows": [
        {
            "id": "2",
            "title": "Rapidinhas do Gordinho",
            "slug": "rapidinhas-do-gordinho",
            "playlist": "PLX8KwdeP5PJ4Tqn5-C5HalQu2IgPJS_3a",
            "description": "Lorem ipsum sit amet",
            "thumbnail": "/NierAutomata_01.jpg",
            "created_at": "2018-05-04 12:08:50",
            "updated_at": "2018-05-07 15:33:47",
            "thumbnail_uri": "http://localhost:5000/storage/app/media//NierAutomata_01.jpg",
            "presenters": [
                {
                    "id": "1",
                    "name": "Rodney Gross",
                    "avatar": null,
                    "created_at": "2018-05-03 12:23:03",
                    "updated_at": "2018-05-03 12:23:03",
                    "pivot": {
                        "show_id": "2",
                        "presenter_id": "1"
                    }
                }
            ]
        },

        ...
    ]
}

Videos

Detalhes do vídeo

GET /v1/videos/:id

Retorna detalhes de um vídeo com a id passada.

Parâmetros
id string

ID válida de vídeo do Youtube.

Exemplo de resposta
{
    "video": {
        "id": "DkKJ41ksgtI",
        "title": "Miss Paraíba fala sobre Miss Brasil e moda (Ana Carla Medeiros)",
        "thumbnail": "https://i.ytimg.com/vi/DkKJ41ksgtI/hqdefault.jpg",
        "show": "ELA COM ELAS"
    }
}

Videos da playlist

GET /v1/videos/playlist/:id

Retorna todos os vídeos de uma determinada playlist do Youtube.

Parâmetros
id string

ID válida de playlist do youtube.

Exemplo de resposta
{
    "videos": [
        {
            "id": "S-26FQEaHQg",
            "title": "O MOÍDO DA REDAÇÃO",
            "thumbnail": "https://i.ytimg.com/vi/S-26FQEaHQg/hqdefault.jpg",
            "show": ""
        },
        {
            "id": "QyVYsD66zGU",
            "title": "15/01/2018",
            "thumbnail": "https://i.ytimg.com/vi/QyVYsD66zGU/hqdefault.jpg",
            "show": "O MOÍDO DA REDAÇÃO"
        },
        {
            "id": "TArf9IYKO7M",
            "title": "16/01/2018",
            "thumbnail": "https://i.ytimg.com/vi/TArf9IYKO7M/hqdefault.jpg",
            "show": "O MOÍDO DA REDAÇÃO"
        },

        ...
    ]
}

Buscar vídeos

GET /v1/videos/search/:keyword

Retorna vídeos relacionados com a keyword.

Parâmetros
keyword string

Palavra-chave utilizada para buscar registros.

Exemplo de resposta
{
    "videos": [
        {
            "id": "0d1ElPr3CME",
            "title": "Victor Freitas",
            "thumbnail": "https://i.ytimg.com/vi/0d1ElPr3CME/hqdefault.jpg",
            "show": "GAME RETRÔ"
        },
        {
            "id": "ksaI43DotKU",
            "title": "Fabiano Gomes",
            "thumbnail": "https://i.ytimg.com/vi/ksaI43DotKU/hqdefault.jpg",
            "show": "CARA A CARA"
        },

				...
		]
}

Destaques

Listar destaques

GET /v1/highlights

Retorna todos os videos detacados.

Parâmetros
id string

ID válida de playlist do youtube.

Exemplo de resposta
{
    "videos": [
        {
            "id": "aDaDU8yjgF8",
            "title": "The Legend of Zelda - Majora's Mask OST",
            "thumbnail": "https://img.youtube.com/vi/aDaDU8yjgF8/hqdefault.jpg",
            "show": "Game Retro"
        },
        {
            "id": "PMvyNOL-qgk",
            "title": "Pyre OST",
            "thumbnail": "https://img.youtube.com/vi/PMvyNOL-qgk/hqdefault.jpg",
            "show": "Rapidinhas do Gordinho"
        },
        {
            "id": "pmoYLtObCtY",
            "title": "Shadow of the Colossus",
            "thumbnail": "https://img.youtube.com/vi/pmoYLtObCtY/hqdefault.jpg",
            "show": "Game Retro"
        }
    ]
}