Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • N nutritechWiki
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Nutritech
  • nutritechWiki
  • Wiki
  • endpoints

endpoints · Changes

Page history
gabriel.paul created page: endpoints authored Mar 23, 2018 by Gabriel Henrique Paul's avatar Gabriel Henrique Paul
Hide whitespace changes
Inline Side-by-side
endpoints.md 0 → 100644
View page @ daa1cb0e
|[Home](home)|[Requisitos](Requisitos)|[Arquitetura](Arquitetura)|[Configuração](configuracao)|[Endpoints](endpoints)|[Equipe](planilha-de-horarios-e-contatos)|[Mockup Telas Android](telas-android)|[Problemas](problemas)
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
**Abaixo os comandos o cadastro e funções dentro do aplicativo:**<br>
1.&nbsp;**Usuário:**<br>
* <details>
<summary>
<b>Cadastrar</b> &nbsp; POST: api/usuarios/
</summary>
<pre>
{
"id": "",
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true
}
</pre>
</details>
* <details>
<summary>
<b>Alterar</b> &nbsp; PUT: api/usuarios/update
</summary>
<pre>
{
"id": 1,
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true
}
</pre>
</details>
* <details>
<summary>
<b>Buscar Por ID</b> &nbsp; GET: api/usuarios/{id} || *api/usuarios/12*
</summary>
<pre>
{
"id": 1,
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true,
"valid": true
}
</pre>
</details>
* <details>
<summary>
<b>Listar Todos</b> &nbsp; GET: api/usuarios
</summary>
<pre>
{
"Usuarios": [
{
"id": 1,
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true,
"valid": true
},
{
"id": 2,
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true,
"valid": true
}
]
}
</pre>
</details>
* <details>
<summary>
<b>Deletar Por ID</b> &nbsp; DELETE: api/usuarios/{id} || *api/usuarios/23413252*
</summary>
<pre>
Sem retorno de json
</pre>
</details>
2.&nbsp;**Ingredientes e seus Atributos:**<br>
* <details>
<summary>
<b>Cadastrar</b> &nbsp; POST: api/ingredientes/
</summary>
<pre>
{
"id": "",
"nome": "Arroz",
"origem": "Taco",
"status": true,
"criador": { "id": 1 },
"ingredienteAtributo": [
{
"atributo": { "id": 1, "tipo" : "NULL" },
"valor": "45"
}
],
"tipo": "PRIVADO", *** ou "COMUM"
}
</pre>
</details>
* <details>
<summary>
<b>Alterar</b> &nbsp; PUT: api/ingredientes/update
</summary>
<pre>
{
"id": "1",
"nome": "Arroz",
"origem": "Taco",
"status": true,
"criador": { "id": 1, "tipo" : "NULL" },
"ingredienteAtributo": [
{
"atributo": { "id": 1 },
"valor": "45"
},
{
"atributo": { "id": 2 },
"valor": null
}
],
"tipo": "PRIVADO", *** ou "COMUM"
}
</pre>
</details>
* <details>
<summary>
<b>Buscar Por ID</b> &nbsp; GET: api/ingredientes/{id} || *api/ingredientes/12*
</summary>
<pre>
{
"id": 1,
"nome": "testeMock6734",
"origem": "tacoMock",
"status": true,
"tipo": "PRIVADO", *** ou "COMUM"
"criador": {
"id": 1,
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true,
"valid": true
},
"ingredienteAtributo": [
{
"atributo": {
"id": 3,
"nome": "falasio",
"unidade": "o",
"multiplicador": 9,
"obrigatorio": true,
"status": true,
"active": true
},
"valor": null
},
{
"atributo": {
"id": 1,
"nome": "calcioEdited",
"unidade": "ga",
"multiplicador": 41,
"obrigatorio": false,
"status": true,
"active": true
},
"valor": "46"
}
]
}
</pre>
</details>
* <details>
<summary>
<b>Listar Todos</b> &nbsp; GET: api/ingredientes
</summary>
<pre>
{
"Ingredientes": [
{
"id": 1,
"nome": "Arroz",
"origem": "Taco",
"tipo": "COMUM", ** ou "PRIVADO"
"criador": {
"id": 1,
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true,
"valid": true
},
"ingredienteAtributo": [
{
"atributo": {
"id": 1,
"nome": "potasio",
"unidade": "g",
"multiplicador": 5,
"obrigatorio": true,
"status": true,
"active": true
},
"valor": "45"
},
{
"atributo": {
"id": 2,
"nome": "calcio",
"unidade": "g",
"multiplicador": 9,
"obrigatorio": true,
"status": true,
"active": true
},
"valor": null
},
......
],
"status": true
},
outros ingrediente......
]
}
</pre>
</details>
3.&nbsp;**Atributos:**<br>
* <details>
<summary>
<b>Cadastrar</b> &nbsp; POST: api/atributos/
</summary>
<pre>
{
"id": "",
"nome": "calcio",
"unidade": "g",
"multiplicador": 41,
"ordem": 1,
"obrigatorio": false,
"status": true,
"active": true
}
</pre>
</details>
* <details>
<summary>
<b>Alterar</b> &nbsp; PUT: api/atributos/update
</summary>
<pre>
{
"id": "1",
"nome": "calcio",
"unidade": "g",
"multiplicador": 41,
"ordem": 1,
"obrigatorio": false,
"status": true
}
</pre>
</details>
* <details>
<summary>
<b>Buscar Por ID</b> &nbsp; GET: api/atributos/{id} || *api/atributos/12*
</summary>
<pre>
{
"id": "1",
"nome": "calcio",
"unidade": "g",
"multiplicador": 41,
"ordem": 1,
"obrigatorio": false,
"status": true
}
</pre>
</details>
* <details>
<summary>
<b>Listar Todos</b> &nbsp; GET: api/atributos
</summary>
<pre>
{
"Atributos": [
{
"id": 1,
"nome": "calcioEdited",
"unidade": "ga",
"multiplicador": 41,
"obrigatorio": false,
"ordem": 1,
"status": true,
"active": true
},
.......
]
}
</pre>
</details>
4.&nbsp;**Grupos de Receitas:**<br>
* <details>
<summary>
<b>Cadastrar</b> &nbsp; POST: api/grupos/
</summary>
<pre>
{
"id": "",
"nome": "Sobremesa",
"custo": 32,
"status": true
}
</pre>
</details>
* <details>
<summary>
<b>Alterar</b> &nbsp; PUT: api/grupos/update
</summary>
<pre>
{
"id": 12,
"nome": "Sobremesa",
"custo": 32,
"status": true
}
</pre>
</details>
* <details>
<summary>
<b>Buscar Por ID</b> &nbsp; GET: api/grupos/{id} || *api/grupos/12*
</summary>
<pre>
{
"id": 12,
"nome": "Sobremesa",
"custo": 32,
"status": true,
"active": true
}
</pre>
</details>
* <details>
<summary>
<b>Listar Todos</b> &nbsp; GET: api/grupos
</summary>
<pre>
{
"Grupos": [
{
"id": 1,
"nome": "Sobremesa",
"custo": 32,
"status": true,
"active": true
},
......
]
}
</pre>
</details>
5.&nbsp;**Login:**<br>
* <details>
<summary>
<b>Logar</b> &nbsp; POST: api/auth
</summary>
<pre>
{
"email" : "[email protected]",
"senha" : "123456"
}
</pre>
</details>
6.&nbsp;**Receitas:**<br>
* <details>
<summary>
<b>Cadastrar</b> &nbsp; POST: api/receitas/
</summary>
<pre>
{
"id": "",
"nome": "Trufas de Chocolate",
"status": "true",
"passos": [
"limpar",
"fever",
"reserve"
],
"rendimento": 20,
"tempo": "2 horas",
"imagem": "Imagem",
"tipo": "PUBLICO",
"criadores":[{"id": "1", "tipo":"NULL"}],
"receitaIngrediente": [
{
"ingrediente": {"id": 1, "tipo":"NULL"},
"custoKg": "5",
"pesoG": "5"
}
],
"professor": {"id": "1", "tipo":"NULL"},
"grupoReceita": {"id": "1"}
}
</pre>
</details>
* <details>
<summary>
<b>Alterar</b> &nbsp; PUT: api/receitas/update
</summary>
<pre>
{
"id": "2",
"nome": "Trufas de Chocolate",
"status": "true",
"passos": [
"limpar",
"fever",
"reserve"
],
"rendimento": 20,
"tempo": "2 horas",
"imagem": "Imagem",
"tipo": "PUBLICO",
"criadores":[{"id": "1", "tipo":"NULL"}],
"receitaIngrediente": [
{
"ingrediente": {"id": 1, "tipo":"NULL"},
"custoKg": "5",
"pesoG": "5"
}
],
"professor": {"id": "1", "tipo":"NULL"},
"grupoReceita": {"id": "1"}
}
</pre>
</details>
* <details>
<summary>
<b>Buscar Por ID</b> &nbsp; GET: api/receitas/{id} || *api/receitas/12*
</summary>
<pre>
{
"id": 2,
"nome": "Trufas de Chocolate2",
"status": false,
"passos": [
"limpar",
"fever",
"reserve"
],
"rendimento": 24,
"criadores": [
{
"id": 1,
"cpf": "1111111111",
"email": "[email protected]",
"matricula": "101010",
"nome": "Admin",
"senha": "c56d0e9a7ccec67b4ea131655038d604",
"tipo": "ADMIN",
"status": true,
"valid": true
}
],
"receitaIngrediente": [
{
"ingrediente": {
"id": 1,
"nome": "Feijao7",
"criador": {
"id": 1,
"cpf": "1111111111",
"email": "[email protected]",
"matricula": "101010",
"nome": "Admin",
"senha": "c56d0e9a7ccec67b4ea131655038d604",
"tipo": "ADMIN",
"status": true,
"valid": true
},
"origem": "Taco1",
"status": true,
"ingredienteAtributo": [
{
"atributo": {
"id": 1,
"nome": "calcio",
"unidade": "g",
"multiplicador": 41,
"obrigatorio": false,
"status": true,
"active": true
},
"valor": "23"
}
],
"tipo": "PRIVADO"
},
"custoKg": 5,
"pesoG": 5
}
],
"professor": {
"id": 1,
"cpf": "1111111111",
"email": "[email protected]",
"matricula": "101010",
"nome": "Admin",
"senha": "c56d0e9a7ccec67b4ea131655038d604",
"tipo": "ADMIN",
"status": true,
"valid": true
},
"grupoReceita": {
"id": 1,
"nome": "Sobremesa",
"custo": 32,
"status": true,
"active": true
}
}
</pre>
</details>
* <details>
<summary>
<b>Listar Todos</b> &nbsp; GET: api/receitas
</summary>
<pre>
{
"Receitas": [
{
"id": 2,
"nome": "Trufas de Chocolate2",
"status": false,
"passos": [
"limpar",
"fever",
"reserve"
],
"rendimento": 24,
"criadores": [
{
"id": 1,
"cpf": "1111111111",
"email": "[email protected]",
"matricula": "101010",
"nome": "Admin",
"senha": "c56d0e9a7ccec67b4ea131655038d604",
"tipo": "ADMIN",
"status": true,
"valid": true
}
],
"receitaIngrediente": [
{
"ingrediente": {
"id": 1,
"nome": "Feijao7",
"criador": {
"id": 1,
"cpf": "1111111111",
"email": "[email protected]",
"matricula": "101010",
"nome": "Admin",
"senha": "c56d0e9a7ccec67b4ea131655038d604",
"tipo": "ADMIN",
"status": true,
"valid": true
},
"origem": "Taco1",
"status": true,
"ingredienteAtributo": [
{
"atributo": {
"id": 1,
"nome": "calcio",
"unidade": "g",
"multiplicador": 41,
"obrigatorio": false,
"status": true,
"active": true
},
"valor": "23"
}
],
"tipo": "PRIVADO"
},
"custoKg": 5,
"pesoG": 5
}
],
"professor": {
"id": 1,
"cpf": "1111111111",
"email": "[email protected]",
"matricula": "101010",
"nome": "Admin",
"senha": "c56d0e9a7ccec67b4ea131655038d604",
"tipo": "ADMIN",
"status": true,
"valid": true
},
"grupoReceita": {
"id": 1,
"nome": "Sobremesa",
"custo": 32,
"status": true,
"active": true
}
},
......
]
}
</pre>
</details>
Clone repository
  • Arquitetura
  • Requisitos
  • angular
  • configuracao
  • configuracoes
    • Diagrama ER
    • IntelliJ
    • git
    • wiki
  • daily
  • endpoints
  • Home
  • mockups
  • planilha de horarios e contatos
  • problemas
  • sprints