Coder Social home page Coder Social logo

ubots-challenge-moviesapi's Introduction

ubots-challenge-moviesapi

Uma API RESTful que retorna informações e avaliações de filmes, desenvolvida para o desafio técnico do processo seletivo para vaga de desenvolvedor na Ubots.

A API foi desenvolvida em Python, utilizando o framework FastAPI em conjunto com a biblioteca SQLModel para a integração com o banco de dados.

Rotas

[POST]/create/movie

  • Summary
    Create Movie

RequestBody

  • application/json
{
  id?: Partial(integer) & Partial(null)
  title: string
  synopsis: string
  language: string
  rating: string
  release_date: string
  duration: string
}

Responses

  • 200 Successful Response

application/json

{
  id?: Partial(integer) & Partial(null)
  title: string
  synopsis: string
  language: string
  rating: string
  release_date: string
  duration: string
}
  • 422 Validation Error

application/json

{
  detail: {
    loc?: Partial(string) & Partial(integer)[]
    msg: string
    type: string
  }[]
}

[POST]/create/review

  • Summary
    Create Review

RequestBody

  • application/json
{
  id?: Partial(integer) & Partial(null)
  stars: integer
  comment: string
  movie_id?: integer
}

Responses

  • 200 Successful Response

application/json

{
  id?: Partial(integer) & Partial(null)
  stars: integer
  comment: string
  movie_id?: integer
}
  • 422 Validation Error

application/json

{
  detail: {
    loc?: Partial(string) & Partial(integer)[]
    msg: string
    type: string
  }[]
}

[POST]/delete/movie/{movie_id}

  • Summary
    Delete Movie

Responses

  • 200 Successful Response

application/json

{
}
  • 422 Validation Error

application/json

{
  detail: {
    loc?: Partial(string) & Partial(integer)[]
    msg: string
    type: string
  }[]
}

[POST]/delete/review/delete_by_review_id/{review_id}

  • Summary
    Delete Review

Responses

  • 200 Successful Response

application/json

{
}
  • 422 Validation Error

application/json

{
  detail: {
    loc?: Partial(string) & Partial(integer)[]
    msg: string
    type: string
  }[]
}

[POST]/delete/reviews/delete_by_movie_id/{movie_id}

  • Summary
    Delete Reviews

Responses

  • 200 Successful Response

application/json

{
}
  • 422 Validation Error

application/json

{
  detail: {
    loc?: Partial(string) & Partial(integer)[]
    msg: string
    type: string
  }[]
}

[GET]/get/movie/{movie_id}

  • Summary
    Get Movie By Movie Id

Responses

  • 200 Successful Response

application/json

{
  id?: Partial(integer) & Partial(null)
  title: string
  synopsis: string
  language: string
  rating: string
  release_date: string
  duration: string
}
  • 422 Validation Error

application/json

{
  detail: {
    loc?: Partial(string) & Partial(integer)[]
    msg: string
    type: string
  }[]
}

[GET]/get/movies

  • Summary
    Get Movies

Responses

  • 200 Successful Response

application/json

{
  id?: Partial(integer) & Partial(null)
  title: string
  synopsis: string
  language: string
  rating: string
  release_date: string
  duration: string
}[]

[GET]/get/review/by_review_id/{review_id}

  • Summary
    Get Review By Review Id

Responses

  • 200 Successful Response

application/json

{
  id?: Partial(integer) & Partial(null)
  stars: integer
  comment: string
  movie_id?: integer
}
  • 422 Validation Error

application/json

{
  detail: {
    loc?: Partial(string) & Partial(integer)[]
    msg: string
    type: string
  }[]
}

[GET]/get/reviews/by_movie_id/{movie_id}

  • Summary
    Get Reviews By Movie Id

Responses

  • 200 Successful Response

application/json

{
  id?: Partial(integer) & Partial(null)
  stars: integer
  comment: string
  movie_id?: integer
}[]
  • 422 Validation Error

application/json

{
  detail: {
    loc?: Partial(string) & Partial(integer)[]
    msg: string
    type: string
  }[]
}

[GET]/get/reviews

  • Summary
    Get Reviews

Responses

  • 200 Successful Response

application/json

{
  id?: Partial(integer) & Partial(null)
  stars: integer
  comment: string
  movie_id?: integer
}[]

[GET]/

  • Summary
    Root

Responses

  • 200 Successful Response

application/json

{}

[POST]/update/movie

  • Summary
    Update Movie

RequestBody

  • application/json
{
  id?: Partial(integer) & Partial(null)
  title: string
  synopsis: string
  language: string
  rating: string
  release_date: string
  duration: string
}

Responses

  • 200 Successful Response

application/json

{
  id?: Partial(integer) & Partial(null)
  title: string
  synopsis: string
  language: string
  rating: string
  release_date: string
  duration: string
}
  • 422 Validation Error

application/json

{
  detail: {
    loc?: Partial(string) & Partial(integer)[]
    msg: string
    type: string
  }[]
}

[POST]/update/review

  • Summary
    Update Movie

RequestBody

  • application/json
{
  id?: Partial(integer) & Partial(null)
  stars: integer
  comment: string
  movie_id?: integer
}

Responses

  • 200 Successful Response

application/json

{
  id?: Partial(integer) & Partial(null)
  stars: integer
  comment: string
  movie_id?: integer
}
  • 422 Validation Error

application/json

{
  detail: {
    loc?: Partial(string) & Partial(integer)[]
    msg: string
    type: string
  }[]
}

ubots-challenge-moviesapi's People

Contributors

glomatico avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.