HOW TO INTEGRATE WITH D2RUNEWIZARD
An overview of all APIs you can integrate with. I offer a few public APIs to easily access data used on the site, so that you don't have to scrape the web page.
Fair Use Policy
- A disclaimer should always be visible when using one of the APIs with a link back to the providedBy url.
- The endpoint should not be polled more frequently than the minimum cache TTL (see below each response).
- Private tokens cannot be shared and should only be used by the person who requested it, for the purpose it was requested for.
- Data from the APIs cannot be distributed beyond your own application.
Diablo Clone Tracker
Request
GET https://d2runewizard.com/api/diablo-clone-progress/all
Parameters
{
token: String;
}
Response 200
{
servers: {
server: "{ladder|nonLadder}{Softcore|Hardcore}{Americas|Europe|Asia}";
progress: 1 | 2 | 3 | 4 | 5 | 6;
message: String; // e.g. "Terror gazes upon Sanctuary";
ladder: boolean;
hardcore: boolean;
region: "Americas" | "Europe" | "Asia";
lastReportedBy: {
uid: String;
displayName: String;
}
lastUpdate: {
seconds: number;
nanoseconds: number;
}
}[];
providedBy: "https://d2runewizard.com/diablo-clone-tracker";
version: String;
}
CACHE TTL: 60s
Diablo Clone Planned Walks
Request
GET https://d2runewizard.com/api/diablo-clone-progress/planned-walks
Parameters
{
token: String;
}
Response 200
{
walks: {
id: string;
source: string; // URL
timestamp: number;
region: "TBD" | "Americas" | "Europe" | "Asia";
ladder: boolean;
hardcore: boolean;
uid: String;
displayName: String;
confirmed: boolean;
}[];
providedBy: "https://d2runewizard.com/diablo-clone-tracker";
}
CACHE TTL: 60s
Terror Zone Tracker
Request
GET https://d2runewizard.com/api/terror-zone
Parameters
{
token: String;
}
Response
{
terrorZone: {
lastReportedBy: {
displayName: String;
uid: String;
};
lastUpdate: {
seconds: number;
nanoseconds: number;
};
reportedZones: {
[zone: string]: number;
};
highestProbabilityZone: {
zone: String;
act: String;
amount: number;
probability: number;
};
providedBy: "https://d2runewizard.com/terror-zone-tracker"
};
}
CACHE TTL min: 30s
if highestProbabilityZone.amount > 0: 60s
if highestProbabilityZone.amount > 3: highestProbabilityZone.amount * 60s
CACHE TTL max: T next zone - T // e.g. at 12:43, TTL is max 17 minutes
Error Responses
Response 401 - Unauthorized
This response occurs if you don't pass a token. All APIs require a personalized token with dedicated access rights.
{
message: "You are not authorized to use this resource, request a token here https://d2runewizard.com/profile/T41jagcO0UcTLKJiC5UOmDCdGtS2";
providedBy: String;
version: String;
}
CACHE TTL: 600s
Response 401 - Invalid token
this response occurs if you don't pass a valid token. Your token might not have the correct access rights, or your token has been revoked.
{
message: "Your token is not valid, request a new token here https://d2runewizard.com/profile/T41jagcO0UcTLKJiC5UOmDCdGtS2";
providedBy: String;
version: String;
}
CACHE TTL: 600s
Event Driven Integration
My platform also works with an event-driven architecture. You can receive updates when certain events are triggered (change of terror zone, diablo clone stage 4 or 5). Then, your REST API will be called with the response payload of the above APIs on certain events
Currently you can subscribe to the following events
- Diablo Clone Progress Change
- Terror Zone Change
Discord Webhooks
You can easily create a Discord webhook, which I can trigger on certain events
- Go to your Discord server settings
- Go to Apps > Integrations
- Go to Webhooks and create a new webhook
- Choose the channel you want it to post updates in
- Copy the webhook link
The webhook link looks likes this. To integrate with this webhook, I need the id and token.
https://discord.com/api/webhooks/{id}/{token}
This is the only service that requires a paid subscription (Destruction level)
Support my work
If you like my work and you'd like to contribute, feel free to give me a small tip.