We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92a5b98 commit 0d47fe0Copy full SHA for 0d47fe0
imgur-client/package.json
@@ -21,7 +21,8 @@
21
"react-router": "^1.0.0-beta2",
22
"reactify": "^1.1.0",
23
"vinyl-source-stream": "^1.1.0",
24
- "watchify": "^2.4.0"
+ "watchify": "^2.4.0",
25
+ "whatwg-fetch": "^0.9.0"
26
},
27
"devDependencies": {}
28
}
imgur-client/src/utils/api.jsx
@@ -0,0 +1,13 @@
1
+var Fetch = require('whatwg-fetch');
2
+var rootUrl = 'https://api.imgur.com/3/';
3
+var apiKey = '430d6820d865788';
4
+
5
+module.exports = {
6
+ get: function(url) {
7
+ return fetch(rootUrl + url, {
8
+ headers: {
9
+ 'Authorization': 'Client-ID ' + apiKey
10
+ }
11
+ });
12
13
+};
0 commit comments