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

Authorization

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

Authorization

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

Authorization

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

Authorization

Parameters

{
    token: String;
}

Headers

{
    D2R-Contact: <an email contact>
    D2R-Platform: <Discord, Telegram, Whatsapp, ...>
    D2R-Repo: <link to your public repository or your public app/server>
}

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

Response 401 - Missing headers

this response occurs if you don't pass all required headers

{
    message: "Missing required headers: D2R-Contact, D2R-Platform, D2R-Repo";
    providedBy: String;
    version: String;
}
CACHE TTL: 600s

Response 401 - Invalid header values

this response occurs if you pass an invalid value for one of the required headers

{
    message: "Invalid value for header: D2R-Contact";
    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

  1. Go to your Discord server settings
  2. Go to Apps > Integrations
  3. Go to Webhooks and create a new webhook
  4. Choose the channel you want it to post updates in
  5. 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.

Question or requests?

Guestnow



commentcancel