Created
November 10, 2023 00:37
-
-
Save akshayvkt/9368673903175b5a7b83b16a25f1cce5 to your computer and use it in GitHub Desktop.
Get solar insights, easy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"title": "Combined Geocoding and Solar API", | |
"description": "API services for converting addresses into geographic coordinates and providing solar potential insights for buildings.", | |
"version": "1.0.0" | |
}, | |
"paths": { | |
"/geocode/json": { | |
"servers": [ | |
{ | |
"url": "https://maps.googleapis.com/maps/api", | |
"description": "Geocoding API Server" | |
} | |
], | |
"get": { | |
"summary": "Get Latitude and Longitude for an Address", | |
"operationId": "getLatLon", | |
"tags": ["Geocoding"], | |
"parameters": [ | |
{ | |
"name": "address", | |
"in": "query", | |
"required": true, | |
"description": "The address to get coordinates for.", | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "key", | |
"in": "query", | |
"required": true, | |
"description": "Your API key.", | |
"schema": { | |
"type": "string", | |
"enum": ["AIzaSyCDTEggHEgJGqbaiIfF12BMaLQ9yVpQ3lg"] | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "A successful response that contains the latitude and longitude.", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"lat": { | |
"type": "number", | |
"format": "float" | |
}, | |
"lon": { | |
"type": "number", | |
"format": "float" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Error: Bad Request. The address provided is invalid." | |
}, | |
"500": { | |
"description": "HTTP Error: Internal Server Error. Something went wrong on the server side." | |
} | |
} | |
} | |
}, | |
"/v1/buildingInsights:findClosest": { | |
"servers": [ | |
{ | |
"url": "https://solar.googleapis.com", | |
"description": "Solar API Server" | |
} | |
], | |
"get": { | |
"summary": "Building insights", | |
"operationId": "getBuildingInsights", | |
"tags": ["Building Insights"], | |
"parameters": [ | |
{ | |
"name": "location.latitude", | |
"in": "query", | |
"required": true, | |
"description": "Latitude component of location.", | |
"schema": { | |
"type": "number", | |
"format": "double" | |
} | |
}, | |
{ | |
"name": "location.longitude", | |
"in": "query", | |
"required": true, | |
"description": "Longitude component of location.", | |
"schema": { | |
"type": "number", | |
"format": "double" | |
} | |
}, | |
{ | |
"name": "requiredQuality", | |
"in": "query", | |
"required": true, | |
"description": "Required quality of results", | |
"schema": { | |
"type": "string", | |
"enum": ["HIGH"] | |
} | |
}, | |
{ | |
"name": "key", | |
"in": "query", | |
"required": true, | |
"description": "API key to authorize the request", | |
"schema": { | |
"type": "string", | |
"enum": ["AIzaSyCDTEggHEgJGqbaiIfF12BMaLQ9yVpQ3lg"] | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "A JSON blob containing solar potential and financial analysis data", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"solarPotential": { | |
"type": "object", | |
"additionalProperties": true | |
} | |
} | |
} | |
} | |
} | |
}, | |
"default": { | |
"description": "Unexpected error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment