n8n-nodes-clash-royale
Version:
n8n node to access the Clash Royale API
939 lines • 29.1 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.globalTournamentFields = exports.leaderboardFields = exports.challengeFields = exports.locationFields = exports.tournamentFields = exports.cardFields = exports.playerFields = exports.clanFields = exports.globalTournamentOperations = exports.leaderboardOperations = exports.challengeOperations = exports.locationOperations = exports.tournamentOperations = exports.cardOperations = exports.playerOperations = exports.clanOperations = exports.clashRoyaleResources = void 0;
exports.clashRoyaleResources = [
{
name: 'Clans',
value: 'clan',
},
{
name: 'Players',
value: 'player',
},
{
name: 'Cards',
value: 'card',
},
{
name: 'Tournaments',
value: 'tournament',
},
{
name: 'Locations',
value: 'location',
},
{
name: 'Challenges',
value: 'challenge',
},
{
name: 'Leaderboards',
value: 'leaderboard',
},
{
name: 'Global Tournaments',
value: 'globalTournament',
},
];
exports.clanOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['clan'],
},
},
options: [
{
name: 'Search Clans',
value: 'searchClans',
description: 'Search for clans by name and/or filtering',
action: 'Search for clans',
routing: {
request: {
method: 'GET',
url: '=/clans',
},
},
},
{
name: 'Get Clan Information',
value: 'getClanInfo',
description: 'Get information about a single clan by clan tag',
action: 'Get information about a clan',
routing: {
request: {
method: 'GET',
url: '=/clans/%23{{$parameter["clanTag"]}}',
},
},
},
{
name: 'List Clan Members',
value: 'getClanMembers',
description: 'List clan members',
action: 'Get list of members in a clan',
routing: {
request: {
method: 'GET',
url: '=/clans/%23{{$parameter["clanTag"]}}/members',
},
},
},
{
name: 'Get Current War',
value: 'getCurrentWar',
description: 'Retrieve information about clan\'s current clan war',
action: 'Get current clan war information',
routing: {
request: {
method: 'GET',
url: '=/clans/%23{{$parameter["clanTag"]}}/currentwar',
},
},
},
{
name: 'Get River Race Log',
value: 'getRiverRaceLog',
description: 'Retrieve river race log for a clan',
action: 'Get river race log of a clan',
routing: {
request: {
method: 'GET',
url: '=/clans/%23{{$parameter["clanTag"]}}/riverracelog',
},
},
},
{
name: 'Get Current River Race',
value: 'getCurrentRiverRace',
description: 'Retrieve information about current river race',
action: 'Get current river race of a clan',
routing: {
request: {
method: 'GET',
url: '=/clans/%23{{$parameter["clanTag"]}}/currentriverrace',
},
},
},
],
default: 'getClanInfo',
},
];
exports.playerOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['player'],
},
},
options: [
{
name: 'Get Player Information',
value: 'getPlayerInfo',
description: 'Get information about a single player by player tag',
action: 'Get information about a player',
routing: {
request: {
method: 'GET',
url: '=/players/%23{{$parameter["playerTag"]}}',
},
},
},
{
name: 'Get Upcoming Chests',
value: 'getUpcomingChests',
description: 'Get information about player\'s upcoming chests',
action: 'Get upcoming chests for a player',
routing: {
request: {
method: 'GET',
url: '=/players/%23{{$parameter["playerTag"]}}/upcomingchests',
},
},
},
{
name: 'Get Battle Log',
value: 'getBattleLog',
description: 'Get list of recent battles for a player',
action: 'Get battle log for a player',
routing: {
request: {
method: 'GET',
url: '=/players/%23{{$parameter["playerTag"]}}/battlelog',
},
},
},
],
default: 'getPlayerInfo',
},
];
exports.cardOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['card'],
},
},
options: [
{
name: 'Get All Cards',
value: 'getAllCards',
description: 'Get list of all available cards',
action: 'Get list of all available cards',
routing: {
request: {
method: 'GET',
url: '=/cards',
},
},
},
],
default: 'getAllCards',
},
];
exports.tournamentOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['tournament'],
},
},
options: [
{
name: 'Search Tournaments',
value: 'searchTournaments',
description: 'Search for tournaments',
action: 'Search for tournaments',
routing: {
request: {
method: 'GET',
url: '=/tournaments',
},
},
},
{
name: 'Get Tournament Information',
value: 'getTournamentInfo',
description: 'Get information about a tournament',
action: 'Get information about a tournament',
routing: {
request: {
method: 'GET',
url: '=/tournaments/%23{{$parameter["tournamentTag"]}}',
},
},
},
],
default: 'searchTournaments',
},
];
exports.locationOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['location'],
},
},
options: [
{
name: 'List Locations',
value: 'listLocations',
description: 'List locations',
action: 'List all locations',
routing: {
request: {
method: 'GET',
url: '=/locations',
},
},
},
{
name: 'Get Location Information',
value: 'getLocationInfo',
description: 'Get location information',
action: 'Get information about a location',
routing: {
request: {
method: 'GET',
url: '=/locations/{{$parameter["locationId"]}}',
},
},
},
{
name: 'Get Clan Rankings',
value: 'getClanRankings',
description: 'Get clan rankings for a specific location',
action: 'Get clan rankings for a location',
routing: {
request: {
method: 'GET',
url: '=/locations/{{$parameter["locationId"]}}/rankings/clans',
},
},
},
{
name: 'Get Player Rankings',
value: 'getPlayerRankings',
description: 'Get player rankings for a specific location',
action: 'Get player rankings for a location',
routing: {
request: {
method: 'GET',
url: '=/locations/{{$parameter["locationId"]}}/rankings/players',
},
},
},
{
name: 'Get Clan War Rankings',
value: 'getClanWarRankings',
description: 'Get clan war rankings for a specific location',
action: 'Get clan war rankings for a location',
routing: {
request: {
method: 'GET',
url: '=/locations/{{$parameter["locationId"]}}/rankings/clanwars',
},
},
},
{
name: 'List Seasons',
value: 'listSeasons',
description: 'Lists top player league seasons',
action: 'List top player league seasons',
routing: {
request: {
method: 'GET',
url: '=/locations/global/seasons',
},
},
},
{
name: 'List Seasons V2',
value: 'listSeasonsV2',
description: 'Lists league seasons with more details',
action: 'List league seasons with more details',
routing: {
request: {
method: 'GET',
url: '=/locations/global/seasonsV2',
},
},
},
{
name: 'Get Tournament Rankings',
value: 'getTournamentRankings',
description: 'Get global tournament rankings',
action: 'Get global tournament rankings',
routing: {
request: {
method: 'GET',
url: '=/locations/global/rankings/tournaments/%23{{$parameter["tournamentTag"]}}',
},
},
},
],
default: 'listLocations',
},
];
exports.challengeOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['challenge'],
},
},
options: [
{
name: 'Get Current Challenges',
value: 'getCurrentChallenges',
description: 'Get current and upcoming challenges',
action: 'Get current and upcoming challenges',
routing: {
request: {
method: 'GET',
url: '=/challenges',
},
},
},
],
default: 'getCurrentChallenges',
},
];
exports.leaderboardOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['leaderboard'],
},
},
options: [
{
name: 'List Leaderboards',
value: 'listLeaderboards',
description: 'List all available leaderboards',
action: 'List all available leaderboards',
routing: {
request: {
method: 'GET',
url: '=/leaderboards',
},
},
},
{
name: 'Get Leaderboard',
value: 'getLeaderboard',
description: 'Get players on a specific leaderboard',
action: 'Get players on a specific leaderboard',
routing: {
request: {
method: 'GET',
url: '=/leaderboard/{{$parameter["leaderboardId"]}}',
},
},
},
],
default: 'listLeaderboards',
},
];
exports.globalTournamentOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['globalTournament'],
},
},
options: [
{
name: 'List Global Tournaments',
value: 'listGlobalTournaments',
description: 'Get list of global tournaments',
action: 'Get list of global tournaments',
routing: {
request: {
method: 'GET',
url: '=/globaltournaments',
},
},
},
],
default: 'listGlobalTournaments',
},
];
exports.clanFields = [
{
displayName: 'Clan Tag',
name: 'clanTag',
type: 'string',
default: 'Q9QQC902',
description: 'Tag of the clan without the # symbol',
placeholder: 'e.g. Q9QQC902',
required: true,
displayOptions: {
show: {
resource: ['clan'],
operation: ['getClanInfo', 'getClanMembers', 'getCurrentWar', 'getRiverRaceLog', 'getCurrentRiverRace'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['clan'],
operation: ['searchClans'],
},
},
options: [
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
description: 'Search clans by name',
routing: {
request: {
qs: {
name: '={{$value}}',
},
},
},
},
{
displayName: 'Location ID',
name: 'locationId',
type: 'string',
default: '',
description: 'Filter by location identifier',
routing: {
request: {
qs: {
locationId: '={{$value}}',
},
},
},
},
{
displayName: 'Min Members',
name: 'minMembers',
type: 'number',
default: 0,
description: 'Filter by minimum number of clan members',
routing: {
request: {
qs: {
minMembers: '={{$value}}',
},
},
},
},
{
displayName: 'Max Members',
name: 'maxMembers',
type: 'number',
default: 50,
description: 'Filter by maximum number of clan members',
routing: {
request: {
qs: {
maxMembers: '={{$value}}',
},
},
},
},
{
displayName: 'Min Score',
name: 'minScore',
type: 'number',
default: 0,
description: 'Filter by minimum clan score',
routing: {
request: {
qs: {
minScore: '={{$value}}',
},
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
typeOptions: {
minValue: 1,
},
default: 50,
description: 'Max number of results to return',
routing: {
request: {
qs: {
limit: '={{$value}}',
},
},
},
},
{
displayName: 'After',
name: 'after',
type: 'string',
default: '',
description: 'Return only items that occur after this marker',
routing: {
request: {
qs: {
after: '={{$value}}',
},
},
},
},
{
displayName: 'Before',
name: 'before',
type: 'string',
default: '',
description: 'Return only items that occur before this marker',
routing: {
request: {
qs: {
before: '={{$value}}',
},
},
},
},
],
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['clan'],
operation: ['getRiverRaceLog'],
},
},
options: [
{
displayName: 'Limit',
name: 'limit',
type: 'number',
typeOptions: {
minValue: 1,
},
default: 50,
description: 'Max number of results to return',
routing: {
request: {
qs: {
limit: '={{$value}}',
},
},
},
},
{
displayName: 'After',
name: 'after',
type: 'string',
default: '',
description: 'Return only items that occur after this marker',
routing: {
request: {
qs: {
after: '={{$value}}',
},
},
},
},
{
displayName: 'Before',
name: 'before',
type: 'string',
default: '',
description: 'Return only items that occur before this marker',
routing: {
request: {
qs: {
before: '={{$value}}',
},
},
},
},
],
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['clan'],
operation: ['getClanMembers'],
},
},
options: [
{
displayName: 'Limit',
name: 'limit',
type: 'number',
typeOptions: {
minValue: 1,
},
default: 50,
description: 'Max number of results to return',
routing: {
request: {
qs: {
limit: '={{$value}}',
},
},
},
},
{
displayName: 'After',
name: 'after',
type: 'string',
default: '',
description: 'Return only items that occur after this marker',
routing: {
request: {
qs: {
after: '={{$value}}',
},
},
},
},
{
displayName: 'Before',
name: 'before',
type: 'string',
default: '',
description: 'Return only items that occur before this marker',
routing: {
request: {
qs: {
before: '={{$value}}',
},
},
},
},
],
},
];
exports.playerFields = [
{
displayName: 'Player Tag',
name: 'playerTag',
type: 'string',
default: '',
description: 'Tag of the player without the # symbol',
placeholder: 'e.g. 8L9L9GL',
required: true,
displayOptions: {
show: {
resource: ['player'],
operation: ['getPlayerInfo', 'getUpcomingChests', 'getBattleLog'],
},
},
},
];
exports.cardFields = [];
exports.tournamentFields = [
{
displayName: 'Tournament Tag',
name: 'tournamentTag',
type: 'string',
default: '',
description: 'Tag of the tournament without the # symbol',
placeholder: 'e.g. 2ABC',
required: true,
displayOptions: {
show: {
resource: ['tournament'],
operation: ['getTournamentInfo'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['tournament'],
operation: ['searchTournaments'],
},
},
options: [
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
description: 'Search tournaments by name',
routing: {
request: {
qs: {
name: '={{$value}}',
},
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
typeOptions: {
minValue: 1,
},
default: 50,
description: 'Max number of results to return',
routing: {
request: {
qs: {
limit: '={{$value}}',
},
},
},
},
{
displayName: 'After',
name: 'after',
type: 'string',
default: '',
description: 'Return only items that occur after this marker',
routing: {
request: {
qs: {
after: '={{$value}}',
},
},
},
},
{
displayName: 'Before',
name: 'before',
type: 'string',
default: '',
description: 'Return only items that occur before this marker',
routing: {
request: {
qs: {
before: '={{$value}}',
},
},
},
},
],
},
];
exports.locationFields = [
{
displayName: 'Location ID',
name: 'locationId',
type: 'string',
default: '57000000',
description: 'Identifier of the location',
required: true,
displayOptions: {
show: {
resource: ['location'],
operation: ['getLocationInfo', 'getClanRankings', 'getPlayerRankings', 'getClanWarRankings'],
},
},
},
{
displayName: 'Tournament Tag',
name: 'tournamentTag',
type: 'string',
default: '',
description: 'Tag of the tournament without the # symbol',
placeholder: 'e.g. 2ABC',
required: true,
displayOptions: {
show: {
resource: ['location'],
operation: ['getTournamentRankings'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['location'],
operation: ['getClanRankings', 'getPlayerRankings', 'getClanWarRankings', 'getTournamentRankings'],
},
},
options: [
{
displayName: 'Limit',
name: 'limit',
type: 'number',
typeOptions: {
minValue: 1,
},
default: 50,
description: 'Max number of results to return',
routing: {
request: {
qs: {
limit: '={{$value}}',
},
},
},
},
{
displayName: 'After',
name: 'after',
type: 'string',
default: '',
description: 'Return only items that occur after this marker',
routing: {
request: {
qs: {
after: '={{$value}}',
},
},
},
},
{
displayName: 'Before',
name: 'before',
type: 'string',
default: '',
description: 'Return only items that occur before this marker',
routing: {
request: {
qs: {
before: '={{$value}}',
},
},
},
},
],
},
];
exports.challengeFields = [];
exports.leaderboardFields = [
{
displayName: 'Leaderboard ID',
name: 'leaderboardId',
type: 'string',
default: '',
description: 'ID of the leaderboard to retrieve',
required: true,
displayOptions: {
show: {
resource: ['leaderboard'],
operation: ['getLeaderboard'],
},
},
},
];
exports.globalTournamentFields = [];
//# sourceMappingURL=ClashRoyaleDescription.js.map