Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript get name from steamid

var xhr = new XMLHttpRequest();
    xhr.open('POST', 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key={API_KEY}&steamids=$steamid64');
    xhr.onload = function () {
        if (xhr.status === 200) {
            var json = JSON.parse(xhr.responseText);
            document.getElementById('target').innerHTML = json['response']['players'][0]['personaname'];
        } else {
            alert('Request failed.  Returned status of ' + xhr.status);
        }
    };
    xhr.send();
Comment

PREVIOUS NEXT
Code Example
Javascript :: summer note empty 
Javascript :: node load testing-check 
Javascript :: typeracer 
Javascript :: how to get a bot online on discord 
Javascript :: react scripts for browser 
Javascript :: react native azure 
Javascript :: return js 
Javascript :: async/await 
Javascript :: npm install say unmet dependencies 
Javascript :: javascript desktop app 
Javascript :: autocomplete data selected validation jquery 
Javascript :: angular http post example 
Javascript :: how to send headers using swr 
Javascript :: js if the reverse of a number is better than the original num 
Javascript :: http status code 406 
Javascript :: js backwards loop 
Javascript :: react effect hook 
Javascript :: node mongodb $or 
Javascript :: calculate 7 days in javascript countdown 
Javascript :: export socket io connection in react 
Javascript :: javascript object declaration 
Javascript :: how to check if element is in viewport javascript 
Javascript :: js show element 
Javascript :: how to have jsx tellisense vscode 
Javascript :: synchronous file read 
Javascript :: class constructor syntax 
Javascript :: babel compile files empty 
Javascript :: es6 arrow function 
Javascript :: string filter javascript 
Javascript :: disable eslint curly option 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =