{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"0b2a2015-f169-4419-90e1-7819c1d30ecc","name":"API Catalogo de Livros","description":"Esta é uma API de catálogo de livros desenvolvida com Django Rest Framework, foi projetada para armazenar informações sobre livros, incluindo nome do livro, nome do autor, ano de lançamento e número da edição.Você também poderá buscar os livros por gênero, nome do autor, nome do livro, tipo ou nome da editora.\n\n## 🔧 Ferramentas\n\n- Python: é uma linguagem de programação de alto nível, interpretada, orientada a objetos e de propósito geral.\n- Django: framework de desenvolvimento web de código aberto, escrito em Python, que oferece uma estrutura robusta e eficiente para a criação de aplicativos web.\n- Django Rest Framework: é uma poderosa biblioteca de terceiros para o Django, um framework de desenvolvimento web em Python. O DRF estende a funcionalidade do Django para facilitar a criação de APIs (Application Programming Interfaces) RESTful de maneira eficiente e consistente.\n    \n\n## 📍 Endpoints\n\n- `GET /livro/`: Retorna a lista de todos os livros no catálogo.\n    \n- `POST /livro/`: Cria um novo livro no catálogo.\n    \n- `GET /livro/{id}/`: Retorna os detalhes de um livro específico com base no ID.\n    \n- `PUT /livro/{id}/`: Atualiza as informações de um livro específico com base no ID.\n    \n- `GET /livro/?search={param}`: Retorna os detalhes de livros baseado em parametros que podem ser: `genero`, `nome do autor`, nome do livro, `editora` ou `tipo`.\n    \n- `DELETE /livro/{id}/`: Exclui um livro específico com base no ID.\n    \n\n## 📄 Modelos de Dados\n\n- `Livro`:\n    - `id` (campo automático): O identificador único do livro.\n    - `nome` (string): Nome do livro.\n    - `nomeDoAutor` (string): Nome do autor do livro.\n    - `lancamento` (inteiro): Ano de lançamento da primeira versão do livro.\n    - `numEdicao` (inteiro): Número da edição do livro.\n    - `tipo` (string): Tipo do livro (livro, mangá, hq...).\n    - `genero` (string): Genero do livro.\n    - `editora` (string): Nome da editora.\n    - `anoEdicao` (inteiro): Ano de lançamento da edição.\n    - `numEdicao` (inteiro): Numero da edição.\n\n## ⚙️ Uso da API\n\nA API pode ser usada para:\n\n- Listar todos os livros no catálogo.\n- Adicionar um novo livro ao catálogo.\n- Recuperar detalhes de um livro específico com base no ID.\n    \n- Recupera detalhes de livros com base em seu nome, nome do autor, genero, tipo ou editora\n    \n- Atualizar informações de um livro existente.\n- Excluir um livro específico do catálogo.\n    \n\n## 💻 Como Executar o Projeto\n\nSiga estas etapas para configurar e executar a API em seu ambiente:\n\n1. git clone [https://seurepositorio.git](https://seurepositorio.git)\n2. cd nomedoprojeto/\n3. python -m venv venvsource venv/bin/activate # No Windows, use 'venv\\\\Scripts\\\\activate'\n4. pip install -r requirements.txt\n5. python manage.py migrate\n6. python manage.py runserver\n    \n\nA API estará acessível em [http://localhost:8000/](http://localhost:8000/).\n\n## 🌐 Exemplo de Solicitação\n\n### Criar um Novo Livro\n\n```\n  Método: POST\n  URL: http://localhost:8000/livro/\n\n ```\n\n### Corpo da Solicitação:\n\n``` json\n{\n  \"id\":1,\n  \"nome\": \"Nome do Livro\",\n  \"nomeDoAutor\": \"Nome do Autor\",\n  \"lancamento\": 2023,\n  \"tipo\": \"Livro\",\n  \"genero\": \"Genero do Livro\",\n  \"editora\": \"Editora do Livro\",\n  \"anoEdicao\": 2018,\n  \"numEdicao\": 1\n}\n\n ```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"29576774","team":17022210,"collectionId":"0b2a2015-f169-4419-90e1-7819c1d30ecc","publishedId":"2s9YXh73uv","public":true,"publicUrl":"https://documenter-api.postman.tech/view/29576774/2s9YXh73uv","privateUrl":"https://go.postman.co/documentation/29576774-0b2a2015-f169-4419-90e1-7819c1d30ecc","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"Esta é uma API de catálogo de livros desenvolvida com Django Rest Framework, foi projetada para armazenar informações sobre livros, incluindo nome do livro, nome do autor, ano de lançamento e número da edição. "},{"name":"title","value":"API Catálogo de Livros"}],"appearance":{"default":"dark","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.11.6","publishDate":"2023-11-08T15:04:01.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"API Catálogo de Livros","description":"Esta é uma API de catálogo de livros desenvolvida com Django Rest Framework, foi projetada para armazenar informações sobre livros, incluindo nome do livro, nome do autor, ano de lançamento e número da edição. "},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/06969a62b5afc92d5d87f880c0f4f3f8529251eec10408cb4528f6988dfd24e0","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s9YXh73uv"}