-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from moakley/windexchange
Windexchange
- Loading branch information
Showing
6 changed files
with
887 additions
and
45 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.bundle | ||
.sass-cache | ||
_site | ||
crash.log | ||
tmp | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
title: WindExchange Projects | ||
summary: Query our database of WindExchange projects | ||
url: /api/windexchange/ | ||
method: GET | ||
--- | ||
|
||
<%= render("swagger_ie_warning") %> | ||
|
||
<script type="text/javascript"> | ||
$(function () { | ||
var url = window.location.search.match(/url=([^&]+)/); | ||
if (url && url.length > 1) { | ||
url = decodeURIComponent(url[1]); | ||
} else { | ||
url = "/docs/wind/windexchange/api-docs.json"; | ||
} | ||
window.swaggerUi = new SwaggerUi({ | ||
url: url, | ||
dom_id: "swagger-ui-container", | ||
supportedSubmitMethods: ['get', 'post', 'put', 'delete'], | ||
onComplete: function(swaggerApi, swaggerUi){ | ||
$('pre code').each(function(i, e) { | ||
hljs.highlightBlock(e) | ||
}); | ||
}, | ||
onFailure: function(data) { | ||
log("Unable to Load SwaggerUI"); | ||
}, | ||
docExpansion: "list", | ||
sorter : "alpha" | ||
}); | ||
|
||
// function addApiKeyAuthorization() { | ||
// var key = $('#input_apiKey')[0].value; | ||
// log("key: " + key); | ||
// if(key && key.trim() != "") { | ||
// log("added key " + key); | ||
// window.authorizations.add("api_key", new ApiKeyAuthorization("api_key", key, "query")); | ||
// } | ||
// } | ||
|
||
// $('#input_apiKey').change(function() { | ||
// addApiKeyAuthorization(); | ||
// }); | ||
|
||
|
||
window.swaggerUi.load(); | ||
}); | ||
</script> | ||
|
||
<div id="swagger-ui-container" class="swagger-ui-wrap"></div> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"swaggerVersion": "1.2", | ||
"apiVersion": "1.0.0", | ||
"basePath": "<%= ENV["SWAGGER_HOST"] || "http://localhost:3000" %>/docs/wind/windexchange/api-docs", | ||
"apis": [ | ||
{ | ||
"path": "/schoolprojects.json" | ||
}, | ||
{ | ||
"path": "/educationprojects.json" | ||
} | ||
], | ||
"info": { | ||
"title": "WindExchange Projects", | ||
"description": "Query our database of WindExchange projects" | ||
} | ||
} |
Oops, something went wrong.