onetricks-d 0.0.2

onetricks.gg parser


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

D lib that parses __NEXT_DATA__ json blobs (route props) from onetricks.gg and converts it to D structures.

Usage

example

import std.stdio;
import std.file;
import std.algorithm;
import std.path;
import std.net.curl;
import onetricks.parser;

void main() {
	auto response = get("https://www.onetricks.gg/champions/builds/Twitch");
	auto page = parseBuildPage(cast(string)response);
	writeln("Champion: ", page.champion, " - ", page.cTitle);
	writeln("Role: ", page.popRole, " | Patches: ", page.patchList);
	writeln("Top bans:");
	foreach (b; page.bans[0 .. min(5, page.bans.length)])
		writeln("  ", b.banId, ": ", b.percentage, "% (", b.count, ")");
	writeln("Items in catalog: ", page.itemData.length);
	writeln("Keystones: ", page.runes.keystone.length);
	foreach (patchKey, builds; page.firstItemStats) {
		foreach (buildKey, stats; builds) {
			writeln("Build ", buildKey, " (patch ", patchKey, "): ", stats.startingItems.length, " starting sets, ", stats.popularItems.length, " popular items");
			break;
		}
		break;
	}
}

output

dub
--------------------
Champion: Twitch - the Plague Rat
Role: bot | Patches: ["all", "16", "16.5"]
Top bans:
  Draven: 18.9% (10)
  Braum: 13.2% (7)
  Ezreal: 9.4% (5)
  Caitlyn: 5.7% (3)
  Yasuo: 5.7% (3)
Items in catalog: 221
Keystones: 16
Build 3032 (patch all): 1 starting sets, 10 popular items
Authors:
  • zkxjzmswkwl
Dependencies:
none
Versions:
0.0.2 2026-Mar-13
0.0.1 2026-Mar-13
~main 2026-Mar-13
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 7 downloads this week

  • 7 downloads this month

  • 7 downloads total

Score:
0.1
Short URL:
onetricks-d.dub.pm