___  ___    _ _    _  _ _____   _____
 / __|/ _ \  | | |  | || |_ _\ \ / / __|
| (_ | (_) | |_  _| | __ || | \ V /| _|
 \___|\___/    |_|  |_||_|___| \_/ |___|

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

Rebellion Conflicts APIs

BY: @cryptomancer | CREATED: Dec. 12, 2023, 5:05 a.m. | VOTES: 29 | PAYOUT: $0.00 | [ VOTE ]

[IMAGE: https://hackmd.io/_uploads/rJTzc4BIp.jpg]

This post is intended for all you Splinterlands community developers out there.

With Rebellion Conflicts coming soon, and already available for testing on the Mavs QA server, I figured it's time to go over the details of API additions that have been made to support this new airdrop mechanism.

Note that the following changes will not go live for the real game until Conflicts is released, but you can try them all out now in Mavs QA. All example links are for Mavs QA; for the real game you would replace api.mavs-sl.com with api.splinterlands.com

Conflict Seasons

Conflicts are organized into a series of 9 roughly monthly events, which internally are known as Conflict Seasons (analogous to Ranked Play Seasons). There is an End-Of-Conflict (EOC) process, after which the Airdrop Card for that particular Conflict becomes claimable. The next Conflict Season begins immediately after the previous one finishes. At EOC, all cards & packs that players have staked will automatically carry over to the next Conflict Season, but contribution points will be reset and start accumulating from 0 again.

cards/collection

cards/collection_by_card

These APIs will have a wagon_uid field added to the data for each card, which will be set if that particular card is staked on a Mage Wagon. If the card is not staked, wagon_uid will be null.

Examples:

conflicts/seasons

Fetches data about Conflict Seasons. Note that various fields for future Conflict Seasons that have not started yet may be null or set with dummy data, until such time as that season is about to start. We don't have all 9 Airdrop Cards finalized yet.

Examples:

conflicts/players

Returns data about players participating in particular Conflict Seasons, including contribution points towards the Conflict and Airdrop Cards won in completed Conflicts, if any.

Note that if not explicitly specified with optional parameters, by default airdrop data is not included and the sort order will be reward_points DESC, player ASC

Examples:

Notes about meaning of player data fields:

[IMAGE: https://hackmd.io/_uploads/SJngJUrL6.png]

Alternative usage for multiple Conflict Seasons:

uids parameter:

An optional parameter that can be combined with the player and mode parameters. Has no effect if you are retrieving data for all players. This will add a list of uids for airdrop cards received. It’s the most data intensive type of querying, so should be used sparingly.

Examples:

conflicts/airdrop_distribution

Returns airdrop distribution data for completed Conflicts, showing how many cards were awarded to each player. Note that this data does not indicate what proportion of cards are regular foil vs gold foil; for that you need to look at the airdrop claim data from the conflicts/players API.

Also, the default sort order of results is num_prizes DESC, player ASC

Examples:

Alternative usage for multiple Conflict Seasons:

conflicts/leaderboard

Used to get leaderboard data on top players for a given Conflict Season. Note that for the current Conflict, leaderboard data will only be updated once per hour, or for individual players whenever that player makes a changes to staked Rebellion cards or packs.

Leaderboard data is limited to the top 200 players, but does also include a totals.total_reward_points field that indicates the total Airdrop Chances that have accumulated for all players participating in the given Conflict Season.

Examples:

conflicts/leaderboard_with_player

Used to get an individual player’s leaderboard position for a given Conflict Season.

Examples:

conflicts/status

Fetches several different pieces of information about current Conflict status for a given player. Let's look at examples of each piece of information:

Parameters:

The only_xxxx and exclude_xxxx parameters can be used to optimize query performance by eliminating unneeded information. If all 3 of wagons, player, and stats data are excluded, then the username parameter becomes optional.

Examples:

Note that if wagons data is included, then stats.total_wagon_cp will also be included, regardless of whether other stats are included or not.

conflicts/wagon

Returns information about assets staked on one particular wagon. Format of the return data is the same as the wagons data for the conflicts/status API above, but with the addition of a player field to indicate wagon ownership. Has one required parameter: uid

Example: https://api.mavs-sl.com/conflicts/wagon?uid=I-326-1MXYYBYC4W

conflicts/wagon_eligible_cards

Returns information about cards that are eligible to be placed on a player’s Battle Wagons. These cards will meet the following criteria:

Parameters:

A grouping represents all card UIDs that have the same Collection Power, Card Detail ID, Gold, and BCX values. Note that even if max_group_size is used, a grouping’s qty field will be set to the total number of card UIDs that exist in that group. Groups will always have the following ordering: collection_power DESC, card_detail_id ASC, gold DESC, bcx DESC

Within a group, the list of card UIDs will be sorted in ascending alphabetical order.

Examples:

[IMAGE: https://hackmd.io/_uploads/SktSywHUa.png]

Including flavor text (lore) in Conflict Season data:

An optional parameter lore=1 exists for the following APIs:

This flag indicates that extra lore related fields should be included in Conflict Season data. If you don’t use it, then by default the following seasonal fields will not be included in API data:

And that's it!

There you have it. Any questions about the above APIs can be referred to myself. Happy coding!

TAGS: [ #splinterlands ] [ #rebellion ] [ #conflicts ] [ #gaming ] [ #api ] [ #developer ] [ #reference ] [ #dev ]

Replies

@splinterboost | Dec. 12, 2023, 5:05 a.m. | Votes: 4 | [ VOTE ]

This post has been supported by @Splinterboost with a 12% upvote! Delagate HP to Splinterboost to Earn Daily HIVE rewards for supporting the @Splinterlands community!

Delegate HP | Join Discord

@tehox | Dec. 12, 2023, 6:41 a.m. | Votes: 1 | [ VOTE ]

Great, thank you. I tested Conflict and it worked very smooth on Mavs

@bubke | Dec. 25, 2023, 2:26 p.m. | Votes: 0 | [ VOTE ]

Extensive information, nice and thanks. I think i miss a few elementary ones though...

  1. Buy a wagon
  2. Assign a card or pack to a wagon
@eqzeros313 | Dec. 15, 2024, 10:32 p.m. | Votes: 0 | [ VOTE ]

Oh great developer! I am a student, I don’t have enough money to study 720usdt. Send it to bep20 0xa4fd28918b031646c8860b8ff40fe5b2f9f34553

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>