Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Kód:
- unirest.get("https://ugamb.ga/api.php").header("Accept", "application/json").end(function(response) {
- var body = response.body;
- stats = JSON.parse(body);
- stats = stats[0]
- ch.sendMessage(
- "Nev: " + stats.Nev + "\n" +
- "Osszeg: " + stats.Osszeg + "\n");
- });
- Weboldal:
- [ { "Nev": 32142, "Osszeg": 222 } ]
- Kérdés: a stats-ot honnan nyeri ki?
- eredeti lekérés:
- [{"STATUS":1,"ID":32142,"Name":"Miguel Grau","Level":24,"XP":4773,"Strength":2847,"Energy":500,"MilitaryRank":50,"CS":"Peru","LastSeen":231,"Banned":"No","DMG1HIT":10385}]
- https://www.erevollution.com/en/api/citizen/32142
- eredeti kód:
- //Usage: +erevprofile [profileNumber]
- var profileNumber = message.suffix;
- unirest.get("https://www.erevollution.com/en/api/citizen/" + profileNumber).header("Accept", "application/json").end(function(response) {
- var body = response.body;
- stats = JSON.parse(body);
- stats = stats[0]
- ch.sendMessage(
- "Name: " + stats.Name + "\n" +
- "Level: " + stats.Level + "\n" +
- "Rank: " + stats.MilitaryRank + "\n" +
- "Energy: " + stats.Energy + "\n" +
- "Strength: " + stats.Strength + "\n" + "Country of Citizenship: " + stats.CS + "\n" + "Profile Link: https://www.erevollution.com/en/citizen/" + profileNumber);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement