v1

Documentation for Rift API v1

Note: The data below is made up. Note 2: All enum values (such as continent, color, war_policy, alliance_position and domestic_policy will eventually be replaced by their string equivalents for ease of use, please refer to the v2 nations documentation for the converted values.

Alliances

GET https://riftapi.mrvillage.dev/v1/alliances

Provides basic information on all alliances in the game. (Updated every two minutes)

{
    "success": true,
    "data": [
        {
            "id": 1,
            "found_date": "2021-08-26 22:38:05",
            "name": "I am an alliance",
            "acronym": "IAAM",
            "color": "olive",
            "rank": 1,
            "members": 10,
            "score": 10000.1,
            "leader_ids": [1, 2, 3],
            "officer_ids": [4, 5, 6],
            "heir_ids": [7, 8, 9],
            "avg_score": 1000.1
            "flag_url": "https://...",
            "forum_url": "https://...",
            "ircchan": "https://..."
        },
        ...
    ]
}

GET https://riftapi.mrvillage.dev/v1/link

Check for a link between a nation and Discord user.

Query Parameters

Name
Type
Description

id

string

The nation or Discord ID to search for.

{
    "success": true,
    "data": {
        "user_id": "1234",
        "nation_id": 1
    }
}

Nations

GET https://riftapi.mrvillage.dev/v1/nations

Get basic information on all nations. (Updated every four minutes)

{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "I am a nation",
            "leader": "I am a leader",
            "continent": 4,
            "war_policy": 5,
            "domestic_policy": 6,
            "color": 7
            "alliance_id": 0,
            "alliance": null,
            "alliance_position": 0,
            "cities": 10,
            "offensive_wars": 3,
            "defensive_wars": 1,
            "score": 1272.64,
            "v_mode": false,
            "v_mode_turns": 0,
            "beige_turns": 0,
            "last_active": "2021-08-26 22:53:07",
            "founded": "2021-08-26 22:53:08",
            "soldiers": 10150,
            "tanks": 54,
            "aircraft": 7,
            "ships": 1,
            "missiles": 1,
            "nukes": 100
        },
        ...
    ]
}

Prices

GET https://riftapi.mrvillage.dev/v1/prices

Get information on all resource prices. (Updated every five minutes)

{
    "success": true,
    "data": {
        "credit": {
            {"avg_price": 1000,
            "marketindex": 10,
            "highestbuy": {
                "date": "2021-08-26 22:04:20",
                "nationid": 1,
                "amount": 1,
                "price": 20100,
                "totalvalue": 20100
            },
            "lowestbuy": {
                "date": "2021-08-26 22:07:56",
                "nationid": 2,
                "amount": 2,
                "price": 220,
                "totalvalue": 440
            }
        },
        "coal": ...,
        "oil": ...,
        "uranium": ...,
        "lead": ...,
        "iron": ...,
        "bauxite": ...,
        "gasoline": ...,
        "munitions": ...,
        "steel": ...,
        "aluminum": ...,
        "food": ...
    }
}

Spies

GET https://riftapi.mrvillage.dev/v1/spies

Calculate the spy count for a nation.

Query Parameters

Name
Type
Description

id

integer

The nation ID to calculate spies for.

{
    "success": true,
    "data": {
        "id": 1,
        "spies": 47,
    },
    "margin": 2
}

Treaties

GET https://riftapi.mrvillage.dev/v1/treaties

Query Parameters

Name
Type
Description

id

integer

The alliance ID to get treaties for.

{
    "success": true,
    "data": [
        {
            "started": "2021-08-26 22:15:56",
            "stopped": null,
            "from": 1,
            "to": 2,
            "treaty_type": "NAP"
        },
        ...
    ]
}

Last updated

Was this helpful?