Skip to content

ZerlsDev/yuniteapi.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yuniteapi.js

yuniteapi.js is a node.js API wrapper for Yunite allowing you to easily interact with their API.

Installation

To install yuniteapi.js, run the following command into your terminal from your bot folder:

Install yuniteapi.js:

npm install yuniteapi.js

Example Usage

const YuniteAPI = require('yuniteapi.js');
const Yunite = new YuniteAPI('Yunite API Key', 'Guild ID');

Yunite.registrationData(['array of user Ids']).then((result => console.log(result)));

Methods

registrationData(['array of user Ids'])

Access registration data of a guild and know which Discord user is linked to which Epic user.

Yunite.registrationData(['123456789123456789', '987654321987654321']).then((result => console.log(result)));

addPlayerToQueue(userId)

Join a player into a custom game

Yunite.addPlayerToQueue('123456789123456789').then((result => console.log(result)));

blockUser(userId, options)

Block a user from using Yunite on provided guild

Yunite.blockUser('123456789123456789', { reason: 'Test', blockLinkedEpic: true }).then((result => console.log(result)));

blockEpic(epicId, options)

Block an epic account from using Yunite on provided guild

Yunite.blockEpic('epicId', { reason: 'Test', blockLinkedUser: true }).then((result => console.log(result)));

unblockUser(userId)

Unblock a user from Yunite on provided guild

Yunite.unblockUser('123456789123456789').then((result => console.log(result)));

unblockEpic(epicId)

Unblock an epic account from Yunite on provided guild

Yunite.unblockEpic('epicId').then((result => console.log(result)));

listTournaments()

Get list of tournaments

Yunite.listTournaments().then((result => console.log(result)));

tournamentLeaderboards(tournamentId)

Get leaderboard of tournament

Yunite.tournamentLeaderboards('bd4e8807-629f-4820-9207-13d899e76a67').then((result => console.log(result)));

tournamentMatches(tournamentId)

Get list of matches in tournament

Yunite.tournamentMatches('bd4e8807-629f-4820-9207-13d899e76a67').then((result => console.log(result)));

sessionLeaderboard(tournamentId, sessionId)

Get leaderboard of single match

Yunite.tournamentMatches('bd4e8807-629f-4820-9207-13d899e76a67', '56acd6f7627a4763b1b38c58f3fe5169').then((result => console.log(result)));

acssStatistics(, )

Get ACSS statistics from Yunite on a provided guild, optional from and to dates (UNIX-timestamp)

Yunite.acssStatistics(1000, 2000).then((result => console.log(result)));

singleTournament(tournamentId)

Get single tournmanet by ID

Yunite.singleTournament('bd4e8807-629f-4820-9207-13d899e76a67').then((result => console.log(result)));

listAllTournamentTeams(tournamentId)

Get all teams in a tournament

Yunite.listAllTournamentTeams('bd4e8807-629f-4820-9207-13d899e76a67').then((result => console.log(result)));

epicRegistrationData(['array of user Ids'])

Access registration data of a guild and know which Epic user is linked to which Discord user

Yunite.epicRegistrationData(['123456789123456789', '987654321987654321']).then((result => console.log(result)));

addTeamToTournament(tournamentId, epicId, discordId)

Add team to a tournament (only one of Epic or Discord Id needed)

Yunite.addTeamToTournament('bd4e8807-629f-4820-9207-13d899e76a67', undefined, '987654321987654321').then((result => console.log(result)));

disqualifyTeamFromTournament(teamId, tournamentId)

Disqualifty a team from a tournament

Yunite.disqualifyTeamFromTournament('75757394-906f-461e-b33f-b51534d2563f', 'bd4e8807-629f-4820-9207-13d899e76a67').then((result => console.log(result)));

updateTeam(teamId, tournamentId, players)

Update players in a team in a tournament (only one of Epic or Discord Id needed)

Yunite.updateTeam('75757394-906f-461e-b33f-b51534d2563f', 'bd4e8807-629f-4820-9207-13d899e76a67', {
    player1: {
        epicId: '1b17b72aaa36r579ebb47f832053cc30',
        discordId: '987654321987654321'
    },

    player4: {
        epicId: '1b17b72aaa36r579ebb47f832053cc30'
    }
}).then((result => console.log(result)));

About

Node.js API Wrapper for Yunite API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •