Getting clubs data
Unlike other API wrappers, we not only let you get info of a club but also about multiple clubs at once.
Getting Info of a Single club
- JavaScript
- ESM
client.clubs
.fetch('club-tag')
.then((club) => {
console.log(club);
})
.catch((error) => {
console.error(error);
});
await client.clubs.fetch('club-tag');
note
Instead of using club-tag
as your tag, you can also use #club-tag
or %23club-tag
to get the same result. For
example, XYZ
, #XYZ
and %23XYZ
all return same club.
Getting info of multiple clubs
- JavaScript
- ESM
client.clubs
.fetchMany('club-tag-1', 'club-tag-2', 'club-tag-3')
.then((club) => {
console.log(club);
})
.catch((error) => {
console.error(error);
});
await client.clubs.fetchMany('club-tag-1', 'club-tag-2', 'club-tag-3');
note
Instead of using club-tag
as your tag, you can also use #club-tag
or %23club-tag
to get the same result. For
example, XYZ
, #XYZ
and %23XYZ
all return same club.