Skip to content

Commit

Permalink
adding json response for validations close #6
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianazioti committed Jan 7, 2021
1 parent a3cfdf5 commit 675790e
Show file tree
Hide file tree
Showing 6 changed files with 534 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
service = LCCS("http://brazildatacube.dpi.inpe.br/dev/lccs/")

# Return the list of available clasification system for mapping
available_mappings = service.avaliable_mappings(system_id_source='TerraClass_AMZ')
available_mappings = service.available_mappings(system_id_source='TerraClass_AMZ')

print(available_mappings)
35 changes: 35 additions & 0 deletions tests/tests_lccs/jsons/class.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"class_parent": null,
"classification_system_id": 4,
"classification_system_name": "PRODES",
"code": "FLORESTA",
"description": "",
"id": 176,
"links": [
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Floresta",
"rel": "self",
"title": "Link to this document",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_systemPRODES/classes",
"rel": "parent",
"title": "Link to this document",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_systems",
"rel": "parent",
"title": "Link to classification systems",
"type": "application/json"
},
{
"href": "http://localhost:5000/",
"rel": "root",
"title": "API landing page",
"type": "application/json"
}
],
"name": "Floresta"
}
64 changes: 64 additions & 0 deletions tests/tests_lccs/jsons/classes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"links": [
{
"href": "http://localhost:5000/classification_system/PRODES/classes",
"rel": "self",
"title": "Classes of the classification system PRODES",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES",
"rel": "parent",
"title": "Link to classification system",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_systems",
"rel": "parent",
"title": "Link to classification systems",
"type": "application/json"
},
{
"href": "http://localhost:5000/",
"rel": "root",
"title": "API landing page",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Floresta",
"rel": "child",
"title": "Classification System Classes",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Hidrografia",
"rel": "child",
"title": "Classification System Classes",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Não Floresta",
"rel": "child",
"title": "Classification System Classes",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Nuvem",
"rel": "child",
"title": "Classification System Classes",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Resíduo",
"rel": "child",
"title": "Classification System Classes",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Desmatamento",
"rel": "child",
"title": "Classification System Classes",
"type": "application/json"
}
]
}
Loading

0 comments on commit 675790e

Please sign in to comment.