Skip to content

Commit

Permalink
Merge pull request #556 from dadosjusbr/all-agency-information
Browse files Browse the repository at this point in the history
/v2/dados/:orgao
  • Loading branch information
danielfireman committed May 17, 2023
2 parents 94815a6 + 4a988b9 commit 238e5cb
Show file tree
Hide file tree
Showing 8 changed files with 749 additions and 368 deletions.
93 changes: 93 additions & 0 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,41 @@ const docTemplate = `{
}
}
},
"/v2/dados/{orgao}": {
"get": {
"description": "Busca todas as informações de um órgão específico.",
"produces": [
"application/json"
],
"tags": [
"public_api"
],
"operationId": "GetAllAgencyInformation",
"parameters": [
{
"type": "string",
"description": "órgão",
"name": "orgao",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Requisição bem sucedida.",
"schema": {
"$ref": "#/definitions/papi.allAgencyInformation"
}
},
"400": {
"description": "Requisição inválida.",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/dados/{orgao}/{ano}": {
"get": {
"description": "Busca os dados mensais de um órgão por ano",
Expand Down Expand Up @@ -1005,6 +1040,64 @@ const docTemplate = `{
}
}
},
"papi.allAgencyInformation": {
"type": "object",
"properties": {
"id_orgao": {
"description": "'trt13'",
"type": "string"
},
"nome": {
"description": "'Tribunal Regional do Trabalho 13° Região'",
"type": "string"
},
"jurisdicao": {
"description": "'Estadual', 'Eleitroral', 'Militar', etc.",
"type": "string"
},
"entidade": {
"description": "'Tribunal', 'Ministério' or 'Conselho'.",
"type": "string"
},
"uf": {
"description": "Short code for federative unity.",
"type": "string"
},
"coletando": {
"type": "array",
"items": {
"$ref": "#/definitions/papi.collecting"
}
},
"url": {
"description": "Link for state url",
"type": "string"
},
"twitter_handle": {
"description": "Agency's twitter handle",
"type": "string"
},
"ouvidoria": {
"description": "Agencys's ombudsman url",
"type": "string"
},
"total_coletas_realizadas": {
"type": "integer"
},
"meses_com_dados": {
"type": "integer"
},
"indice_transparencia": {
"$ref": "#/definitions/papi.score"
},
"coletas": {
"type": "array",
"items": {
"$ref": "#/definitions/papi.summaryzedMI"
}
}
}
},
"papi.backup": {
"type": "object",
"properties": {
Expand Down
93 changes: 93 additions & 0 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,41 @@
}
}
},
"/v2/dados/{orgao}": {
"get": {
"description": "Busca todas as informações de um órgão específico.",
"produces": [
"application/json"
],
"tags": [
"public_api"
],
"operationId": "GetAllAgencyInformation",
"parameters": [
{
"type": "string",
"description": "órgão",
"name": "orgao",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Requisição bem sucedida.",
"schema": {
"$ref": "#/definitions/papi.allAgencyInformation"
}
},
"400": {
"description": "Requisição inválida.",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/dados/{orgao}/{ano}": {
"get": {
"description": "Busca os dados mensais de um órgão por ano",
Expand Down Expand Up @@ -995,6 +1030,64 @@
}
}
},
"papi.allAgencyInformation": {
"type": "object",
"properties": {
"id_orgao": {
"description": "'trt13'",
"type": "string"
},
"nome": {
"description": "'Tribunal Regional do Trabalho 13° Região'",
"type": "string"
},
"jurisdicao": {
"description": "'Estadual', 'Eleitroral', 'Militar', etc.",
"type": "string"
},
"entidade": {
"description": "'Tribunal', 'Ministério' or 'Conselho'.",
"type": "string"
},
"uf": {
"description": "Short code for federative unity.",
"type": "string"
},
"coletando": {
"type": "array",
"items": {
"$ref": "#/definitions/papi.collecting"
}
},
"url": {
"description": "Link for state url",
"type": "string"
},
"twitter_handle": {
"description": "Agency's twitter handle",
"type": "string"
},
"ouvidoria": {
"description": "Agencys's ombudsman url",
"type": "string"
},
"total_coletas_realizadas": {
"type": "integer"
},
"meses_com_dados": {
"type": "integer"
},
"indice_transparencia": {
"$ref": "#/definitions/papi.score"
},
"coletas": {
"type": "array",
"items": {
"$ref": "#/definitions/papi.summaryzedMI"
}
}
}
},
"papi.backup": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 238e5cb

Please sign in to comment.