Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kindred-api

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kindred-api - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

21

dist/kindred-api.js

@@ -159,5 +159,14 @@ (function (global, factory) {

var codes = {
400: 'Bad Request',
403: 'Forbidden',
404: 'Not Found',
415: 'Unsupported Media Type',
429: 'Rate Limit Exceeded',
500: 'Internal Service Error',
503: 'Service Unavailable'
};
var getResponseMessage = function getResponseMessage(code) {
var message = codes[code];
if (!message) return;

@@ -262,6 +271,6 @@ return message;

if (statusCode >= 200 && statusCode < 300) statusMessage = chalk.green(statusCode);else if (statusCode >= 400 && statusCode < 500) statusMessage = chalk.red(statusCode);else if (statusCode >= 500) statusMessage = chalk.bold.red(statusCode);
if (statusCode >= 200 && statusCode < 300) statusMessage = chalk.green(statusCode);else if (statusCode >= 400 && statusCode < 500) statusMessage = chalk.red(statusCode + ' ' + getResponseMessage(statusCode));else if (statusCode >= 500) statusMessage = chalk.bold.red(statusCode + ' ' + getResponseMessage(statusCode));
if (_this.debug) {
console.log(response && statusMessage, reqUrl);
console.log(statusMessage, reqUrl);
console.log({

@@ -286,3 +295,3 @@ 'x-app-rate-limit-count': response.headers['x-app-rate-limit-count'],

if (statusCode >= 400) return cb(statusMessage);else return cb(error, JSON.parse(body));
if (statusCode >= 400) return cb(statusMessage + ' : ' + chalk.yellow(reqUrl));else return cb(error, JSON.parse(body));
});

@@ -299,3 +308,3 @@ } else {

if (statusCode >= 200 && statusCode < 300) statusMessage = chalk.green(statusCode);else if (statusCode >= 400 && statusCode < 500) statusMessage = chalk.red(statusCode);else if (statusCode >= 500) statusMessage = chalk.bold.red(statusCode);
if (statusCode >= 200 && statusCode < 300) statusMessage = chalk.green(statusCode);else if (statusCode >= 400 && statusCode < 500) statusMessage = chalk.red(statusCode + ' ' + getResponseMessage(statusCode));else if (statusCode >= 500) statusMessage = chalk.bold.red(statusCode + ' ' + getResponseMessage(statusCode));

@@ -312,3 +321,3 @@ if (_this2.debug) {

if (statusCode >= 400) return cb(response && statusMessage + ': ' + getResponseMessage(statusCode));else return cb(error, JSON.parse(body));
if (statusCode >= 400) return cb(statusMessage + ' : ' + chalk.yellow(reqUrl));else return cb(error, JSON.parse(body));
});

@@ -315,0 +324,0 @@ }

@@ -1,1 +0,1 @@

!function(e,t){if("function"==typeof define&&define.amd)define("kindred-api",["module","double-ended-queue","request","chalk","xregexp"],t);else if("undefined"!=typeof exports)t(module,require("double-ended-queue"),require("request"),require("chalk"),require("xregexp"));else{var r={exports:{}};t(r,e.doubleEndedQueue,e.request,e.chalk,e.xregexp),e.kindredApi=r.exports}}(this,function(e,t,r,n,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(){function e(r,n){o(this,e),this.allowedRequests=r,this.seconds=n,this.madeRequests=new t}return a(e,[{key:"__reload",value:function(){for(var e=(new Date).getTime();this.madeRequests.length>0&&e-this.madeRequests.peekFront()>=1e3*this.seconds;)this.madeRequests.shift()}},{key:"addRequest",value:function(){this.madeRequests.push((new Date).getTime()+(1e3*this.seconds+1e3*this.seconds/75))}},{key:"requestAvailable",value:function(){return this.__reload(),this.madeRequests.length<this.allowedRequests}}]),e}(),l={BRAZIL:"BR1",EUROPE:"EUN1",EUROPE_WEST:"EUW1",KOREA:"KR",LATIN_AMERICA_NORTH:"LA1",LATIN_AMERICA_SOUTH:"LA2",NORTH_AMERICA:"NA1",OCEANIA:"OC1",RUSSIA:"RU",TURKEY:"TR1",JAPAN:"JP1"},m={BRAZIL:"br",EUROPE:"eune",EUROPE_WEST:"euw",KOREA:"kr",LATIN_AMERICA_NORTH:"lan",LATIN_AMERICA_SOUTH:"las",NORTH_AMERICA:"na",OCEANIA:"oce",RUSSIA:"ru",TURKEY:"tr",JAPAN:"jp"},g={br:"BRAZIL",eune:"EUROPE",euw:"EUROPE_WEST",kr:"KOREA",lan:"LATIN_AMERICA_NORTH",las:"LATIN_AMERICA_SOUTH",na:"NORTH_AMERICA",oce:"OCEANIA",ru:"RUSSIA",tr:"TURKEY",jp:"JAPAN"},d={CHAMPION:1.2,CURRENT_GAME:1,FEATURED_GAMES:1,GAME:1.3,LEAGUE:2.5,STATIC_DATA:1.2,STATUS:1,MATCH:2.2,MATCH_LIST:2.2,RUNES_MASTERIES:1.4,STATS:1.3,SUMMONER:1.4},h={int:function(e){return e.every(function(e){return Number.isInteger(e)})},string:function(e){return e.every(function(e){return"string"==typeof e})}},p={int:function(e){return e&&Array.isArray(e)&&h.int(e)&&e.length>0},string:function(e){return e&&Array.isArray(e)&&h.string(e)&&e.length>0}},y=function(e){var t=codes[e];if(t)return t},c=i("^[0-9\\p{L} _\\.]+$"),v=function(){function e(t){var r=t.key,n=t.defaultRegion,i=void 0===n?m.NORTH_AMERICA:n,s=t.debug,a=void 0!==s&&s,l=t.limits;o(this,e),this.key=r,this.defaultRegion=i,this.debug=a,l&&(this.limits=[new u(l[0][0],l[0][1]),new u(l[1][0],l[1][1])])}return a(e,[{key:"canMakeRequest",value:function(){return!(!this.limits[0].requestAvailable()||!this.limits[1].requestAvailable())}},{key:"_sanitizeName",value:function(e){if(this._validName(e))return e.replace(/\s/g,"").toLowerCase();this._logError(this._validName.name,"Name "+n.yellow(e)+" is not valid. Request failed."),process.exit(1)}},{key:"_validName",value:function(e){return c.test(e)}},{key:"_makeUrl",value:function(e,t,r,n,i,o){var s=r?"":t+"/";return"https://"+t+".api.riotgames.com/"+(n||i||o?"":"api/lol/"+s)+encodeURI(e)+"?api_key="+this.key}},{key:"_baseRequest",value:function(e,t){var i=this,o=e.endUrl,s=e.region,a=void 0===s?this.defaultRegion:s,u=e.status,l=void 0!==u&&u,m=e.observerMode,g=void 0!==m&&m,d=e.staticReq,h=void 0!==d&&d,p=e.championMastery,c=void 0!==p&&p,v=e.options,f=void 0===v?{}:v,R=h?"global":a,_=this._makeUrl(o,R,h,l,g,c);if(!t)return void console.log(n.red("error: No callback passed in for the method call regarding `"+n.yellow(_)+"`"));this.limits?function e(){var i=this;this.canMakeRequest()?(h||(this.limits[0].addRequest(),this.limits[1].addRequest()),r({url:_,qs:f},function(r,o,s){var a=void 0,u=o.statusCode;return u>=200&&u<300?a=n.green(u):u>=400&&u<500?a=n.red(u):u>=500&&(a=n.bold.red(u)),i.debug&&(console.log(o&&a,_),console.log({"x-app-rate-limit-count":o.headers["x-app-rate-limit-count"],"x-method-rate-limit-count":o.headers["x-method-rate-limit-count"],"x-rate-limit-count":o.headers["x-rate-limit-count"],"retry-after":o.headers["retry-after"]}),console.log()),u>=500&&i.limits&&(i.debug&&console.log("!!! resending request !!!"),setTimeout(e.bind(i),1e3)),429===u&&i.limits&&(i.debug&&console.log("!!! resending request !!!"),setTimeout(e.bind(i),1e3*o.headers["retry-after"]+50)),u>=400?t(a):t(r,JSON.parse(s))})):setTimeout(e.bind(this),1e3)}.bind(this)(_,f):r({url:_,qs:f},function(e,r,o){var s=void 0,a=r.statusCode;return a>=200&&a<300?s=n.green(a):a>=400&&a<500?s=n.red(a):a>=500&&(s=n.bold.red(a)),i.debug&&(console.log(r&&s,_),console.log({"x-app-rate-limit-count":r.headers["x-app-rate-limit-count"],"x-method-rate-limit-count":r.headers["x-method-rate-limit-count"],"x-rate-limit-count":r.headers["x-rate-limit-count"],"retry-after":r.headers["retry-after"]})),a>=400?t(r&&s+": "+y(a)):t(e,JSON.parse(o))})}},{key:"_observerRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"observer-mode/rest/"+r,observerMode:!0,region:n},t)}},{key:"_championRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.CHAMPION+"/"+r,region:n,options:i},t)}},{key:"_championMasteryRequest",value:function(e,t){var r=e.endUrl,n=(e.region,e.options);return this._baseRequest({endUrl:"championmastery/location/"+r,options:n,championMastery:!0},t)}},{key:"_currentGameRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.platformId;return this._observerRequest({endUrl:"consumer/getSpectatorGameInfo/"+i+"/"+r,region:n},t)}},{key:"_staticRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=void 0===n?this.defaultRegion:n,o=e.options;return this._baseRequest({endUrl:"static-data/"+i+"/v"+d.STATIC_DATA+"/"+r,staticReq:!0,region:i,options:o},t)}},{key:"_statusRequest",value:function(e,t){var r=e.endUrl,n=(e.region,e.options);return this._baseRequest({endUrl:"lol/status/v"+d.STATUS+"/"+r,status:!0,options:n},t)}},{key:"_gameRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"v"+d.GAME+"/game/"+r,region:n},t)}},{key:"_leagueRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.LEAGUE+"/league/"+r,region:n,options:i},t)}},{key:"_matchRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.MATCH+"/match/"+r,region:n,options:i},t)}},{key:"_matchListRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.MATCH_LIST+"/matchlist/by-summoner/"+r,region:n,options:i},t)}},{key:"_runesMasteriesRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._summonerRequest({endUrl:r,region:n},t)}},{key:"_statsRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.STATS+"/stats/by-summoner/"+r,region:n,options:i},t)}},{key:"_summonerRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"v"+d.SUMMONER+"/summoner/"+r,region:n},t)}},{key:"_logError",value:function(e,t){console.log(n.bold.yellow(e),n.red("request"),n.bold.red("FAILED")+n.red("; "+t))}},{key:"setRegion",value:function(e){this.defaultRegion=e}},{key:"getChamps",value:function(e,t){var r=e.region,n=e.options;return this._championRequest({endUrl:"champion",region:r,options:n},t=r||n?t:arguments[0])}},{key:"getChamp",value:function(e,t){var r=e.region,i=e.id,o=e.championID;return Number.isInteger(i)||Number.isInteger(o)?this._championRequest({endUrl:"champion/"+(i||o),region:r}):this._logError(this.getChamp.name,"required params "+n.yellow("`id/championID` (int)")+" not passed in")}},{key:"getChampMastery",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=void 0===t?this.defaultRegion:t,i=e.playerID,o=e.championID,s=e.options,a=arguments[1];if(Number.isInteger(i)&&Number.isInteger(o)){var u=l[g[r]];return this._championMasteryRequest({endUrl:u+"/player/"+i+"/champion/"+o,region:r,options:s},a)}return this._logError(this.getChampMastery.name,"required params "+n.yellow("`playerID` (int) AND `championID` (int)")+" not passed in")}},{key:"getChampMasteries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=t.options,h=arguments[1];if(Number.isInteger(o||a||u)){var p=l[g[i]];return this._championMasteryRequest({endUrl:p+"/player/"+(o||a||u)+"/champions",region:i,options:d},h)}if("object"===s(arguments[0])&&"string"==typeof m){var y=l[g[i]];return this.getSummoner({name:m,region:i},function(t,r){return t?h(t):e._championMasteryRequest({endUrl:y+"/player/"+r[e._sanitizeName(m)].id+"/champions",region:i},h)})}return this._logError(this.getChampMasteries.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getTotalChampMasteryScore",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=t.options,h=arguments[1];if(Number.isInteger(o||a||u)){var p=l[g[i]];return this._championMasteryRequest({endUrl:p+"/player/"+(o||a||u)+"/score",region:i,options:d},h)}if("object"===s(arguments[0])&&"string"==typeof m){var y=l[g[i]];return this.getSummoner({name:m,region:i},function(t,r){return t?h(t):e._championMasteryRequest({endUrl:y+"/player/"+r[e._sanitizeName(m)].id+"/score",region:i},h)})}return this._logError(this.getTotalChampMasteryScore.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getTopChamps",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=t.options,h=arguments[1];if(Number.isInteger(o||a||u)){var p=l[g[i]];return this._championMasteryRequest({endUrl:p+"/player/"+(o||a||u)+"/topchampions",region:i,options:d},h)}if("object"===s(arguments[0])&&"string"==typeof m){var y=l[g[i]];return this.getSummoner({name:m,region:i},function(t,r){return t?h(t):e._championMasteryRequest({endUrl:y+"/player/"+r[e._sanitizeName(m)].id+"/topchampions",region:i},h)})}return this._logError(this.getTopChamps.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getCurrentGame",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=arguments[1],h=l[g[i]];return Number.isInteger(o||a||u)?this._currentGameRequest({endUrl:""+(o||a||u),platformId:h,region:i},d):"object"===s(arguments[0])&&"string"==typeof m?this.getSummoner({name:m,region:i},function(t,r){return t?d(t):e._currentGameRequest({endUrl:""+r[e._sanitizeName(m)].id,platformId:h,region:i},d)}):this._logError(this.getCurrentGame.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getFeaturedGames",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._observerRequest({endUrl:"featured",region:t},r=t?r:arguments[0])}},{key:"getRecentGames",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=arguments[1];return Number.isInteger(i||o||a)?this._gameRequest({endUrl:"by-summoner/"+(i||o||a)+"/recent",region:r},l):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?l(t):e._gameRequest({endUrl:"by-summoner/"+n[e._sanitizeName(u)].id+"/recent",region:r},l)}):this._logError(this.getRecentGames.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getLeagues",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._leagueRequest({endUrl:"by-summoner/"+(i||a||l).join(","),region:r},h):Number.isInteger(i||o||a||u||l||m)?this._leagueRequest({endUrl:"by-summoner/"+(i||o||a||u||l||m),region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._leagueRequest({endUrl:"by-summoner/"+i.join(","),region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?this._logError(this.getLeagues.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._leagueRequest({endUrl:"by-summoner/"+n[e._sanitizeName(g||d)].id,region:r},h)})}},{key:"getLeagueEntries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._leagueRequest({endUrl:"by-summoner/"+(i||a||l).join(",")+"/entry",region:r},h):Number.isInteger(i||o||a||u||l||m)?this._leagueRequest({endUrl:"by-summoner/"+(i||o||a||u||l||m)+"/entry",region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._leagueRequest({endUrl:"by-summoner/"+i.join(",")+"/entry",region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?void this._logError(this.getLeagueEntries.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._leagueRequest({endUrl:"by-summoner/"+n[e._sanitizeName(g||d)].id+"/entry",region:r},h)})}},{key:"getChallengers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=void 0===r?{type:"RANKED_SOLO_5x5"}:r,i=arguments[1];return this._leagueRequest({endUrl:"challenger",region:t,options:n},i=t?i:arguments[0])}},{key:"getMasters",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=void 0===r?{type:"RANKED_SOLO_5x5"}:r,i=arguments[1];return this._leagueRequest({endUrl:"master",region:t,options:n},i=t?i:arguments[0])}},{key:"getChampionList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"champion",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getChampion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.championID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"champion/"+(r||i),region:t,options:o},s):this._logError(this.getChampion.name,"required params "+n.yellow("`id/championID` (int)")+" not passed in")}},{key:"getItems",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"item",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.itemID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"item/"+(r||i),region:t,options:o},s):this._logError(this.getItem.name,"required params "+n.yellow("`id/itemID` (int)")+" not passed in")}},{key:"getLanguageStrings",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"language-strings",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getLanguages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._staticRequest({endUrl:"languages",region:t},r=t?r:arguments[0])}},{key:"getMap",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"map",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getMasteryList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"mastery",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getMastery",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.masteryID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"mastery/"+(r||i),region:t,options:o},s):this._logError(this.getMastery.name,"required params "+n.yellow("`id/masteryID` (int)")+" not passed in")}},{key:"getRealmData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._staticRequest({endUrl:"realm",region:t},r=t?r:arguments[0])}},{key:"getRuneList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"rune",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getRune",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.runeID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"rune/"+(r||i),region:t,options:o},s):this._logError(this.getRune.name,"required params "+n.yellow("`id/runeID` (int)")+" not passed in")}},{key:"getSummonerSpells",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"summoner-spell",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getSummonerSpell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.spellID,o=e.summonerSpellID,s=e.options,a=arguments[1];return Number.isInteger(r||i||o)?this._staticRequest({endUrl:"summoner-spell/"+(r||i||o),region:t,options:s},a):this._logError(this.getSummonerSpell.name,"required params "+n.yellow("`id/spellID/summonerSpellID` (int)")+" not passed in")}},{key:"getVersionData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"versions",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getShardStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._statusRequest({endUrl:"shard",region:t},r=t?r:arguments[0])}},{key:"getShardList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._statusRequest({endUrl:"shards",region:t},r=t?r:arguments[0])}},{key:"getMatch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.matchID,o=e.options,s=void 0===o?{includeTimeline:!0}:o,a=arguments[1];return Number.isInteger(r||i)?this._matchRequest({endUrl:""+(r||i),region:t,options:s},a):this._logError(this.getMatch.name,"required params "+n.yellow("`id/matchID` (int)")+" not passed in")}},{key:"getMatchList",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=t.options,m=void 0===l?{rankedQueues:"RANKED_SOLO_5x5"}:l,g=arguments[1];return Number.isInteger(i||o||a)?this._matchListRequest({endUrl:""+(i||o||a),region:r,options:m},g):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?g(t):e._matchListRequest({endUrl:""+n[e._sanitizeName(u)].id,region:r,options:m},g)}):this._logError(this.getMatchList.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getRunes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._runesMasteriesRequest({endUrl:(i||a||l).join()+"/runes",region:r},h):Number.isInteger(i||o||a||u||l||m)?this._runesMasteriesRequest({endUrl:(i||o||a||u||l||m)+"/runes",region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._runesMasteriesRequest({endUrl:i.join(",")+"/runes",region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?this._logError(this.getRunes.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._runesMasteriesRequest({endUrl:n[e._sanitizeName(g||d)].id+"/runes",region:r},h)})}},{key:"getMasteries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._runesMasteriesRequest({endUrl:(i||a||l).join()+"/masteries",region:r},h):Number.isInteger(i||o||a||u||l||m)?this._runesMasteriesRequest({endUrl:(i||o||a||u||l||m)+"/masteries",region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._runesMasteriesRequest({endUrl:i.join(",")+"/masteries",region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?this._logError(this.getMasteries.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._runesMasteriesRequest({endUrl:n[e._sanitizeName(g||d)].id+"/masteries",region:r},h)})}},{key:"getRankedStats",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=t.options,m=arguments[1];return Number.isInteger(i||o||a)?this._statsRequest({endUrl:(i||o||a)+"/ranked",region:r,options:l},m):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?m(t):e._statsRequest({endUrl:n[e._sanitizeName(u)].id+"/ranked",region:r,options:l},m)}):void this._logError(this.getRankedStats.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getStatsSummary",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=t.options,m=arguments[1];return Number.isInteger(i||o||a)?this._statsRequest({endUrl:(i||o||a)+"/summary",region:r,options:l},m):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?m(t):e._statsRequest({endUrl:n[e._sanitizeName(u)].id+"/summary",region:r,options:l},m)}):void this._logError(this.getRankedStats.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getSummoners",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._summonerRequest({endUrl:""+(i||a||l).join(","),region:r},h):Number.isInteger(i||o||a||u||l||m)?this._summonerRequest({endUrl:""+(i||o||a||u||l||m),region:r},h):p.string(g)?this._summonerRequest({endUrl:"by-name/"+g.map(function(t){return e._sanitizeName(t)}).join(","),region:r},h):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?void this._logError(this.getSummoners.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this._summonerRequest({endUrl:"by-name/"+this._sanitizeName(g||d),region:r},h)}},{key:"getSummoner",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.summonerID,o=e.playerID,a=e.name,u=arguments[1];return Number.isInteger(r||i||o)?this.getSummoners({region:t,ids:[r||i||o]},u):"object"===s(arguments[0])&&"string"==typeof a?this.getSummoners({region:t,names:[a]},u):this._logError(this.getSummoner.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getSummonerNames",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.ids,i=e.id,o=e.summonerIDs,s=e.summonerID,a=e.playerIDs,u=e.playerID,l=arguments[1];return p.int(r||o||a)?this._summonerRequest({endUrl:(r||o||a).join(",")+"/name",region:t},l):Number.isInteger(r||i||o||s||a||u)?this._summonerRequest({endUrl:(r||i||o||s||a||u)+"/name",region:t},l):void this._logError(this.getSummonerNames.name,"required params "+n.yellow("required params `ids/summonerIDs/playerIDs` ([int]/int)")+" or "+n.yellow("`id/summonerID/playerID` (int)")+" not passed in")}},{key:"getSummonerName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.summonerID,o=e.playerID,s=arguments[1];if(Number.isInteger(r))return this.getSummonerNames({region:t,id:r||i||o},s);this._logError(this.getSummonerName.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" not passed in")}}]),e}();e.exports=v});
!function(e,t){if("function"==typeof define&&define.amd)define("kindred-api",["module","double-ended-queue","request","chalk","xregexp"],t);else if("undefined"!=typeof exports)t(module,require("double-ended-queue"),require("request"),require("chalk"),require("xregexp"));else{var r={exports:{}};t(r,e.doubleEndedQueue,e.request,e.chalk,e.xregexp),e.kindredApi=r.exports}}(this,function(e,t,r,n,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(){function e(r,n){o(this,e),this.allowedRequests=r,this.seconds=n,this.madeRequests=new t}return a(e,[{key:"__reload",value:function(){for(var e=(new Date).getTime();this.madeRequests.length>0&&e-this.madeRequests.peekFront()>=1e3*this.seconds;)this.madeRequests.shift()}},{key:"addRequest",value:function(){this.madeRequests.push((new Date).getTime()+(1e3*this.seconds+1e3*this.seconds/75))}},{key:"requestAvailable",value:function(){return this.__reload(),this.madeRequests.length<this.allowedRequests}}]),e}(),l={BRAZIL:"BR1",EUROPE:"EUN1",EUROPE_WEST:"EUW1",KOREA:"KR",LATIN_AMERICA_NORTH:"LA1",LATIN_AMERICA_SOUTH:"LA2",NORTH_AMERICA:"NA1",OCEANIA:"OC1",RUSSIA:"RU",TURKEY:"TR1",JAPAN:"JP1"},m={BRAZIL:"br",EUROPE:"eune",EUROPE_WEST:"euw",KOREA:"kr",LATIN_AMERICA_NORTH:"lan",LATIN_AMERICA_SOUTH:"las",NORTH_AMERICA:"na",OCEANIA:"oce",RUSSIA:"ru",TURKEY:"tr",JAPAN:"jp"},g={br:"BRAZIL",eune:"EUROPE",euw:"EUROPE_WEST",kr:"KOREA",lan:"LATIN_AMERICA_NORTH",las:"LATIN_AMERICA_SOUTH",na:"NORTH_AMERICA",oce:"OCEANIA",ru:"RUSSIA",tr:"TURKEY",jp:"JAPAN"},d={CHAMPION:1.2,CURRENT_GAME:1,FEATURED_GAMES:1,GAME:1.3,LEAGUE:2.5,STATIC_DATA:1.2,STATUS:1,MATCH:2.2,MATCH_LIST:2.2,RUNES_MASTERIES:1.4,STATS:1.3,SUMMONER:1.4},h={int:function(e){return e.every(function(e){return Number.isInteger(e)})},string:function(e){return e.every(function(e){return"string"==typeof e})}},p={int:function(e){return e&&Array.isArray(e)&&h.int(e)&&e.length>0},string:function(e){return e&&Array.isArray(e)&&h.string(e)&&e.length>0}},y={400:"Bad Request",403:"Forbidden",404:"Not Found",415:"Unsupported Media Type",429:"Rate Limit Exceeded",500:"Internal Service Error",503:"Service Unavailable"},c=function(e){var t=y[e];if(t)return t},v=i("^[0-9\\p{L} _\\.]+$"),f=function(){function e(t){var r=t.key,n=t.defaultRegion,i=void 0===n?m.NORTH_AMERICA:n,s=t.debug,a=void 0!==s&&s,l=t.limits;o(this,e),this.key=r,this.defaultRegion=i,this.debug=a,l&&(this.limits=[new u(l[0][0],l[0][1]),new u(l[1][0],l[1][1])])}return a(e,[{key:"canMakeRequest",value:function(){return!(!this.limits[0].requestAvailable()||!this.limits[1].requestAvailable())}},{key:"_sanitizeName",value:function(e){if(this._validName(e))return e.replace(/\s/g,"").toLowerCase();this._logError(this._validName.name,"Name "+n.yellow(e)+" is not valid. Request failed."),process.exit(1)}},{key:"_validName",value:function(e){return v.test(e)}},{key:"_makeUrl",value:function(e,t,r,n,i,o){var s=r?"":t+"/";return"https://"+t+".api.riotgames.com/"+(n||i||o?"":"api/lol/"+s)+encodeURI(e)+"?api_key="+this.key}},{key:"_baseRequest",value:function(e,t){var i=this,o=e.endUrl,s=e.region,a=void 0===s?this.defaultRegion:s,u=e.status,l=void 0!==u&&u,m=e.observerMode,g=void 0!==m&&m,d=e.staticReq,h=void 0!==d&&d,p=e.championMastery,y=void 0!==p&&p,v=e.options,f=void 0===v?{}:v,R=h?"global":a,I=this._makeUrl(o,R,h,l,g,y);if(!t)return void console.log(n.red("error: No callback passed in for the method call regarding `"+n.yellow(I)+"`"));this.limits?function e(){var i=this;this.canMakeRequest()?(h||(this.limits[0].addRequest(),this.limits[1].addRequest()),r({url:I,qs:f},function(r,o,s){var a=void 0,u=o.statusCode;return u>=200&&u<300?a=n.green(u):u>=400&&u<500?a=n.red(u+" "+c(u)):u>=500&&(a=n.bold.red(u+" "+c(u))),i.debug&&(console.log(a,I),console.log({"x-app-rate-limit-count":o.headers["x-app-rate-limit-count"],"x-method-rate-limit-count":o.headers["x-method-rate-limit-count"],"x-rate-limit-count":o.headers["x-rate-limit-count"],"retry-after":o.headers["retry-after"]}),console.log()),u>=500&&i.limits&&(i.debug&&console.log("!!! resending request !!!"),setTimeout(e.bind(i),1e3)),429===u&&i.limits&&(i.debug&&console.log("!!! resending request !!!"),setTimeout(e.bind(i),1e3*o.headers["retry-after"]+50)),u>=400?t(a+" : "+n.yellow(I)):t(r,JSON.parse(s))})):setTimeout(e.bind(this),1e3)}.bind(this)(I,f):r({url:I,qs:f},function(e,r,o){var s=void 0,a=r.statusCode;return a>=200&&a<300?s=n.green(a):a>=400&&a<500?s=n.red(a+" "+c(a)):a>=500&&(s=n.bold.red(a+" "+c(a))),i.debug&&(console.log(r&&s,I),console.log({"x-app-rate-limit-count":r.headers["x-app-rate-limit-count"],"x-method-rate-limit-count":r.headers["x-method-rate-limit-count"],"x-rate-limit-count":r.headers["x-rate-limit-count"],"retry-after":r.headers["retry-after"]})),a>=400?t(s+" : "+n.yellow(I)):t(e,JSON.parse(o))})}},{key:"_observerRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"observer-mode/rest/"+r,observerMode:!0,region:n},t)}},{key:"_championRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.CHAMPION+"/"+r,region:n,options:i},t)}},{key:"_championMasteryRequest",value:function(e,t){var r=e.endUrl,n=(e.region,e.options);return this._baseRequest({endUrl:"championmastery/location/"+r,options:n,championMastery:!0},t)}},{key:"_currentGameRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.platformId;return this._observerRequest({endUrl:"consumer/getSpectatorGameInfo/"+i+"/"+r,region:n},t)}},{key:"_staticRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=void 0===n?this.defaultRegion:n,o=e.options;return this._baseRequest({endUrl:"static-data/"+i+"/v"+d.STATIC_DATA+"/"+r,staticReq:!0,region:i,options:o},t)}},{key:"_statusRequest",value:function(e,t){var r=e.endUrl,n=(e.region,e.options);return this._baseRequest({endUrl:"lol/status/v"+d.STATUS+"/"+r,status:!0,options:n},t)}},{key:"_gameRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"v"+d.GAME+"/game/"+r,region:n},t)}},{key:"_leagueRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.LEAGUE+"/league/"+r,region:n,options:i},t)}},{key:"_matchRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.MATCH+"/match/"+r,region:n,options:i},t)}},{key:"_matchListRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.MATCH_LIST+"/matchlist/by-summoner/"+r,region:n,options:i},t)}},{key:"_runesMasteriesRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._summonerRequest({endUrl:r,region:n},t)}},{key:"_statsRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.STATS+"/stats/by-summoner/"+r,region:n,options:i},t)}},{key:"_summonerRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"v"+d.SUMMONER+"/summoner/"+r,region:n},t)}},{key:"_logError",value:function(e,t){console.log(n.bold.yellow(e),n.red("request"),n.bold.red("FAILED")+n.red("; "+t))}},{key:"setRegion",value:function(e){this.defaultRegion=e}},{key:"getChamps",value:function(e,t){var r=e.region,n=e.options;return this._championRequest({endUrl:"champion",region:r,options:n},t=r||n?t:arguments[0])}},{key:"getChamp",value:function(e,t){var r=e.region,i=e.id,o=e.championID;return Number.isInteger(i)||Number.isInteger(o)?this._championRequest({endUrl:"champion/"+(i||o),region:r}):this._logError(this.getChamp.name,"required params "+n.yellow("`id/championID` (int)")+" not passed in")}},{key:"getChampMastery",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=void 0===t?this.defaultRegion:t,i=e.playerID,o=e.championID,s=e.options,a=arguments[1];if(Number.isInteger(i)&&Number.isInteger(o)){var u=l[g[r]];return this._championMasteryRequest({endUrl:u+"/player/"+i+"/champion/"+o,region:r,options:s},a)}return this._logError(this.getChampMastery.name,"required params "+n.yellow("`playerID` (int) AND `championID` (int)")+" not passed in")}},{key:"getChampMasteries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=t.options,h=arguments[1];if(Number.isInteger(o||a||u)){var p=l[g[i]];return this._championMasteryRequest({endUrl:p+"/player/"+(o||a||u)+"/champions",region:i,options:d},h)}if("object"===s(arguments[0])&&"string"==typeof m){var y=l[g[i]];return this.getSummoner({name:m,region:i},function(t,r){return t?h(t):e._championMasteryRequest({endUrl:y+"/player/"+r[e._sanitizeName(m)].id+"/champions",region:i},h)})}return this._logError(this.getChampMasteries.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getTotalChampMasteryScore",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=t.options,h=arguments[1];if(Number.isInteger(o||a||u)){var p=l[g[i]];return this._championMasteryRequest({endUrl:p+"/player/"+(o||a||u)+"/score",region:i,options:d},h)}if("object"===s(arguments[0])&&"string"==typeof m){var y=l[g[i]];return this.getSummoner({name:m,region:i},function(t,r){return t?h(t):e._championMasteryRequest({endUrl:y+"/player/"+r[e._sanitizeName(m)].id+"/score",region:i},h)})}return this._logError(this.getTotalChampMasteryScore.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getTopChamps",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=t.options,h=arguments[1];if(Number.isInteger(o||a||u)){var p=l[g[i]];return this._championMasteryRequest({endUrl:p+"/player/"+(o||a||u)+"/topchampions",region:i,options:d},h)}if("object"===s(arguments[0])&&"string"==typeof m){var y=l[g[i]];return this.getSummoner({name:m,region:i},function(t,r){return t?h(t):e._championMasteryRequest({endUrl:y+"/player/"+r[e._sanitizeName(m)].id+"/topchampions",region:i},h)})}return this._logError(this.getTopChamps.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getCurrentGame",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=arguments[1],h=l[g[i]];return Number.isInteger(o||a||u)?this._currentGameRequest({endUrl:""+(o||a||u),platformId:h,region:i},d):"object"===s(arguments[0])&&"string"==typeof m?this.getSummoner({name:m,region:i},function(t,r){return t?d(t):e._currentGameRequest({endUrl:""+r[e._sanitizeName(m)].id,platformId:h,region:i},d)}):this._logError(this.getCurrentGame.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getFeaturedGames",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._observerRequest({endUrl:"featured",region:t},r=t?r:arguments[0])}},{key:"getRecentGames",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=arguments[1];return Number.isInteger(i||o||a)?this._gameRequest({endUrl:"by-summoner/"+(i||o||a)+"/recent",region:r},l):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?l(t):e._gameRequest({endUrl:"by-summoner/"+n[e._sanitizeName(u)].id+"/recent",region:r},l)}):this._logError(this.getRecentGames.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getLeagues",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._leagueRequest({endUrl:"by-summoner/"+(i||a||l).join(","),region:r},h):Number.isInteger(i||o||a||u||l||m)?this._leagueRequest({endUrl:"by-summoner/"+(i||o||a||u||l||m),region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._leagueRequest({endUrl:"by-summoner/"+i.join(","),region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?this._logError(this.getLeagues.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._leagueRequest({endUrl:"by-summoner/"+n[e._sanitizeName(g||d)].id,region:r},h)})}},{key:"getLeagueEntries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._leagueRequest({endUrl:"by-summoner/"+(i||a||l).join(",")+"/entry",region:r},h):Number.isInteger(i||o||a||u||l||m)?this._leagueRequest({endUrl:"by-summoner/"+(i||o||a||u||l||m)+"/entry",region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._leagueRequest({endUrl:"by-summoner/"+i.join(",")+"/entry",region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?void this._logError(this.getLeagueEntries.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._leagueRequest({endUrl:"by-summoner/"+n[e._sanitizeName(g||d)].id+"/entry",region:r},h)})}},{key:"getChallengers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=void 0===r?{type:"RANKED_SOLO_5x5"}:r,i=arguments[1];return this._leagueRequest({endUrl:"challenger",region:t,options:n},i=t?i:arguments[0])}},{key:"getMasters",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=void 0===r?{type:"RANKED_SOLO_5x5"}:r,i=arguments[1];return this._leagueRequest({endUrl:"master",region:t,options:n},i=t?i:arguments[0])}},{key:"getChampionList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"champion",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getChampion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.championID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"champion/"+(r||i),region:t,options:o},s):this._logError(this.getChampion.name,"required params "+n.yellow("`id/championID` (int)")+" not passed in")}},{key:"getItems",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"item",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.itemID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"item/"+(r||i),region:t,options:o},s):this._logError(this.getItem.name,"required params "+n.yellow("`id/itemID` (int)")+" not passed in")}},{key:"getLanguageStrings",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"language-strings",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getLanguages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._staticRequest({endUrl:"languages",region:t},r=t?r:arguments[0])}},{key:"getMap",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"map",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getMasteryList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"mastery",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getMastery",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.masteryID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"mastery/"+(r||i),region:t,options:o},s):this._logError(this.getMastery.name,"required params "+n.yellow("`id/masteryID` (int)")+" not passed in")}},{key:"getRealmData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._staticRequest({endUrl:"realm",region:t},r=t?r:arguments[0])}},{key:"getRuneList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"rune",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getRune",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.runeID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"rune/"+(r||i),region:t,options:o},s):this._logError(this.getRune.name,"required params "+n.yellow("`id/runeID` (int)")+" not passed in")}},{key:"getSummonerSpells",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"summoner-spell",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getSummonerSpell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.spellID,o=e.summonerSpellID,s=e.options,a=arguments[1];return Number.isInteger(r||i||o)?this._staticRequest({endUrl:"summoner-spell/"+(r||i||o),region:t,options:s},a):this._logError(this.getSummonerSpell.name,"required params "+n.yellow("`id/spellID/summonerSpellID` (int)")+" not passed in")}},{key:"getVersionData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"versions",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getShardStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._statusRequest({endUrl:"shard",region:t},r=t?r:arguments[0])}},{key:"getShardList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._statusRequest({endUrl:"shards",region:t},r=t?r:arguments[0])}},{key:"getMatch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.matchID,o=e.options,s=void 0===o?{includeTimeline:!0}:o,a=arguments[1];return Number.isInteger(r||i)?this._matchRequest({endUrl:""+(r||i),region:t,options:s},a):this._logError(this.getMatch.name,"required params "+n.yellow("`id/matchID` (int)")+" not passed in")}},{key:"getMatchList",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=t.options,m=void 0===l?{rankedQueues:"RANKED_SOLO_5x5"}:l,g=arguments[1];return Number.isInteger(i||o||a)?this._matchListRequest({endUrl:""+(i||o||a),region:r,options:m},g):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?g(t):e._matchListRequest({endUrl:""+n[e._sanitizeName(u)].id,region:r,options:m},g)}):this._logError(this.getMatchList.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getRunes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._runesMasteriesRequest({endUrl:(i||a||l).join()+"/runes",region:r},h):Number.isInteger(i||o||a||u||l||m)?this._runesMasteriesRequest({endUrl:(i||o||a||u||l||m)+"/runes",region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._runesMasteriesRequest({endUrl:i.join(",")+"/runes",region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?this._logError(this.getRunes.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._runesMasteriesRequest({endUrl:n[e._sanitizeName(g||d)].id+"/runes",region:r},h)})}},{key:"getMasteries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._runesMasteriesRequest({endUrl:(i||a||l).join()+"/masteries",region:r},h):Number.isInteger(i||o||a||u||l||m)?this._runesMasteriesRequest({endUrl:(i||o||a||u||l||m)+"/masteries",region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._runesMasteriesRequest({endUrl:i.join(",")+"/masteries",region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?this._logError(this.getMasteries.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._runesMasteriesRequest({endUrl:n[e._sanitizeName(g||d)].id+"/masteries",region:r},h)})}},{key:"getRankedStats",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=t.options,m=arguments[1];return Number.isInteger(i||o||a)?this._statsRequest({endUrl:(i||o||a)+"/ranked",region:r,options:l},m):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?m(t):e._statsRequest({endUrl:n[e._sanitizeName(u)].id+"/ranked",region:r,options:l},m)}):void this._logError(this.getRankedStats.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getStatsSummary",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=t.options,m=arguments[1];return Number.isInteger(i||o||a)?this._statsRequest({endUrl:(i||o||a)+"/summary",region:r,options:l},m):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?m(t):e._statsRequest({endUrl:n[e._sanitizeName(u)].id+"/summary",region:r,options:l},m)}):void this._logError(this.getRankedStats.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getSummoners",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._summonerRequest({endUrl:""+(i||a||l).join(","),region:r},h):Number.isInteger(i||o||a||u||l||m)?this._summonerRequest({endUrl:""+(i||o||a||u||l||m),region:r},h):p.string(g)?this._summonerRequest({endUrl:"by-name/"+g.map(function(t){return e._sanitizeName(t)}).join(","),region:r},h):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?void this._logError(this.getSummoners.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this._summonerRequest({endUrl:"by-name/"+this._sanitizeName(g||d),region:r},h)}},{key:"getSummoner",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.summonerID,o=e.playerID,a=e.name,u=arguments[1];return Number.isInteger(r||i||o)?this.getSummoners({region:t,ids:[r||i||o]},u):"object"===s(arguments[0])&&"string"==typeof a?this.getSummoners({region:t,names:[a]},u):this._logError(this.getSummoner.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getSummonerNames",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.ids,i=e.id,o=e.summonerIDs,s=e.summonerID,a=e.playerIDs,u=e.playerID,l=arguments[1];return p.int(r||o||a)?this._summonerRequest({endUrl:(r||o||a).join(",")+"/name",region:t},l):Number.isInteger(r||i||o||s||a||u)?this._summonerRequest({endUrl:(r||i||o||s||a||u)+"/name",region:t},l):void this._logError(this.getSummonerNames.name,"required params "+n.yellow("required params `ids/summonerIDs/playerIDs` ([int]/int)")+" or "+n.yellow("`id/summonerID/playerID` (int)")+" not passed in")}},{key:"getSummonerName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.summonerID,o=e.playerID,s=arguments[1];if(Number.isInteger(r))return this.getSummonerNames({region:t,id:r||i||o},s);this._logError(this.getSummonerName.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" not passed in")}}]),e}();e.exports=f});
{
"name": "kindred-api",
"version": "1.0.5",
"version": "1.0.6",
"description": "Kindred is a thin Node.js wrapper on top of Riot Games API for League of Legends",

@@ -5,0 +5,0 @@ "main": "index.js",

import responseCodes from '../constants/response-codes'
const getResponseMessage = (code) => {
const message = codes[code]
const message = responseCodes[code]
if (!message) return

@@ -7,0 +6,0 @@ return message

@@ -89,8 +89,8 @@ const request = require('request')

else if (statusCode >= 400 && statusCode < 500)
statusMessage = chalk.red(statusCode)
statusMessage = chalk.red(`${statusCode} ${getResponseMessage(statusCode)}`)
else if (statusCode >= 500)
statusMessage = chalk.bold.red(statusCode)
statusMessage = chalk.bold.red(`${statusCode} ${getResponseMessage(statusCode)}`)
if (this.debug) {
console.log(response && statusMessage, reqUrl)
console.log(statusMessage, reqUrl)
console.log({

@@ -115,3 +115,3 @@ 'x-app-rate-limit-count': response.headers['x-app-rate-limit-count'],

if (statusCode >= 400) return cb(statusMessage)
if (statusCode >= 400) return cb(statusMessage + ' : ' + chalk.yellow(reqUrl))
else return cb(error, JSON.parse(body))

@@ -129,7 +129,7 @@ })

if (statusCode >= 200 && statusCode < 300)
statusMessage = chalk.green(statusCode)
else if (statusCode >= 400 && statusCode < 500)
statusMessage = chalk.red(statusCode)
else if (statusCode >= 500)
statusMessage = chalk.bold.red(statusCode)
statusMessage = chalk.green(statusCode)
else if (statusCode >= 400 && statusCode < 500)
statusMessage = chalk.red(`${statusCode} ${getResponseMessage(statusCode)}`)
else if (statusCode >= 500)
statusMessage = chalk.bold.red(`${statusCode} ${getResponseMessage(statusCode)}`)

@@ -146,3 +146,3 @@ if (this.debug) {

if (statusCode >= 400) return cb(response && statusMessage + ': ' + getResponseMessage(statusCode))
if (statusCode >= 400) return cb(statusMessage + ' : ' + chalk.yellow(reqUrl))
else return cb(error, JSON.parse(body))

@@ -149,0 +149,0 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc