Skip to content

Instantly share code, notes, and snippets.

@KristineHines
Last active December 27, 2015 17:49
Show Gist options
  • Save KristineHines/7365074 to your computer and use it in GitHub Desktop.
Save KristineHines/7365074 to your computer and use it in GitHub Desktop.
<h1>Documentation</h1>
<script src="https://gist.github.com/KristineHines/7365074.js"></script>
##Get the names of all the organizations
PARAMS
http:// secure-temple-2418.herokuapp.com/organizations.json?app_id={app_id}&app_key={app_key}
http:// secure-temple-2418.herokuapp.com/organizations.xml?app_id={app_id}&app_key={app_key}
<div class="code">
<pre><code>
<organizations type="array">
<organization>
<name>WHO</name>
</organization>
</organizations>
</code></pre>
</div>
##Get the names of all the datasets in the specified organization
PARAMS
http:// secure-temple-2418.herokuapp.com/{organization}/datasets.json?app_id={app_id}&app_key={app_key}
[
{
"name":"Deaths Due To Tuberculosis Among HIV-negative People"
},
{
"name":"Deaths Due to Tuberculosis Among HIV-positive People"
}
]
http:// secure-temple-2418.herokuapp.com/{organization}/datasets.json.xml?app_id={app_id}&app_key={app_key}
<datasets type="array">
<dataset>
<name>
Deaths Due To Tuberculosis Among HIV-negative People
</name>
</dataset>
<dataset>
<name>
Deaths Due to Tuberculosis Among HIV-positive People
</name>
</dataset>
</datasets>
##Get the names of all the countries that are in the dataset
PARAMS
http:// secure-temple-2418.herokuapp.com/{organization}/{dataset}/countries.json?app_id={app_id}&app_key={app_key}
[
{
"name":"Afghanistan"
},
{
"name":"Albania"
}
]
http:// secure-temple-2418.herokuapp.com/{organization}/{dataset}/countries.xml?app_id={app_id}&app_key={app_key}
<countries type="array">
<country>
<name>Afghanistan</name>
</country>
<country>
<name>Albania</name>
</country>
</countries>
Get the names of the datasets that include the specified country
PARAMS
http:// secure-temple-2418.herokuapp.com/{organization}/{country}/datasets.json?app_id={app_id}&app_key={app_key}
[
{
"name":"Deaths Due To Tuberculosis Among HIV-negative People"
},
{
"name":"Deaths Due to Tuberculosis Among HIV-positive People"
}
]
http:// secure-temple-2418.herokuapp.com/{organization}/{country}/datasets.xml?app_id={app_id}&app_key={app_key}
<datasets type="array">
<dataset>
<name>Deaths Due To Tuberculosis Among HIV-negative People</name>
</dataset>
<dataset>
<name>Deaths Due to Tuberculosis Among HIV-positive People</name>
</dataset>
</datasets>
Get the records for the country in the specified dataset and organization
PARAMS
http:// secure-temple-2418.herokuapp.com/{organization}/{dataset}/{country}/records.json?app_id={app_id}&app_key={app_key}
[
{
"measurement":"per 100,000","value":22.0,"year":2007
}
]
http:// secure-temple-2418.herokuapp.com/{organization}/{dataset}/{country}/records.xml?app_id={app_id}&app_key={app_key}
<records type="array">
<record>
<measurement>per 100,000</measurement>
<value type="float">22.0</value>
<year type="integer">2007</year>
</record>
</records>
ERROR HANDLING
401: not authorized
404: not found
500: internal server error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment