create account

Modern & Wild API Changes by splinterlands

View this thread on: hive.blogpeakd.comecency.com
· @splinterlands ·
$14.42
Modern & Wild API Changes

<center> ![](https://i.imgur.com/R9h9VQZ.jpg) </center>
<center> ![](https://i.imgur.com/efJwvul.png) </center>

This information is a compilation of arcane tradecraft that will only interest third party developers using the Splinterlands API. If you are *not* a developer, the below (while potentially insightful if you are technically minded) will likely not be of much interest and you should probably stop reading now.

## Definition of Modern and Wild cards

Format | Cards Allowed
--- | ---
***Wild*** | All
***Modern*** | Chaos Legion, Dice, Untamed, Reward & Promo cards with an Untamed or Chaos Legion style frame are all considered Modern cards.

*Technical definition*: any card that has an edition in [4,5,7], **OR** tier in [3,4,7] is considered to be Modern.

---

For all APIs that return player data (including but not limited to those mentioned below), new fields have been added that contain Modern stats.  These new fields will be in addition to the original stats (which are now interpreted as being for the Wild format).  All such fields will be prefixed with `modern_`.  Data not explicitly prefixed with `modern_` should be assumed to be Wild data.

For all APIs that return battle data, there will be a new field `format` included in the response data.  This field will be set to **modern** if it is defined.  If it is undefined, the battle should be taken to be a Wild battle.

---

## API List

### **settings** (also accessible in the browser console as SM.settings)

Added the following fields:

* `modern_num_editions` functions analogously to `num_editions` but for the Modern format.  The current value is 5.
* `battles.modern` configuration that defines exactly what a Modern card is:
![](https://i.imgur.com/CEaKpLP.png)
* `leaderboard_prizes` re-organized into `wild` and `modern` sub-categories
* `leagues` re-organized into `wild` and `modern` sub-categories

Removed the following fields:

* `new_rewards_season` is no longer needed as support for pre-Ranked Rewards V2 functionality has been dropped
* `quests` no longer needed as support for old-style quests has been dropped (the new `daily_quests` field has replaced this)

Example: https://qa.splinterlands.com/settings

### **players/season_ratings**

This API is no longer supported and any attempt to use it will return an error message.

### **players/quests**

The `league` field has been removed from response data.

Example: https://qa.splinterlands.com/players/quests?username=farpetrad

### **players/refresh_season_data**

Response data now includes additional information about Modern stats.  Data not explicitly prefixed with `modern_` should be assumed to be Wild data.  `current_modern_season_player` and `previous_modern_season_player` fields have been added that function equivalently to their Wild counterparts.  Note that these optional fields will not be defined if the player has not played any Modern battles in the corresponding seasons.

Example: https://qa.splinterlands.com/players/refresh_season_data?token=XXXXXXXXXX&username=myname

### **players/refresh**

Response data now includes additional information about Modern stats.  Data not explicitly prefixed with `modern_` should be assumed to be Wild data.

Example: https://qa.splinterlands.com/players/refresh?token=XXXXXXXXXX&username=myname

### **players/details**

Added an optional *format* query parameter, which if used must be set to either **modern** or **all**. This parameter only makes a difference if used in combination with the *seasondetails* parameter. It determines whether the returned season_details object is for Wild or Modern. If *format* is not present, then the API will default to giving season_details results only for the Wild format.

A new field `player_uuid` has also been added, containing the unique UUID for the queried player.

Valid values for *seasondetails* (this must be a string value):

* **true** - adds on the season_details object in addition to standard player info
* **only** - only returns the season_details object without any other player info

Valid values for *format* (this must be a string value):

* **modern** - give season_details for the Modern format
* **all** - give season_details for both Modern & Wild formats (there will be a `season_details.modern` and `season_details.wild` in the response data)

Example: https://qa.splinterlands.com/players/details?name=brybro27&season_details=true&format=modern

### **players/details_by_id**

Added an optional *format* query parameter.  The *format* and *seasondetails* parameters now obey the same rules & support the same values as explained above for the **players/details** API.  This API functions the same way, except **players/details_by_id** allows lookup by the unique UUID rather than player name.

Example: https://qa.splinterlands.com/players/details_by_id?id=d4bb773d-d36d-484b-918b-335c040148d4&season_details=only&format=all

### **players/dec**

New fields `modern_inflation` and `modern_reward_pool` have been added to the response data.

Example: https://qa.splinterlands.com/players/dec

### **players/leaderboard_with_player**

Added an optional *format* query parameter, which if used must be set to **modern**. If *format* is not present, then the API will default to giving results only for the Wild format.

Example: https://qa.splinterlands.com/players/leaderboard_with_player?username=farpetrad&season=89&leaderboard=2&format=modern

### **players/leaderboard**

Added an optional *format* query parameter, which if used must be set to **modern**. If *format* is not present, then the API will default to giving results only for the Wild format.

Example: https://qa.splinterlands.com/players/leaderboard?season=89&leaderboard=2&format=modern

### **players/recent_teams**

Added an optional *format* query parameter, which if used must be set to **modern**. If *format* is not present, then the API will default to giving results only for the Wild format.

Example: https://qa.splinterlands.com/players/recent_teams?player=brybro27&format=modern

### **battle/history**

Added an optional *format* query parameter, which can be set to **modern** or **wild**. If *format* is not present, then the API will default to giving results for both formats mixed together.

Example: https://qa.splinterlands.com/battle/history?player=brybro27&format=modern

### **battle/history2**

Added an optional *format* query parameter, which if used must be set to **modern**. If *format* is not present, then the API will default to giving results only for the Wild format.

Example: https://qa.splinterlands.com/battle/history2?player=$top&leaderboard=2&format=modern

---

## Blockchain Transaction Changes

* **sm_advance_league** - added an optional *format* custom JSON field, which if used must be set to **modern**. If format is not present, then the transaction will default to Wild format processing.

* **find_match** - *match_type* parameter can optionally be set to **Modern Ranked** or **Wild Ranked**. Pre-Modern & Wild usage is to set it to Ranked, which will be kept for backward compatibility and interpreted to mean Wild Ranked.

---

## Tournaments

A new field *epoch* has been added to the `allowed_cards` tournament settings data.  If present, *epoch* will be either **modern** or **wild**.  For older tournaments, *epoch* may not be defined.  If *epoch* is not defined, the tournament will be treated as a Wild tournament.

Modern tournaments only allow Modern cards to be used.  In such tournaments, all other settings such as edition restrictions, gold foil rules, etc still apply as usual.

Also note that in Modern tournaments, only Modern cards count towards Collection Power entry requirements, and entry fee discounts are based on the player’s Modern league.  For Wild tournaments, entry fee discounts are based on the player’s Wild league.

Example: https://qa.splinterlands.com/tournaments/find?id=18d8886db38128a011290d76d76261e48f869b1c

![](https://i.imgur.com/4KaGHEP.png)

---

## Important Note

The API examples given above are only that, examples of how such queries should be formed. They are not guaranteed to actually return data, as the state of the QA environment constantly changes.

Also, before testing your app against QA, you should confirm in the [Splinterlands Discord](https://discord.gg/splinterlands) that Modern & Wild has actually been deployed there. At the time of writing, it has not. Expect that it will be soon, and a notice will be given in the **developers-3rd-party** channel.



<center> ![](https://i.imgur.com/IAAas02.png) </center>

<center>

## Stay tuned for more updates from the Splinterlands!

**[Website](https://splinterlands.com) | [Blog](https://peakd.com/@splinterlands) | [Discord](https://discord.gg/CAFJRjY) | [Telegram](https://t.me/splinterlands) | [Shop](https://steemstyle.io/collections/splinterlands)**


![](https://i.imgur.com/xrZQl2D.gif)

*NOTE: All rewards from this post will be burned.*

</center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 333 others
properties (23)
authorsplinterlands
permlinkmodern-and-wild-api-changes
categoryhive-13323
json_metadata{"app":"peakd/2022.05.9","format":"markdown","tags":["modern","wild","api","splinterlands","spt","community","play2earn","gaming"],"users":["splinterlands"],"image":["https://i.imgur.com/R9h9VQZ.jpg","https://i.imgur.com/efJwvul.png","https://i.imgur.com/CEaKpLP.png","https://i.imgur.com/4KaGHEP.png","https://i.imgur.com/IAAas02.png","https://i.imgur.com/xrZQl2D.gif"]}
created2022-06-29 15:31:09
last_update2022-06-29 15:31:09
depth0
children1
last_payout2022-07-06 15:31:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value14.422 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length8,982
author_reputation1,502,210,244,129,271
root_title"Modern & Wild API Changes"
beneficiaries
0.
accountnull
weight10,000
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id114,426,541
net_rshares49,910,753,209,067
author_curate_reward""
vote details (397)
@poshtoken ·
https://twitter.com/splinterlands/status/1543349796609568768
<sub> The rewards earned on this comment will go directly to the people sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.</sub>
properties (22)
authorposhtoken
permlinkre-splinterlands-modern-and-wild-api-changes15719
categoryhive-13323
json_metadata"{"app":"Poshtoken 0.0.1","payoutToUser":[]}"
created2022-07-02 21:47:57
last_update2022-07-02 21:47:57
depth1
children0
last_payout2022-07-09 21:47:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length248
author_reputation3,941,319,653,710,194
root_title"Modern & Wild API Changes"
beneficiaries
0.
accountreward.app
weight10,000
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id114,518,687
net_rshares0