Property | Description |
---|---|
id |
Int |
address |
String |
city |
String |
latitude |
Double |
longitude |
Double |
state |
String |
zipCode |
Int |
Property | Description |
---|---|
id |
Int |
name |
String |
description |
String |
photo_url |
String |
website_url |
String |
year |
Int |
gge_reduced |
Double |
ghg_reduced |
Double |
project_type_id |
Int |
URL: /location-markers
Example: GET http://127.0.0.1:5000/location-markers
{
"locationMarkers":[
{
"center":{
"lat":-95.2632409,
"lng":38.9930314
},
"gge_reduced":1995.0,
"ghg_reduced":2.5845225,
"points":[
{
"lat":-95.2632409,
"lng":38.9930314
}
],
"project_ids":[1],
"project_name":"Black Hills Energy- KS",
"project_types":["Building"]
},
{
"center":{
"lat":-94.6095686,
"lng":38.8705357
},
"gge_reduced":2891.461077,
"ghg_reduced":1.133452742,
"points":[
{
"lat":-94.6095686,
"lng":38.8705357
}
],
"project_ids":[2],
"project_name":"Central States Beverage Company",
"project_types":["Building"]
}
]
}
URL: /locations/<int:id>
Example: GET http://127.0.0.1:5000/locations/1
{
"address":"601 N Iowa St",
"city":"Lawrence",
"latitude":-95.2632409,
"longitude":38.9930314,
"state":"KS",
"zipCode":66044
}
Returns a list of all locations.
URL: /locations
EXAMPLE: GET http://127.0.0.1:5000/locations/
{
"locations":[
{
"address":"601 N Iowa St",
"city":"Lawrence",
"id":1,
"latitude":-95.2632409,
"longitude":38.9930314,
"state":"KS",
"zipCode":66044
},
{
"address":"14220 Wyandotte St",
"city":"Kansas City",
"id":2,
"latitude":-94.6095686,
"longitude":38.8705357,
"state":"MO",
"zipCode":64145
}
]
}
URL: /locations/<int:id>/project
Example: GET http://127.0.0.1:5000/locations/1/project
{
"id": 1,
"name": "Black Hills Energy- KS",
"description": null,
"photo_url": null,
"website_url": null,
"year": 2013,
"gge_reduced": 1995.0,
"ghg_reduced": 2.5845225,
"project_type_id": 1
}
URL: /projects
Example: GET http://127.0.0.1:5000/projects
{
"projects": [
{
"id": 1,
"name": "Black Hills Energy- KS",
"description": null,
"photoUrl": null,
"websiteUrl": null,
"year": 2013,
"ggeReduced": 1995.0,
"ghgReduced": 2.5845225
},
{
"id": 2,
"name": "Central States Beverage Company",
"description": null,
"photoUrl": null,
"websiteUrl": null,
"year": 2012,
"ggeReduced": 2891.461077,
"ghgReduced": 1.133452742
}
]
}
URL: /projects/<int:id>
Example: GET http://127.0.0.1:5000/projects/1
{
"id": 1,
"name": "Black Hills Energy- KS",
"description": null,
"photoUrl": null,
"websiteUrl": null,
"year": 2013,
"ggeReduced": 1995.0,
"ghgReduced": 2.5845225
}
URL: /project-types
Example: GET http://127.0.0.1:5000/project-types
{
"project_types": [
{
"id": 1,
"typeName": "Building"
},
{
"id": 2,
"typeName": "Vehicle Transportation"
},
{
"id": 3,
"typeName": "Infastructure Transportation"
}
]
}
URL: /project-types/<int:id>
Example: GET http://127.0.0.1:5000/project-types/1
{
"id": 1,
"typeName": "Building"
}
URL: /project-type/<ind:id>/project
Example: GET http://127.0.0.1:5000/project-types/1/projects
{
"projects": [
{
"id": 1,
"name": "Black Hills Energy- KS",
"description": null,
"photo_url": null,
"website_url": null,
"year": 2013,
"gge_reduced": 1995.0,
"ghg_reduced": 2.5845225,
"project_type_id": 1
},
{
"id": 2,
"name": "Central States Beverage Company",
"description": null,
"photo_url": null,
"website_url": null,
"year": 2012,
"gge_reduced": 2891.461077,
"ghg_reduced": 1.133452742,
"project_type_id": 1
},
{
"id": 6,
"name": "Lincoln Airport Authority -CNG",
"description": null,
"photo_url": null,
"website_url": null,
"year": 2017,
"gge_reduced": 11970.0,
"ghg_reduced": 15.507135,
"project_type_id": 1
},
{
"id": 7,
"name": " State of Missouri - Propane",
"description": null,
"photo_url": null,
"website_url": null,
"year": 2017,
"gge_reduced": 903.101,
"ghg_reduced": 1.276533264,
"project_type_id": 1
}
]
}
URL: /projects/<int:id>/locations
Example: GET http://127.0.0.1:5000/projects/1/locations
{
"locations": [
{
"address": "601 N Iowa St",
"city": "Lawrence",
"state": "KS",
"zip_code": 66044,
"longitude": 38.9930314,
"latitude": -95.2632409
}
]
}
URL: /projects/1/detail
Example: GET http://127.0.0.1:5000/projects/1/detail
{
"date":"2013",
"details":null,
"emissions_data":{
"gge_reduced":1995.0,
"ghg_reduced":2.5845225
},
"img":null,
"project_name":"Black Hills Energy- KS",
"project_type":"Building"
}
URL: /projects/<int:id>/summary
Example: GET http://127.0.0.1:5000/projects/1/summary
{
"date":"2013",
"img":null,
"project_details":null,
"project_name":"Black Hills Energy- KS"
}
URL: /projects/upload/csv
Example: POST 127.0.0.1:5000/projects/upload/csv