Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
silverskyvicto committed Nov 5, 2017
0 parents commit e1443d0
Show file tree
Hide file tree
Showing 628 changed files with 91,359 additions and 0 deletions.
55 changes: 55 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
const request = require('request');
const marketplaceBaseURL = "https://marketplace.atlassian.com";
const getAddonSearchAPI = "/rest/2/addons/search/brief";
const getAddonInfoAPI = "/rest/2/addons/";
const pricingInfoPart = "/pricing/server/live"
let toString = Object.prototype.toString

// HTTP header
let headers = {
'Content-Type': 'application/json'
};

let addonSearchOption = {
url: marketplaceBaseURL + getAddonSearchAPI,
method: 'GET',
header: headers,
qs: {
"q": "*gantt*"
}
};

request(addonSearchOption, function(error, response, body) {
if (body) {
const bodyParse = JSON.parse(body);
const addons = bodyParse.addons;
addons.forEach(function(addon, i, addons) {

let addonKey = addon._links.alternate.href.split("/")[2];
request({
url: marketplaceBaseURL + getAddonInfoAPI + addonKey + pricingInfoPart,
method: 'GET',
header: headers,
},
function (err, res, infoBody) {
if (infoBody) {
const infoParse = JSON.parse(infoBody);
console.log(addon.name);
console.log("最終更新日:" + infoParse.lastModified);
infoParse.items.forEach(function (info, j, infos) {
console.log("ユーザ数:" + info.editionDescription);
console.log("新規:$ " + info.amount);
console.log("更新:$ " + info.renewalAmount);
});
}
if (err) {
console.log(err);
}
}
);
});
}
if (error) {
console.log(error);
}
});
1 change: 1 addition & 0 deletions node_modules/.bin/prettyjson

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/sshpk-conv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/sshpk-sign

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/sshpk-verify

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/uuid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions node_modules/ajv/.tonic_example.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions node_modules/ajv/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e1443d0

Please sign in to comment.