Giter Site home page Giter Site logo

liamcottle / valorant.js Goto Github PK

View Code? Open in Web Editor NEW
100.0 9.0 17.0 133 KB

This is an unofficial NodeJS library for interacting with the VALORANT API used in game.

JavaScript 100.00%
valorant api riot js nodejs competitive match history valorant-api

valorant.js's Issues

code:ECONNRESET how can i fix it

it seems is tls problem

<ref *1> Error: Client network socket disconnected before secure TLS connection was established
    at connResetException (node:internal/errors:704:14)
    at TLSSocket.onConnectEnd (node:_tls_wrap:1590:19)
    at TLSSocket.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1358:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
 code: 'ECONNRESET',
  path: null,
  host: 'auth.riotgames.com',
  port: 443,
  localAddress: undefined,

getPlayerMMR not correctly returning LatestCompetitiveUpdate

When you use the getPlayerMMR call to get the MMR data of a player, and that player hasn't played a Competitive game as his last played game. Then the LatestCompetitiveUpdate will not have that player's latest competitive update.

Expected behavior would be that the LatestCompetitiveUpdate would always be filled with the latest competitive update.

For instance: If a player has played a Deathmatch game as his latest game, this method will be useless as it shows the info of the Deathmatch game. Which means that there is no MMR data for that player.

Big Error

If i Execute this code:

const Valorant = require('@liamcottle/valorant.js');
const valorantApi = new Valorant.API(Valorant.Regions.Europe);

function calculateElo(tier, progress) {
    if(tier >= 21) {
        return 1800 + progress
    } else {
        return ((tier * 100) - 300) + progress;
    }
}


// auth with valorant apis
valorantApi.authorize(process.env.USERNAME, process.env.PASSWORD).then(() => {


    // get player mmr
    valorantApi.getPlayerMMR(valorantApi.user_id).then((response) => {

        if(response.data.LatestCompetitiveUpdate){
            const update = response.data.LatestCompetitiveUpdate;
            var elo = calculateElo(update.TierAfterUpdate, update.RankedRatingAfterUpdate);
            console.log(`Movement: ${update.CompetitiveMovement}`);
            console.log(`Current Tier: ${update.TierAfterUpdate} (${Valorant.Tiers[update.TierAfterUpdate]})`);
            console.log(`Current Tier Progress: ${update.RankedRatingAfterUpdate}/100`);
            console.log(`Total Elo: ${elo}`);
        } else {
            console.log("No competitive update available. Have you played a competitive match yet?");
        }

    }).catch((error) => {
        console.log(error);
    });




}).catch((error) => {
    console.log(error);
});

I get a big big big big error:
X:\Benutzer\Administrator\Desktop\valoapitest\node_modules\axios\lib\core\createError.js:16
var error = new Error(message);
^

