Swagger | SpyREST | |
---|---|---|
Input | A static description of the API following the Swagger Specification | A set of executable API examples |
Output | An interactive API explorer showing API structure, Generated API client code | An interactive API explorer, showing API structure and examples |
Technique | Transform a specification file into HTML / Client code | Automatically record and transform example API calls into HTML documentation / Client code |
Focus | Is on API structure, example data is not included | Is on API examples, structure is inferred following patterns |
Learning | Developers need to learn the Swagger Specification | Developers need to know how to run example API calls with a proxy and HTTP headers |
Maintenance | Developers maintain a static swagger specification file | Developers maintain automated API examaple runner scripts such as a test suite |
Updates | Developers manually update the specification when API changes | API docum |
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
curl -XPOST https://api.nutritionix.com/v1_1/search -H 'Content-Type: application/json' -d "{\"appId\":\"27bea288\",\"appKey\":\"20e7dbd58d07239743c441a2488f3cbb\",\"query\":\"Coffee\"}" -H "x-spy-rest-desc: Search all items" -k -x "http://spyrest.com:9081" | |
curl -XPOST https://api.nutritionix.com/v1_1/search -H 'Content-Type: application/json' -d "{\"appId\":\"27bea288\",\"appKey\":\"20e7dbd58d07239743c441a2488f3cbb\",\"query\":\"Coffee\",\"filters\":{\"item_type\":2}}" -H "x-spy-rest-desc: Filter for packaged items" -k -x "http://spyrest.com:9081" | |
curl -XPOST https://api.nutritionix.com/v1_1/search -H 'Content-Type: application/json' -d "{\"appId\":\"27bea288\",\"appKey\":\"20e7dbd58d07239743c441a2488f3cbb\",\"query\":\"Coffee\",\"filters\":{\"not\":{\"item_type\":2}}}" -H "x-spy-rest-desc: Filter all but restaurants" -k -x "http://spyrest.com:9081" |
- Canada is a constitutional monarchy, a parliamentary democracy and a federal state
- Canadian law has several sources, including laws passed by Parliament and the provincial legislatures, English common law, the civil code of France and the unwritten constitution that we have inherited from Great Britain.
- Magna Carta in 1215 in England (also known as the Great Charter of Freedoms)
- Habeas corpus, the right to challenge unlawful detention by the state, comes from English common law.
- The Constitution of Canada was amended in 1982 to entrench the Canadian Charter of Rights and Freedoms
- The most important of these include: Mobility Rights, Aboriginal Peoples’ Rights, Official Language Rights and Minority Language Educational Rights, Multiculturalism
- There is no compulsory military service in Canada
- Our institutions uphold a commitment to Peace, Order, and Good Government, a key phrase in Canada’s original constitutional document in 1867, the British North America Act.
- poets and songwriters have hai
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
A systematic literature review (often referred to as a systematic review) is a means of identifying, evaluating and interpreting all available research relevant to a particular research question, or topic area, or phenomenon of interest. Individual studies contributing to a systematic review are called primary studies; a systematic review is a form of secondary study. | |
Systematic reviews start by defining a review protocol that specifies the research question being addressed and the methods that will be used to perform the review. | |
• Systematic reviews are based on a defined search strategy that aims to detect as much of the relevant literature as possible. | |
• Systematic reviews document their search strategy so that readers can assess their rigour and the completeness and repeatability of the process (bearing in mind that searches of digital libraries are almost impossible to replicate). | |
• Systematic reviews require explicit inclusion and exclusion criteria to assess each potential primary study. | |
• Systema |
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
Because I think the hardest part of getting started with AngularJS is it's esoteric names, I'm suggesting the following replacements of the AngularJS terminology. | |
scope -> state | |
factory -> data/models | |
filter -> helper | |
directive {restrict: 'E'} -> custom_tag | |
directive {restrict: 'A'} -> custom_attribute |
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
<# All $ ready moves to erb pages %> | |
<%= content_for :scripts %> | |
$(function(){ | |
new LoginForm({form: $('#the-form')}) | |
}); | |
<% end %> |
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
class MyModel < ActiveRecord::Base | |
def weather | |
"cloudy" | |
end | |
def as_json(options = {}) | |
super(options.merge(methods: weather)) | |
end |
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 mehtod is taken from: https://gist.github.com/cyberfox/1301931 | |
var humanize = function(property) { | |
return property.replace(/_/g, ' ') | |
.replace(/(\w+)/g, function(match) { | |
return match.charAt(0).toUpperCase() + match.slice(1); | |
}); | |
}; | |
console.dir($.map($('.translation_missing'), function(e){ var key = e.title.split(":")[1].trim().substring(3); return key + ": '" + humanize(key) + "' "; })); |