|
|
@@ -4,7 +4,8 @@
|
|
|
|
|
|
const https = require('https');
|
|
|
const team = 'team';
|
|
|
-const token = 'api token';
|
|
|
+const token = 'token';
|
|
|
+
|
|
|
var options = {
|
|
|
protocol: 'https:',
|
|
|
host: `${team}.qiita.com`,
|
|
|
@@ -19,7 +20,7 @@ function restAPI(path) {
|
|
|
options.path = `/api/v2/${path}`;
|
|
|
const req = https.request(options, (res) => {
|
|
|
res.on('data', (chunk) => {
|
|
|
- console.log(`BODY: ${chunk}`);
|
|
|
+ console.log(`${chunk}`);
|
|
|
return chunk;
|
|
|
});
|
|
|
})
|
|
|
@@ -32,5 +33,14 @@ function restAPI(path) {
|
|
|
};
|
|
|
|
|
|
return {
|
|
|
+ // tags: restAPI('tags'),
|
|
|
+ // templates: restAPI('templates'),
|
|
|
+ // projects: restAPI('projects'),
|
|
|
+ // users: restAPI('users'),
|
|
|
+ // comments: restAPI(`items/${item_id}/comments`),
|
|
|
+ // project_comments: restAPI(`projects/${project_id}/comments`),
|
|
|
+ // itemreactions: restAPI(`items/${item_id}/reactions`),
|
|
|
+ // comment_reactions: restAPI(`comments/${comment_id}/reactions`),
|
|
|
+ // project_reactions: restAPI(`projects/${project_id}/reactions`),
|
|
|
items: restAPI('items')
|
|
|
}
|