Error: Request failed with status code 404
at createError (X:\Benutzer\Administrator\Desktop\valoapitest\node_modules\axios\lib\core\createError.js:16:15)
at settle (X:\Benutzer\Administrator\Desktop\valoapitest\node_modules\axios\lib\core\settle.js:17:12)
at X:\Benutzer\Administrator\Desktop\valoapitest\node_modules\axios-cookiejar-support\lib\interceptors\response.js:83:25
at new Promise ()
at responseInterceptor (X:\Benutzer\Administrator\Desktop\valoapitest\node_modules\axios-cookiejar-support\lib\interceptors\response.js:82:9)
at X:\Benutzer\Administrator\Desktop\valoapitest\node_modules\axios-cookiejar-support\lib\index.js:130:67
at processTicksAndRejections (node:internal/process/task_queues:93:5) {
config: {
url: 'https://pd.EU.a.pvp.net/mmr/v1/players/43221288-509a-5f09-b32a-5d54883e996a',
method: 'get',
headers: {
Accept: 'application/json, text/plain, /',
Authorization: 'Bearer ey....',
'X-Riot-Entitlements-JWT': 'ey....',
'X-Riot-ClientVersion': 'release-02.01-shipping-6-511946',
'X-Riot-ClientPlatform': 'ey....',
'User-Agent': 'axios/0.21.1'
},
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
jar: undefined,
maxRedirects: 0,
data: undefined,
validateStatus: [Function: validateStatus]
},
request: <ref *2> ClientRequest {
_events: [Object: null prototype] {
error: [Function: handleRequestError],
prefinish: [Function: requestOnPrefinish]
},
_eventsCount: 2,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: <ref *1> TLSSocket {
_tlsOptions: {
allowHalfOpen: undefined,
pipe: false,
secureContext: SecureContext { context: SecureContext {}, singleUse: true },
isServer: false,
requestCert: true,
rejectUnauthorized: true,
session: undefined,
ALPNProtocols: undefined,
requestOCSP: undefined,
enableTrace: undefined,
pskCallback: undefined,
highWaterMark: undefined,
onread: undefined
},
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'pd.eu.a.pvp.net',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype] {
close: [
[Function: onSocketCloseDestroySSL],
[Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
[Function: onClose],
[Function: socketCloseListener]
],
end: [Function: onReadableStreamEnd],
newListener: [Function: keylogNewListener],
secure: [Function: onConnectSecure],
session: [Function (anonymous)],
free: [Function: onFree],
timeout: [Function: onTimeout],
agentRemove: [Function: onRemove],
error: [Function: socketErrorListener],
finish: [Function: bound onceWrapper] { listener: [Function: destroy] }
},
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'pd.eu.a.pvp.net',
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: true,
ended: false,
endEmitted: false,
reading: true,
constructed: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
destroyed: false,
errored: null,
closed: false,
closeEmitted: false,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: true,
needDrain: false,
ending: true,
ended: true,
finished: false,
destroyed: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 1,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: TLSWrap {
_parent: TCP {
reading: [Getter/Setter],
onconnection: null,
[Symbol(owner_symbol)]: [Circular *1]
},
_parentWrap: undefined,
_secureContext: SecureContext { context: SecureContext {}, singleUse: true },
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular *2],
[Symbol(res)]: TLSWrap {
_parent: TCP {
reading: [Getter/Setter],
onconnection: null,
[Symbol(owner_symbol)]: [Circular *1]
},
_parentWrap: undefined,
_secureContext: SecureContext { context: SecureContext {}, singleUse: true },
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 88,
[Symbol(kHandle)]: TLSWrap {
_parent: TCP {
reading: [Getter/Setter],
onconnection: null,
[Symbol(owner_symbol)]: [Circular *1]
},
_parentWrap: undefined,
_secureContext: SecureContext { context: SecureContext {}, singleUse: true },
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: {
rejectUnauthorized: true,
ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',
checkServerIdentity: [Function: checkServerIdentity],
minDHSize: 1024,
path: null,
method: 'GET',
headers: {
Accept: 'application/json, text/plain, /',
Authorization: 'Bearer ey....',
'X-Riot-Entitlements-JWT': 'ey....',
'X-Riot-ClientVersion': 'release-02.01-shipping-6-511946',
'X-Riot-ClientPlatform': 'ey....',
'User-Agent': 'axios/0.21.1'
},
agent: undefined,
agents: { http: undefined, https: undefined },
auth: undefined,
hostname: 'pd.eu.a.pvp.net',
port: 443,
_defaultAgent: Agent {
_events: [Object: null prototype] {
free: [Function (anonymous)],
newListener: [Function: maybeEnableKeylog]
},
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: { path: null },
requests: {},
sockets: { 'pd.eu.a.pvp.net:443:::::::::::::::::::::': [Array] },
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'fifo',
maxTotalSockets: Infinity,
totalSocketCount: 1,
maxCachedSessions: 100,
_sessionCache: { map: [Object], list: [Array] },
[Symbol(kCapture)]: false
},
host: 'pd.eu.a.pvp.net',
servername: 'pd.eu.a.pvp.net',
_agentKey: 'pd.eu.a.pvp.net:443:::::::::::::::::::::',
encoding: null,
singleUse: true
},
[Symbol(RequestTimeout)]: undefined
},
_header: 'GET /mmr/v1/players/43221288-509a-5f09-b32a-5d54883e996a HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Authorization: Bearer ey....' +
'X-Riot-Entitlements-JWT: ey....' +
'X-Riot-ClientVersion: release-02.01-shipping-6-511946\r\n' +
'X-Riot-ClientPlatform: ey....' +
'User-Agent: axios/0.21.1\r\n' +
'Host: pd.eu.a.pvp.net\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: noopPendingOutput],
agent: Agent {
_events: [Object: null prototype] {
free: [Function (anonymous)],
newListener: [Function: maybeEnableKeylog]
},
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: { path: null },
requests: {},
sockets: {
'pd.eu.a.pvp.net:443:::::::::::::::::::::': [
<ref *1> TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'pd.eu.a.pvp.net',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'pd.eu.a.pvp.net',
_readableState: [ReadableState],
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular *2],
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 88,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object],
[Symbol(RequestTimeout)]: undefined
}
]
},
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'fifo',
maxTotalSockets: Infinity,
totalSocketCount: 1,
maxCachedSessions: 100,
_sessionCache: {
map: {
'auth.riotgames.com:443:::::::::::::::::::::': Buffer(2241) [Uint8Array] [
48, 130, 8, 189, 2, 1, 1, 2, 2, 3, 3, 4,
2, 192, 47, 4, 32, 194, 169, 197, 108, 145, 207, 151,
17, 57, 93, 230, 10, 123, 176, 136, 159, 40, 99, 78,
45, 56, 67, 212, 190, 254, 167, 66, 159, 105, 186, 117,
15, 4, 48, 106, 238, 3, 84, 97, 79, 23, 110, 94,
112, 193, 56, 71, 182, 198, 154, 238, 79, 146, 62, 180,
69, 112, 166, 139, 246, 224, 73, 80, 231, 212, 33, 16,
139, 182, 77, 207, 189, 165, 90, 194, 121, 241, 44, 129,
34, 232, 8, 161,
... 2141 more items
],
'entitlements.auth.riotgames.com:443:::::::::::::::::::::': Buffer(2148) [Uint8Array] [
48, 130, 8, 96, 2, 1, 1, 2, 2, 3, 3, 4,
2, 192, 47, 4, 32, 220, 37, 213, 89, 143, 118, 8,
102, 215, 219, 47, 225, 201, 11, 107, 95, 84, 203, 191,
37, 69, 84, 197, 183, 95, 137, 66, 254, 37, 239, 134,
180, 4, 48, 107, 86, 164, 25, 24, 226, 251, 73, 92,
134, 41, 120, 18, 42, 90, 244, 255, 139, 13, 219, 209,
98, 20, 74, 74, 132, 193, 172, 224, 54, 242, 160, 109,
225, 122, 255, 225, 18, 203, 154, 129, 101, 13, 38, 151,
64, 79, 159, 161,
... 2048 more items
],
'pd.eu.a.pvp.net:443:::::::::::::::::::::': Buffer(2138) [Uint8Array] [
48, 130, 8, 86, 2, 1, 1, 2, 2, 3, 4, 4,
2, 19, 2, 4, 32, 223, 134, 185, 165, 43, 201, 14,
244, 148, 184, 72, 128, 211, 77, 111, 45, 31, 0, 56,
27, 37, 246, 173, 179, 61, 170, 151, 16, 152, 25, 214,
245, 4, 48, 79, 195, 142, 221, 118, 244, 121, 142, 0,
206, 125, 148, 37, 94, 79, 56, 9, 145, 193, 248, 120,
71, 252, 23, 33, 237, 108, 122, 22, 43, 176, 77, 119,
6, 18, 148, 219, 206, 155, 4, 107, 210, 110, 38, 234,
166, 108, 222, 161,
... 2038 more items
]
},
list: [
'auth.riotgames.com:443:::::::::::::::::::::',
'entitlements.auth.riotgames.com:443:::::::::::::::::::::',
'pd.eu.a.pvp.net:443:::::::::::::::::::::'
]
},
[Symbol(kCapture)]: false
},
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/mmr/v1/players/43221288-509a-5f09-b32a-5d54883e996a',
_ended: true,
res: IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: true,
ended: true,
endEmitted: true,
reading: false,
constructed: true,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
destroyed: true,
errored: null,
closed: true,
closeEmitted: true,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: true,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_events: [Object: null prototype] {
end: [ [Function: responseOnEnd], [Function: handleStreamEnd] ],
data: [Function: handleStreamData],
error: [Function: handleStreamError]
},
_eventsCount: 3,
_maxListeners: undefined,
socket: <ref *1> TLSSocket {
_tlsOptions: {
allowHalfOpen: undefined,
pipe: false,
secureContext: SecureContext { context: SecureContext {}, singleUse: true },
isServer: false,
requestCert: true,
rejectUnauthorized: true,
session: undefined,
ALPNProtocols: undefined,
requestOCSP: undefined,
enableTrace: undefined,
pskCallback: undefined,
highWaterMark: undefined,
onread: undefined
},
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'pd.eu.a.pvp.net',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype] {
close: [
[Function: onSocketCloseDestroySSL],
[Function],
[Function: onClose],
[Function: socketCloseListener]
],
end: [Function: onReadableStreamEnd],
newListener: [Function: keylogNewListener],
secure: [Function: onConnectSecure],
session: [Function (anonymous)],
free: [Function: onFree],
timeout: [Function: onTimeout],
agentRemove: [Function: onRemove],
error: [Function: socketErrorListener],
finish: [Function: bound onceWrapper] {
listener: [Function: destroy]
}
},
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'pd.eu.a.pvp.net',
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: true,
ended: false,
endEmitted: false,
reading: true,
constructed: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
destroyed: false,
errored: null,
closed: false,
closeEmitted: false,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: true,
needDrain: false,
ending: true,
ended: true,
finished: false,
destroyed: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 1,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: TLSWrap {
_parent: TCP {
reading: [Getter/Setter],
onconnection: null,
[Symbol(owner_symbol)]: [Circular *1]
},
_parentWrap: undefined,
_secureContext: SecureContext { context: SecureContext {}, singleUse: true },
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular *2],
[Symbol(res)]: TLSWrap {
_parent: TCP {
reading: [Getter/Setter],
onconnection: null,
[Symbol(owner_symbol)]: [Circular *1]
},
_parentWrap: undefined,
_secureContext: SecureContext { context: SecureContext {}, singleUse: true },
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 88,
[Symbol(kHandle)]: TLSWrap {
_parent: TCP {
reading: [Getter/Setter],
onconnection: null,
[Symbol(owner_symbol)]: [Circular *1]
},
_parentWrap: undefined,
_secureContext: SecureContext { context: SecureContext {}, singleUse: true },
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular 1]
},
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: {
rejectUnauthorized: true,
ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',
checkServerIdentity: [Function: checkServerIdentity],
minDHSize: 1024,
path: null,
method: 'GET',
headers: {
Accept: 'application/json, text/plain, /',
Authorization: 'Bearer ey....',
'X-Riot-ClientVersion': 'release-02.01-shipping-6-511946',
'X-Riot-ClientPlatform': 'ey....',
'User-Agent': 'axios/0.21.1'
},
agent: undefined,
agents: { http: undefined, https: undefined },
auth: undefined,
hostname: 'pd.eu.a.pvp.net',
port: 443,
_defaultAgent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object],
requests: {},
sockets: [Object],
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'fifo',
maxTotalSockets: Infinity,
totalSocketCount: 1,
maxCachedSessions: 100,
_sessionCache: [Object],
[Symbol(kCapture)]: false
},
host: 'pd.eu.a.pvp.net',
servername: 'pd.eu.a.pvp.net',
_agentKey: 'pd.eu.a.pvp.net:443:::::::::::::::::::::',
encoding: null,
singleUse: true
},
[Symbol(RequestTimeout)]: undefined
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
rawHeaders: [
'Date',
'Sun, 27 Jun 2021 15:59:41 GMT',
'Content-Type',
'application/json; charset=utf-8',
'Content-Length',
'83',
'Connection',
'close',
'Access-Control-Allow-Origin',
'
',
'X-Content-Type-Options',
'nosniff',
'CF-Cache-Status',
'DYNAMIC',
'cf-request-id',
'0aefcbc2c900003250c7b83000000001',
'Expect-CT',
'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
'Server',
'cloudflare',
'CF-RAY',
'665fe24adfde3250-FRA'
],
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 404,
statusMessage: 'Not Found',
client: <ref *1> TLSSocket {
_tlsOptions: {
allowHalfOpen: undefined,
pipe: false,
secureContext: SecureContext { context: SecureContext {}, singleUse: true },
isServer: false,
requestCert: true,
rejectUnauthorized: true,
session: undefined,
ALPNProtocols: undefined,
requestOCSP: undefined,
enableTrace: undefined,
pskCallback: undefined,
highWaterMark: undefined,
onread: undefined
},
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'pd.eu.a.pvp.net',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype] {
close: [
[Function: onSocketCloseDestroySSL],
[Function],
[Function: onClose],
[Function: socketCloseListener]
],
end: [Function: onReadableStreamEnd],
newListener: [Function: keylogNewListener],
secure: [Function: onConnectSecure],
session: [Function (anonymous)],
free: [Function: onFree],
timeout: [Function: onTimeout],
agentRemove: [Function: onRemove],
error: [Function: socketErrorListener],
finish: [Function: bound onceWrapper] {
listener: [Function: destroy]
}
},
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'pd.eu.a.pvp.net',
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: true,
ended: false,
endEmitted: false,
reading: true,
constructed: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
destroyed: false,
errored: null,
closed: false,
closeEmitted: false,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: true,
needDrain: false,
ending: true,
ended: true,
finished: false,
destroyed: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 1,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: TLSWrap {
_parent: TCP {
reading: [Getter/Setter],
onconnection: null,
[Symbol(owner_symbol)]: [Circular *1]
},
_parentWrap: undefined,
_secureContext: SecureContext { context: SecureContext {}, singleUse: true },
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular *2],
[Symbol(res)]: TLSWrap {
_parent: TCP {
reading: [Getter/Setter],
onconnection: null,
[Symbol(owner_symbol)]: [Circular *1]
},
_parentWrap: undefined,
_secureContext: SecureContext { context: SecureContext {}, singleUse: true },
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 88,
[Symbol(kHandle)]: TLSWrap {
_parent: TCP {
reading: [Getter/Setter],
onconnection: null,
[Symbol(owner_symbol)]: [Circular *1]
},
_parentWrap: undefined,
_secureContext: SecureContext { context: SecureContext {}, singleUse: true },
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular 1]
},
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: {
rejectUnauthorized: true,
ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',
checkServerIdentity: [Function: checkServerIdentity],
minDHSize: 1024,
path: null,
method: 'GET',
headers: {
Accept: 'application/json, text/plain, /',
Authorization: 'Bearer ey....', 'X-Riot-Entitlements-JWT': 'ey....',
'X-Riot-ClientVersion': 'release-02.01-shipping-6-511946',
'X-Riot-ClientPlatform': 'ey....',
'User-Agent': 'axios/0.21.1'
},
agent: undefined,
agents: { http: undefined, https: undefined },
auth: undefined,
hostname: 'pd.eu.a.pvp.net',
port: 443,
_defaultAgent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object],
requests: {},
sockets: [Object],
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'fifo',
maxTotalSockets: Infinity,
totalSocketCount: 1,
maxCachedSessions: 100,
_sessionCache: [Object],
[Symbol(kCapture)]: false
},
host: 'pd.eu.a.pvp.net',
servername: 'pd.eu.a.pvp.net',
_agentKey: 'pd.eu.a.pvp.net:443:::::::::::::::::::::',
encoding: null,
singleUse: true
},
[Symbol(RequestTimeout)]: undefined
},
_consuming: false,
_dumped: false,
req: [Circular 2],
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: {
date: 'Sun, 27 Jun 2021 15:59:41 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '83',
connection: 'close',
'access-control-allow-origin': '
',
'x-content-type-options': 'nosniff',
'cf-cache-status': 'DYNAMIC',
'cf-request-id': '0aefcbc2c900003250c7b83000000001',
'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
server: 'cloudflare',
'cf-ray': '665fe24adfde3250-FRA'
},
[Symbol(kHeadersCount)]: 22,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0,
[Symbol(RequestTimeout)]: undefined
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'pd.eu.a.pvp.net',
protocol: 'https:',
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [ 'Accept', 'application/json, text/plain, /' ],
authorization: [
'Authorization',
'Bearer ey....'
],
'x-riot-entitlements-jwt': [
'X-Riot-Entitlements-JWT',
'eyJr....'
],
'x-riot-clientversion': [ 'X-Riot-ClientVersion', 'release-02.01-shipping-6-511946' ],
'x-riot-clientplatform': [
'X-Riot-ClientPlatform',
'ey...'
],
'user-agent': [ 'User-Agent', 'axios/0.21.1' ],
host: [ 'Host', 'pd.eu.a.pvp.net' ]
}
},
response: {
status: 404,
statusText: 'Not Found',
headers: {
date: 'Sun, 27 Jun 2021 15:59:41 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '83',
connection: 'close',
'access-control-allow-origin': '
',
'x-content-type-options': 'nosniff',
'cf-cache-status': 'DYNAMIC',
'cf-request-id': '0aefcbc2c900003250c7b83000000001',
'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
server: 'cloudflare',
'cf-ray': '665fe24adfde3250-FRA'
},
config: {
url: 'https://pd.EU.a.pvp.net/mmr/v1/players/43221288-509a-5f09-b32a-5d54883e996a',
method: 'get',
headers: {
Accept: 'application/json, text/plain, /',
Authorization: 'Bearer ey....',
'X-Riot-Entitlements-JWT': 'ey....',
'X-Riot-ClientVersion': 'release-02.01-shipping-6-511946',
'X-Riot-ClientPlatform': 'ey....',
'User-Agent': 'axios/0.21.1'
},
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
jar: undefined,
maxRedirects: 0,
data: undefined,
validateStatus: [Function: validateStatus]
},
request: <ref *2> ClientRequest {
_events: [Object: null prototype] {
error: [Function: handleRequestError],
prefinish: [Function: requestOnPrefinish]
},
_eventsCount: 2,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: <ref *1> TLSSocket {
_tlsOptions: {
allowHalfOpen: undefined,
pipe: false,
secureContext: SecureContext { context: SecureContext {}, singleUse: true },
isServer: false,
requestCert: true,
rejectUnauthorized: true,
session: undefined,
ALPNProtocols: undefined,
requestOCSP: undefined,
enableTrace: undefined,
pskCallback: undefined,
highWaterMark: undefined,
onread: undefined
},
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'pd.eu.a.pvp.net',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype] {
close: [
[Function: onSocketCloseDestroySSL],
[Function],
[Function: onClose],
[Function: socketCloseListener]
],
end: [Function: onReadableStreamEnd],
newListener: [Function: keylogNewListener],
secure: [Function: onConnectSecure],
session: [Function (anonymous)],
free: [Function: onFree],
timeout: [Function: onTimeout],
agentRemove: [Function: onRemove],
error: [Function: socketErrorListener],
finish: [Function: bound onceWrapper] {
listener: [Function: destroy]
}
},
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'pd.eu.a.pvp.net',
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: true,
ended: false,
endEmitted: false,
reading: true,
constructed: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
destroyed: false,
errored: null,
closed: false,
closeEmitted: false,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: true,
needDrain: false,
ending: true,
ended: true,
finished: false,
destroyed: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 1,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: TLSWrap {
_parent: TCP {
reading: [Getter/Setter],
onconnection: null,
[Symbol(owner_symbol)]: [Circular *1]
},
_parentWrap: undefined,
_secureContext: SecureContext { context: SecureContext {}, singleUse: true },
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular *2],
[Symbol(res)]: TLSWrap {
_parent: TCP {
reading: [Getter/Setter],
onconnection: null,
[Symbol(owner_symbol)]: [Circular *1]
},
_parentWrap: undefined,
_secureContext: SecureContext { context: SecureContext {}, singleUse: true },
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 88,
[Symbol(kHandle)]: TLSWrap {
_parent: TCP {
reading: [Getter/Setter],
onconnection: null,
[Symbol(owner_symbol)]: [Circular *1]
},
_parentWrap: undefined,
_secureContext: SecureContext { context: SecureContext {}, singleUse: true },
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: {
rejectUnauthorized: true,
ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',
checkServerIdentity: [Function: checkServerIdentity],
minDHSize: 1024,
path: null,
method: 'GET',
headers: {
Accept: 'application/json, text/plain, /',
Authorization: 'Bearer ey....', 'X-Riot-Entitlements-JWT': 'ey....',
'X-Riot-ClientVersion': 'release-02.01-shipping-6-511946',
'X-Riot-ClientPlatform': 'ey....',
'User-Agent': 'axios/0.21.1'
},
agent: undefined,
agents: { http: undefined, https: undefined },
auth: undefined,
hostname: 'pd.eu.a.pvp.net',
port: 443,
_defaultAgent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object],
requests: {},
sockets: [Object],
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'fifo',
maxTotalSockets: Infinity,
totalSocketCount: 1,
maxCachedSessions: 100,
_sessionCache: [Object],
[Symbol(kCapture)]: false
},
host: 'pd.eu.a.pvp.net',
servername: 'pd.eu.a.pvp.net',
_agentKey: 'pd.eu.a.pvp.net:443:::::::::::::::::::::',
encoding: null,
singleUse: true
},
[Symbol(RequestTimeout)]: undefined
},
_header: 'GET /mmr/v1/players/43221288-509a-5f09-b32a-5d54883e996a HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Authorization: 'Bearer ey....' +
'X-Riot-Entitlements-JWT: ey....' +
'X-Riot-ClientVersion: release-02.01-shipping-6-511946\r\n' +
'X-Riot-ClientPlatform: ey....' +
'User-Agent: axios/0.21.1\r\n' +
'Host: pd.eu.a.pvp.net\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: noopPendingOutput],
agent: Agent {
_events: [Object: null prototype] {
free: [Function (anonymous)],
newListener: [Function: maybeEnableKeylog]
},
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: { path: null },
requests: {},
sockets: { 'pd.eu.a.pvp.net:443:::::::::::::::::::::': [ [TLSSocket] ] },
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'fifo',
maxTotalSockets: Infinity,
totalSocketCount: 1,
maxCachedSessions: 100,
_sessionCache: {
map: {
'auth.riotgames.com:443:::::::::::::::::::::': [Buffer [Uint8Array]],
'entitlements.auth.riotgames.com:443:::::::::::::::::::::': [Buffer [Uint8Array]],
'pd.eu.a.pvp.net:443:::::::::::::::::::::': [Buffer [Uint8Array]]
},
list: [
'auth.riotgames.com:443:::::::::::::::::::::',
'entitlements.auth.riotgames.com:443:::::::::::::::::::::',
'pd.eu.a.pvp.net:443:::::::::::::::::::::'
]
},
[Symbol(kCapture)]: false
},
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/mmr/v1/players/43221288-509a-5f09-b32a-5d54883e996a',
_ended: true,
res: IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: true,
ended: true,
endEmitted: true,
reading: false,
constructed: true,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
destroyed: true,
errored: null,
closed: true,
closeEmitted: true,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: true,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_events: [Object: null prototype] {
end: [ [Function: responseOnEnd], [Function: handleStreamEnd] ],
data: [Function: handleStreamData],
error: [Function: handleStreamError]
},
_eventsCount: 3,
_maxListeners: undefined,
socket: <ref *1> TLSSocket {
_tlsOptions: {
allowHalfOpen: undefined,
pipe: false,
secureContext: [SecureContext],
isServer: false,
requestCert: true,
rejectUnauthorized: true,
session: undefined,
ALPNProtocols: undefined,
requestOCSP: undefined,
enableTrace: undefined,
pskCallback: undefined,
highWaterMark: undefined,
onread: undefined
},
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'pd.eu.a.pvp.net',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype] {
close: [Array],
end: [Function: onReadableStreamEnd],
newListener: [Function: keylogNewListener],
secure: [Function: onConnectSecure],
session: [Function (anonymous)],
free: [Function: onFree],
timeout: [Function: onTimeout],
agentRemove: [Function: onRemove],
error: [Function: socketErrorListener],
finish: [Function]
},
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'pd.eu.a.pvp.net',
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [BufferList],
length: 0,
pipes: [],
flowing: true,
ended: false,
endEmitted: false,
reading: true,
constructed: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
destroyed: false,
errored: null,
closed: false,
closeEmitted: false,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: true,
needDrain: false,
ending: true,
ended: true,
finished: false,
destroyed: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 1,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: TLSWrap {
_parent: [TCP],
_parentWrap: undefined,
_secureContext: [SecureContext],
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular *2],
[Symbol(res)]: TLSWrap {
_parent: [TCP],
_parentWrap: undefined,
_secureContext: [SecureContext],
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 88,
[Symbol(kHandle)]: TLSWrap {
_parent: [TCP],
_parentWrap: undefined,
_secureContext: [SecureContext],
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular 1]
},
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: {
rejectUnauthorized: true,
ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',
checkServerIdentity: [Function: checkServerIdentity],
minDHSize: 1024,
path: null,
method: 'GET',
headers: [Object],
agent: undefined,
agents: [Object],
auth: undefined,
hostname: 'pd.eu.a.pvp.net',
port: 443,
_defaultAgent: [Agent],
host: 'pd.eu.a.pvp.net',
servername: 'pd.eu.a.pvp.net',
_agentKey: 'pd.eu.a.pvp.net:443:::::::::::::::::::::',
encoding: null,
singleUse: true
},
[Symbol(RequestTimeout)]: undefined
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
rawHeaders: [
'Date',
'Sun, 27 Jun 2021 15:59:41 GMT',
'Content-Type',
'application/json; charset=utf-8',
'Content-Length',
'83',
'Connection',
'close',
'Access-Control-Allow-Origin',
'
',
'X-Content-Type-Options',
'nosniff',
'CF-Cache-Status',
'DYNAMIC',
'cf-request-id',
'0aefcbc2c900003250c7b83000000001',
'Expect-CT',
'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
'Server',
'cloudflare',
'CF-RAY',
'665fe24adfde3250-FRA'
],
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 404,
statusMessage: 'Not Found',
client: <ref *1> TLSSocket {
_tlsOptions: {
allowHalfOpen: undefined,
pipe: false,
secureContext: [SecureContext],
isServer: false,
requestCert: true,
rejectUnauthorized: true,
session: undefined,
ALPNProtocols: undefined,
requestOCSP: undefined,
enableTrace: undefined,
pskCallback: undefined,
highWaterMark: undefined,
onread: undefined
},
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'pd.eu.a.pvp.net',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype] {
close: [Array],
end: [Function: onReadableStreamEnd],
newListener: [Function: keylogNewListener],
secure: [Function: onConnectSecure],
session: [Function (anonymous)],
free: [Function: onFree],
timeout: [Function: onTimeout],
agentRemove: [Function: onRemove],
error: [Function: socketErrorListener],
finish: [Function]
},
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'pd.eu.a.pvp.net',
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [BufferList],
length: 0,
pipes: [],
flowing: true,
ended: false,
endEmitted: false,
reading: true,
constructed: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
destroyed: false,
errored: null,
closed: false,
closeEmitted: false,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: true,
needDrain: false,
ending: true,
ended: true,
finished: false,
destroyed: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 1,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: TLSWrap {
_parent: [TCP],
_parentWrap: undefined,
_secureContext: [SecureContext],
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular *2],
[Symbol(res)]: TLSWrap {
_parent: [TCP],
_parentWrap: undefined,
_secureContext: [SecureContext],
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 88,
[Symbol(kHandle)]: TLSWrap {
_parent: [TCP],
_parentWrap: undefined,
_secureContext: [SecureContext],
reading: true,
onkeylog: [Function: onkeylog],
onhandshakestart: {},
onhandshakedone: [Function (anonymous)],
onocspresponse: [Function: onocspresponse],
onnewsession: [Function: onnewsessionclient],
onerror: [Function: onerror],
[Symbol(owner_symbol)]: [Circular *1]
},
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: {
rejectUnauthorized: true,
ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',
checkServerIdentity: [Function: checkServerIdentity],
minDHSize: 1024,
path: null,
method: 'GET',
headers: [Object],
agent: undefined,
agents: [Object],
auth: undefined,
hostname: 'pd.eu.a.pvp.net',
port: 443,
_defaultAgent: [Agent],
host: 'pd.eu.a.pvp.net',
servername: 'pd.eu.a.pvp.net',
_agentKey: 'pd.eu.a.pvp.net:443:::::::::::::::::::::',
encoding: null,
singleUse: true
},
[Symbol(RequestTimeout)]: undefined
},
_consuming: false,
_dumped: false,
req: [Circular 2],
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: {
date: 'Sun, 27 Jun 2021 15:59:41 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '83',
connection: 'close',
'access-control-allow-origin': '
',
'x-content-type-options': 'nosniff',
'cf-cache-status': 'DYNAMIC',
'cf-request-id': '0aefcbc2c900003250c7b83000000001',
'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
server: 'cloudflare',
'cf-ray': '665fe24adfde3250-FRA'
},
[Symbol(kHeadersCount)]: 22,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0,
[Symbol(RequestTimeout)]: undefined
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'pd.eu.a.pvp.net',
protocol: 'https:',
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [ 'Accept', 'application/json, text/plain, /' ],
authorization: [
'Authorization',
'Bearer ey....'
],
'x-riot-entitlements-jwt': [
'X-Riot-Entitlements-JWT',
'ey....'
],
'x-riot-clientversion': [ 'X-Riot-ClientVersion', 'release-02.01-shipping-6-511946' ],
'x-riot-clientplatform': [
'X-Riot-ClientPlatform',
'ey....'
],
'user-agent': [ 'User-Agent', 'axios/0.21.1' ],
host: [ 'Host', 'pd.eu.a.pvp.net' ]
}
},
data: {
httpStatus: 404,
errorCode: 'RESOURCE_NOT_FOUND',
message: 'resource not found'
}
},
isAxiosError: true,
toJSON: [Function: toJSON]
}

