Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions plugins/Wargaming.net/v1/configValidation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"steps": [
{
"displayName": "Authenticate",
"dataStream": { "name": "encyclopediaInfo" },
"required": true,
"error": "Could not authenticate. Check your Application ID is correct and matches the selected realm.",
"success": "Connected to the Wargaming API successfully."
}
]
}
37 changes: 37 additions & 0 deletions plugins/Wargaming.net/v1/custom_types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[
{
"name": "Player",
"sourceType": "Player",
"icon": "user",
"singular": "Player",
"plural": "Players"
},
{
"name": "Clan",
"sourceType": "Clan",
"icon": "shield-halved",
"singular": "Clan",
"plural": "Clans"
},
{
"name": "WoT Vehicle",
"sourceType": "WoT Vehicle",
"icon": "truck-monster",
"singular": "Vehicle",
"plural": "Vehicles"
},
{
"name": "WoWs Ship",
"sourceType": "WoWs Ship",
"icon": "ship",
"singular": "Ship",
"plural": "Ships"
},
{
"name": "WoWp Aircraft",
"sourceType": "WoWp Aircraft",
"icon": "plane",
"singular": "Aircraft",
"plural": "Aircraft"
}
]
27 changes: 27 additions & 0 deletions plugins/Wargaming.net/v1/dataStreams/accountInfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "accountInfo",
"displayName": "Account Info",
"description": "Identity details for the tracked player accounts",
"tags": ["Player"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "api.worldoftanks.{{dataSource.realm}}/wot/account/info/",
"getArgs": [
{
"key": "account_id",
"value": "{{(dataSource.accountIds || []).map(o => o.value).join(',') || null}}"
},
{ "key": "fields", "value": "account_id,nickname,clan_id" }
],
"postRequestScript": "accountInfo.js"
},
"matches": "none",
"visibility": { "type": "hidden" },
"metadata": [
{ "name": "account_id", "displayName": "Account ID", "shape": "string" },
{ "name": "nickname", "displayName": "Nickname", "shape": "string", "role": "label" },
{ "name": "clan_id", "displayName": "Clan ID", "shape": "string" }
],
"timeframes": false
}
32 changes: 32 additions & 0 deletions plugins/Wargaming.net/v1/dataStreams/clanInfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "clanInfo",
"displayName": "Clan Info",
"description": "Details for the tracked clans including tag, member count and leader",
"tags": ["Clan"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "api.worldoftanks.{{dataSource.realm}}/wgn/clans/info/",
"getArgs": [
{
"key": "clan_id",
"value": "{{(dataSource.clanIds || []).map(o => o.value).join(',') || null}}"
},
{ "key": "fields", "value": "clan_id,name,tag,members_count,leader_name,motto,created_at" }
],
"errorHandling": { "type": "path", "realm": "payload", "path": "error.message" },
"postRequestScript": "clanInfo.js"
},
"matches": "none",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"visibility": { "type": "hidden" },
"metadata": [
{ "name": "clan_id", "displayName": "Clan ID", "shape": "string" },
{ "name": "name", "displayName": "Name", "shape": "string", "role": "label" },
{ "name": "tag", "displayName": "Tag", "shape": "string" },
{ "name": "members_count", "displayName": "Members", "shape": "number" },
{ "name": "leader_name", "displayName": "Leader", "shape": "string" },
{ "name": "motto", "displayName": "Motto", "shape": "string" },
{ "name": "created_at", "displayName": "Created", "shape": "date" }
],
"timeframes": false
}
28 changes: 28 additions & 0 deletions plugins/Wargaming.net/v1/dataStreams/clanMembers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "clanMembers",
"displayName": "Clan Members",
"description": "The member roster of a selected clan",
"tags": ["Clan", "Player"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "api.worldoftanks.{{dataSource.realm}}/wgn/clans/info/",
"getArgs": [
{ "key": "clan_id", "value": "{{object.rawId}}" },
{
"key": "fields",
"value": "clan_id,members_count,members.account_id,members.account_name,members.role,members.joined_at"
}
],
"errorHandling": { "type": "path", "realm": "payload", "path": "error.message" },
"postRequestScript": "clanMembers.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Clan"] } },
"metadata": [
{ "name": "memberName", "displayName": "Member Name", "shape": "string", "role": "label" },
{ "name": "role", "displayName": "Role", "shape": "string" },
{ "name": "joined", "displayName": "Joined", "shape": "date" },
{ "name": "accountId", "displayName": "Account ID", "shape": "string", "visible": false }
],
"timeframes": false
}
31 changes: 31 additions & 0 deletions plugins/Wargaming.net/v1/dataStreams/clanSummary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "clanSummary",
"displayName": "Clan Summary",
"description": "Current details for the selected clans",
"tags": ["Clan"],
"baseDataSourceName": "httpRequestScoped",
"config": {
"httpMethod": "get",
"endpointPath": "api.worldoftanks.{{dataSource.realm}}/wgn/clans/info/",
"getArgs": [
{ "key": "clan_id", "value": "{{objects.map(o => o.rawId).join(',')}}" },
{
"key": "fields",
"value": "clan_id,name,tag,members_count,motto,leader_name,created_at,description"
}
],
"errorHandling": { "type": "path", "realm": "payload", "path": "error.message" },
"postRequestScript": "clanSummary.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Clan"] } },
"metadata": [
{ "name": "name", "displayName": "Name", "shape": "string", "role": "label" },
{ "name": "tag", "displayName": "Tag", "shape": "string" },
{ "name": "membersCount", "displayName": "Members", "shape": "number" },
{ "name": "leaderName", "displayName": "Leader", "shape": "string" },
{ "name": "motto", "displayName": "Motto", "shape": "string" },
{ "name": "created", "displayName": "Created", "shape": "date" },
{ "name": "description", "displayName": "Description", "shape": "string", "visible": false }
],
"timeframes": false
}
27 changes: 27 additions & 0 deletions plugins/Wargaming.net/v1/dataStreams/encyclopediaInfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "encyclopediaInfo",
"displayName": "Encyclopedia Info",
"description": "World of Tanks game metadata such as the current game version",
"tags": ["Encyclopedia"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "api.worldoftanks.{{dataSource.realm}}/wot/encyclopedia/info/",
"pathToData": "data",
"errorHandling": {
"type": "script",
"script": "result = (data && data.status === 'error') ? (data.error && data.error.message) : undefined;"
}
},
"matches": "none",
"visibility": { "type": "hidden" },
"metadata": [
{
"name": "game_version",
"displayName": "Game Version",
"shape": "string"
},
{ "pattern": ".*" }
],
"timeframes": false
}
25 changes: 25 additions & 0 deletions plugins/Wargaming.net/v1/dataStreams/encyclopediaVehicles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "encyclopediaVehicles",
"displayName": "Encyclopedia Vehicles",
"description": "Every vehicle in the World of Tanks encyclopedia with tier, nation and type",
"tags": ["Encyclopedia", "Vehicle"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "api.worldoftanks.{{dataSource.realm}}/wot/encyclopedia/vehicles/",
"getArgs": [
{ "key": "fields", "value": "tank_id,name,tier,nation,type,is_premium" }
],
"postRequestScript": "encyclopediaVehicles.js"
},
"matches": "none",
"metadata": [
{ "name": "tank_id", "displayName": "Tank ID", "shape": "string", "visible": false },
{ "name": "name", "displayName": "Name", "shape": "string", "role": "label" },
{ "name": "tier", "displayName": "Tier", "shape": "number" },
{ "name": "nation", "displayName": "Nation", "shape": "string" },
{ "name": "type", "displayName": "Type", "shape": "string" },
{ "name": "is_premium", "displayName": "Premium", "shape": "boolean" }
],
"timeframes": false
}
25 changes: 25 additions & 0 deletions plugins/Wargaming.net/v1/dataStreams/planesEncyclopedia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "planesEncyclopedia",
"displayName": "Encyclopedia Aircraft",
"description": "Every aircraft in the World of Warplanes encyclopedia with level, nation and type",
"tags": ["Encyclopedia", "Aircraft"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "api.worldofwarplanes.{{dataSource.realm}}/wowp/encyclopedia/planes/",
"getArgs": [
{ "key": "fields", "value": "plane_id,name,level,nation,type" }
],
"postRequestScript": "planesEncyclopedia.js",
"errorHandling": { "type": "path", "realm": "payload", "path": "error.message" }
},
"matches": "none",
"metadata": [
{ "name": "plane_id", "displayName": "Plane ID", "shape": "string", "visible": false },
{ "name": "name", "displayName": "Name", "shape": "string", "role": "label" },
{ "name": "level", "displayName": "Level", "shape": "number" },
{ "name": "nation", "displayName": "Nation", "shape": "string" },
{ "name": "type", "displayName": "Type", "shape": "string" }
],
"timeframes": false
}
34 changes: 34 additions & 0 deletions plugins/Wargaming.net/v1/dataStreams/playerSearch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "playerSearch",
"displayName": "Player Search",
"description": "Search for player account IDs by nickname",
"tags": ["Player"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "api.worldoftanks.{{dataSource.realm}}/wot/account/list/",
"getArgs": [
{ "key": "search", "value": "{{search}}" },
{ "key": "type", "value": "startswith" },
{ "key": "limit", "value": "100" },
{ "key": "fields", "value": "account_id,nickname" }
],
"pathToData": "data",
"errorHandling": { "type": "path", "realm": "payload", "path": "error.message" }
},
"matches": "none",
"ui": [
{
"type": "text",
"name": "search",
"label": "Nickname",
"placeholder": "Start of a player nickname"
}
],
"manualConfigApply": true,
"metadata": [
{ "name": "nickname", "displayName": "Nickname", "shape": "string", "role": "label" },
{ "name": "account_id", "displayName": "Account ID", "shape": "string", "role": "value" }
],
"timeframes": false
}
31 changes: 31 additions & 0 deletions plugins/Wargaming.net/v1/dataStreams/playerShipStats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "playerShipStats",
"displayName": "Player Ship Stats",
"description": "Per-ship battle statistics for a selected player",
"tags": ["Player", "Ship"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "api.worldofwarships.{{dataSource.realm}}/wows/ships/stats/",
"getArgs": [
{ "key": "account_id", "value": "{{object.rawId}}" },
{
"key": "fields",
"value": "ship_id,pvp.battles,pvp.wins,pvp.damage_dealt,pvp.frags,last_battle_time"
}
],
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"errorHandling": { "type": "path", "realm": "payload", "path": "error.message" },
"postRequestScript": "playerShipStats.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Player"] } },
"metadata": [
{ "name": "shipId", "displayName": "Ship ID", "shape": "string", "visible": false },
{ "name": "ship", "sourceId": "shipId", "sourceType": "WoWs Ship", "objectPropertyPath": "name", "role": "label" },
{ "name": "battles", "displayName": "Battles", "shape": "number" },
{ "name": "winRate", "displayName": "Win Rate", "shape": ["percent", { "decimalPlaces": 1 }] },
{ "name": "avgDamage", "displayName": "Avg. Damage", "shape": ["number", { "decimalPlaces": 0 }] },
{ "name": "frags", "displayName": "Frags", "shape": "number" },
{ "name": "lastBattle", "displayName": "Last Battle", "shape": "date" }
],
"timeframes": false
}
35 changes: 35 additions & 0 deletions plugins/Wargaming.net/v1/dataStreams/playerSummary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "playerSummary",
"displayName": "Player Summary",
"description": "Current all-time statistics for the selected players",
"tags": ["Player"],
"baseDataSourceName": "httpRequestScoped",
"config": {
"httpMethod": "get",
"endpointPath": "api.worldoftanks.{{dataSource.realm}}/wot/account/info/",
"getArgs": [
{ "key": "account_id", "value": "{{objects.map(o => o.rawId).join(',')}}" },
{
"key": "fields",
"value": "account_id,nickname,global_rating,last_battle_time,created_at,clan_id,statistics.all.battles,statistics.all.wins,statistics.all.damage_dealt,statistics.all.xp,statistics.all.survived_battles,statistics.all.frags,statistics.all.spotted"
}
],
"errorHandling": { "type": "path", "realm": "payload", "path": "error.message" },
"postRequestScript": "playerSummary.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Player"] } },
"metadata": [
{ "name": "nickname", "displayName": "Nickname", "shape": "string", "role": "label" },
{ "name": "battles", "displayName": "Battles", "shape": "number" },
{ "name": "winRate", "displayName": "Win Rate", "shape": ["percent", { "decimalPlaces": 1 }] },
{ "name": "avgDamage", "displayName": "Avg. Damage", "shape": ["number", { "decimalPlaces": 0 }] },
{ "name": "avgXp", "displayName": "Avg. XP", "shape": ["number", { "decimalPlaces": 0 }] },
{ "name": "survivalRate", "displayName": "Survival Rate", "shape": ["percent", { "decimalPlaces": 1 }] },
{ "name": "globalRating", "displayName": "Global Rating", "shape": "number" },
{ "name": "frags", "displayName": "Frags", "shape": "number" },
{ "name": "spotted", "displayName": "Spotted", "shape": "number" },
{ "name": "lastBattle", "displayName": "Last Battle", "shape": "date" },
{ "name": "clanId", "displayName": "Clan ID", "shape": "string", "visible": false }
],
"timeframes": false
}
32 changes: 32 additions & 0 deletions plugins/Wargaming.net/v1/dataStreams/playerVehicleStats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "playerVehicleStats",
"displayName": "Player Vehicle Stats",
"description": "Per-vehicle battle statistics for a selected player",
"tags": ["Player", "Vehicle"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "api.worldoftanks.{{dataSource.realm}}/wot/tanks/stats/",
"getArgs": [
{ "key": "account_id", "value": "{{object.rawId}}" },
{
"key": "fields",
"value": "tank_id,mark_of_mastery,all.battles,all.wins,all.damage_dealt,all.spotted,all.frags"
}
],
"errorHandling": { "type": "path", "realm": "payload", "path": "error.message" },
"postRequestScript": "playerVehicleStats.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Player"] } },
"metadata": [
{ "name": "tankId", "displayName": "Tank ID", "shape": "string", "visible": false },
{ "name": "vehicle", "sourceId": "tankId", "sourceType": "WoT Vehicle", "objectPropertyPath": "name", "role": "label" },
{ "name": "battles", "displayName": "Battles", "shape": "number" },
{ "name": "winRate", "displayName": "Win Rate", "shape": ["percent", { "decimalPlaces": 1 }] },
{ "name": "avgDamage", "displayName": "Avg. Damage", "shape": ["number", { "decimalPlaces": 0 }] },
{ "name": "frags", "displayName": "Frags", "shape": "number" },
{ "name": "spotted", "displayName": "Spotted", "shape": "number" },
{ "name": "markOfMastery", "displayName": "Mark of Mastery", "shape": "number" }
],
"timeframes": false
}
Loading
Loading