Skip to content
Permalink
Browse files

Added AfricanSpending rates

  • Loading branch information...
DavidLemayian committed Feb 1, 2016
1 parent a4a780c commit e19d168cd6348384c9376cbbdd09b9da4574d46e
Showing with 43 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. 0 LICENSE → LICENSE.md
  3. +14 −0 index.js
  4. +27 −0 package.json
@@ -31,3 +31,5 @@ public/javascripts/vendor/*/
.tm_properties

Vagrantfile

public/javascripts/rates.json
File renamed without changes.
@@ -0,0 +1,14 @@
var request = require('request'),
fs = require('fs');

var url = 'https://openexchangerates.org/api/latest.json'

request({
url: url,
qs: {'app_id': '31beaa8ba1c14720bd5a8734b937069f'}
}, function (error, response, body) {

if (!error && response.statusCode === 200) {
fs.writeFileSync('public/javascripts/rates.json', body);
}
})
@@ -0,0 +1,27 @@
{
"name": "sourceafrica",
"version": "1.0.0",
"description": "sourceAFRICA is Africa's premier repository for 'actionable documents'.",
"main": "index.js",
"directories": {
"test": "test"
},
"dependencies": {
"bower": "^1.7.7",
"request": "^2.69.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/CodeForAfrica/sourceAFRICA.git"
},
"author": "",
"license": "SEE LICENSE IN LICENSE.md",
"bugs": {
"url": "https://github.com/CodeForAfrica/sourceAFRICA/issues"
},
"homepage": "https://github.com/CodeForAfrica/sourceAFRICA#readme"
}

0 comments on commit e19d168

Please sign in to comment.
You can’t perform that action at this time.