How can I use this in python?

I want to use this library in Python. Are there any URLs I can make requests to to authenticate the user etc? Thanks

Discord

I'm sorry for botherning , But I tried adding you on discord and it said wrong id
so can I have your new discord ?beside that great work!

I can't authorize my account.

I use your API to write discord bot exactly like your example but got 403 error. I'm new to programming so I don't know where I went wrong and how to fix it. I installed your API and here is the code and error I got.
Hope to receive your reply soon.
image
image

Crash when Multifactor Authentication is enabled

Are you considering supporting MFA ?

I have MFA activated on my riot account, and the authorize method on the API class crashes.

parseTokensFromUrl(access_tokens.data.response.parameters.uri);

When MFA is active, their is no parameters property on data.response, but data about MFA instead.

Error Invalid Header Value

Getting the following error upon usage of authrize()

TypeError [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "Cookie"
    at ClientRequest.setHeader (node:_http_outgoing:651:3)
    at new ClientRequest (node:_http_client:291:14)
    at Object.request (node:https:366:10)
    at RedirectableRequest._performRequest (/home/container/node_modules/follow-redirects/index.js:325:24)
    at new RedirectableRequest (/home/container/node_modules/follow-redirects/index.js:99:8)
    at Object.request (/home/container/node_modules/follow-redirects/index.js:531:14)
    at dispatchHttpRequest (/home/container/node_modules/@liamcottle/valorant.js/node_modules/axios/lib/adapters/http.js:202:25)
    at new Promise (<anonymous>)
    at httpAdapter (/home/container/node_modules/@liamcottle/valorant.js/node_modules/axios/lib/adapters/http.js:46:10)
    at dispatchRequest (/home/container/node_modules/@liamcottle/valorant.js/node_modules/axios/lib/core/dispatchRequest.js:53:10)
    at Axios.request (/home/container/node_modules/@liamcottle/valorant.js/node_modules/axios/lib/core/Axios.js:108:15)
    at Axios.<computed> [as put] (/home/container/node_modules/@liamcottle/valorant.js/node_modules/axios/lib/core/Axios.js:140:17)
    at Function.wrap [as put] (/home/container/node_modules/@liamcottle/valorant.js/node_modules/axios/lib/helpers/bind.js:9:15)
    at API.authorize (/home/container/node_modules/@liamcottle/valorant.js/src/api.js:98:37)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async getStore (/home/container/commands/valo.js:1066:5)
    at async Object.execute (/home/container/commands/valo.js:679:33)
    at async Client.<anonymous> (/home/container/index.js:145:4) {
  code: 'ERR_HTTP_INVALID_HEADER_VALUE'
}

The code was working for an year or so without any problem till 3 days ago when this error started occuring.

403 Forbidden

A 403 Forbidden error is received when attempting to log in.

The log in flow will need to be proxied to intercept the auth requests, and then the auth requests in the library will need to be updated.

I don't have the time for this right now, but feel free to check it out if you're here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.