app-xbox-live
v1.2.8
Published
<h1 align="center">App Xbox Live Api</h1> <p align="center"> <img src="https://img.shields.io/npm/dm/app-xbox-live.svg"> </p>
Downloads
62
Readme
Install
npm i app-xbox-live
Getting started
- getting account token:
const axl = require("app-xbox-live");
const token = await axl.Token("<your email>", "<your password>");
//output: ["token", "uhs"]
Note: For 2-step accounts, authorization from the owner is required.
Security: never display your token to anyone.
authentication alternatives
- setup token:
const xl = new axl.Account(`XBL3.0 x=${token};${uhs});
- logging with credentials:
const xl = await axl.Login("<email>", "<password>");
Make a custom request
const opts = {
url: "<request url>",
method: "<method>",
...
}
xl.request(opts).then(data =>{
console.log(data);
});
It is not necessary to add the authorization header because the method automatically adds it.
Finding user by gamertag
const amount = 15;
xl.people.find("<gamertag>", amount).then(console.log);
Getting user by xuid
xl.people.get("<xuid>").then(console.log);
Getting user profile
xl.people.profile.get("<xuid>").then(console.log);
// OR
xl.people.profile.get(["<xuids>"]).then(console.log);
Getting recommendation users
xl.people.recommendation.get().then(console.log);
Getting user setting
xl.people.setting.get("<xuid>").then(console.log);
Getting user summary
xl.people.summary.get("<xuid>").then(console.log);
Getting all the user achievement
xl.people.achievement.all.get("<xuid>").then(console.log);
Getting specific user achievement
xl.people.achievement.get("<xuid>", titleId, amount).then(console.log);
Getting user achievement stats
xl.people.achievement.stats.get("<xuid>", titleId).then(console.log);
// OR
xl.people.achievement.stats.get(["<xuids>"], titleId).then(console.log);
Getting user achievement titles
xl.people.achievement.titles.get("<xuid>").then(console.log);
Getting complete user achievement titles
xl.people.achievement.titles.complete.get("<xuid>").then(console.log);
Getting user achievement titles
xl.people.achievement.titles.get("<xuid>").then(user =>{
console.log(user);
});
Getting user activity
const amount = 100;
xl.people.activity.get("<xuid>", amount).then(console.log);
Getting user screenshot
const amount = 100;
xl.people.screenshot.get("<xuid>", amount).then(console.log);
Getting user games
xl.people.games.get("<xuid>").then(console.log);
Getting user presence
xl.people.presence.get("<xuid>").then(console.log);
// OR
xl.people.presence.get(["<xuids>"]).then(console.log);
Adding friend
xl.people.add("<xuid>").then(() =>{
console.log("success");
});
// OR
xl.people.add(["<xuids>"]).then(() =>{
console.log("success");
});
Removing friend
xl.people.remove("<xuid>").then(() =>{
console.log("success");
});
// OR
xl.people.remove(["<xuids>"]).then(() =>{
console.log("success");
});
Getting user gameclip
xl.people.gameclip.get("<xuid>", amount).then(console.log);
Getting user clubs
xl.people.clubs.get("<xuid>").then(console.log);
Getting user friends
xl.people.friends.get("<xuid>").then(console.log);
Getting gameclip
xl.people.gameclip.get("<xuid>", amount).then(console.log);
Finding club by name
xl.club.find("<club name>").then(console.log);
Getting club by id
xl.club.get("<club id>").then(console.log);
Getting club feed
const amount = 50;
xl.club.feed.get("<club id>", amount).then(console.log);
Sending club feed
xl.club.feed.send("<club id>", "<message>").then(console.log);
Getting club chat
const amount = 50;
xl.club.chat.get("<club id>", amount).then(console.log);
Getting inbox
xl.chat.inbox.get().then(console.log);
Getting chat auth
xl.chat.auth.get("<xuid>").then(console.log);
Getting message
const amount = 100;
xl.chat.message.get("<xuid>", amount).then(console.log);
Sending message
xl.chat.message.send("<xuid>", "<message>").then(console.log);
Getting title by id
xl.title.get("<id>").then(console.log);
// OR
xl.title.get(["<ids>"]).then(console.log);
Getting title by id
xl.title.get("<id>").then(console.log);
Getting account privacy settings
xl.me.account.privacy.settings.get().then(console.log);
Getting profile
xl.me.profile.get().then(console.log);
Getting friends
xl.me.profile.friends.get().then(console.log);
Getting followers
xl.me.followers.get().then(console.log);
Getting family
xl.me.profile.family.get("<xuid>").then(console.log);
Getting groups
xl.me.groups.get().then(console.log);
Getting reports
xl.me.reports.get().then(console.log);
Getting games titles id
xl.me.games.titlesId.get().then(console.log);