Code Monkey home page Code Monkey logo

animes-show-api's Introduction

Api para gerenciar animes

Crud simples para gerenciar animes e suas caracteristicas

tecnologias

Doc

Use a extenção do vscode thunder-client e importe o arquivo thunder-collection_show_animes.json através dela, ou consuma usando a ferramenta de sua preferencia com a doc a baixo.

Animes

Criar anime

POST /animes

Body

{
  "name": "Islime Shintara 2",
  "episodes": 44,
  "finished": false,
  "imageUrl": "https://image.tmdb.org/t/p/w600_and_h900_bestv2/lBhvBqYtR9J8mQPDdnpRcMcte0a.jpg",
  "categoryId": 2
}

Atualizar anime

PUT /animes/id

Body

{
  "name": "Islime Shintara 2",
  "episodes": 44,
  "finished": false,
  "imageUrl": "https://image.tmdb.org/t/p/w600_and_h900_bestv2/lBhvBqYtR9J8mQPDdnpRcMcte0a.jpg",
  "categoryId": 2
}

Listar animes

GET /animes

Pesquisar anime

GET /animes/id

Excluir anime

DELETE /animes/id
Nationality

Criar nationality

POST /nationalities

Body

{
  "country": "Coréia do sul",
  "state": "Seul"
}

Atualizar nationality

PUT /nationalities/id

Body

{
  "country": "Coréia do sul",
  "state": "Seul"
}

Listar nationalities

GET /nationalities

Pesquisar nationality

GET /nationalities/id

Excluir nationality

DELETE /nationalities/id
Category

Criar category

POST /categories

Body

{
  "description": "romance"
}

Atualizar category

PUT /categories/id

Body

{
  "description": "romance"
}

Listar categories

GET /categories

Pesquisar category

GET /categories/id

Excluir category

DELETE /categories/id
Authors

Criar author

POST /authors

Body

{
  "name": "Masashi Kishimoto",
  "nationalityId": 1
}

Atualizar author

PUT /authors/id

Body

{
  "name": "Masashi Kishimoto",
  "nationalityId": 1
}

Listar authors

GET /authors

Pesquisar author

GET /authors/id

Excluir author

DELETE /authors/id

Para executar:

  1. Clone esse repositorio
  2. Instale as dependencias
npm i
  1. Crie um banco de dados PostgreSQL com o nome que quiser
  2. Configure o arquivo .env usando o arquivo .env.example
  3. Rode as migrations
npx prisma migrate
  1. Seed db
npm run prisma:seed
  1. Rode em modo de desenvolvimento:
npm run dev

animes-show-api's People

Contributors

alyson02 avatar

Stargazers

Rodrigo Antunes Araújo avatar Hugo Nicolau avatar Roman 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.