TMWSTW API endpoint can be used by anyone who wants to build applications/services on top of and/or around the metaverse.
HTTP endpoint
https://api.tmwstw.io/
JS GET request example
let xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function(){
if (this.readyState == 4 && this.status == 200){
console.log(this.responseText);
}
};
xhttp.open("GET", https://api.tmwstw.io/some_api_method, true);
xhttp.send();
All plot ownership related methods.
all_plots
https://api.tmwstw.io/all_plots
Returns string of claimed plot ids (ex. "/1&2&2&4...")
plots_claimed
https://api.tmwstw.io/plots_claimed
Returns number of claimed plots (ex. "/6969")
plot_owners
https://api.tmwstw.io/plot_owners
Returns number of plot owners (ex. "/69")
owner_of_plot=plot_id
https://api.tmwstw.io/owner_of_plot=1
Returns address or ensname of owner of given plot id (ex. "/kingoftheworld.eth")
plot_id in the end of GET request must be changed to plot id (token id in range of 1 to 10000)
plot_ids_per_address=address
https://api.tmwstw.io/plot_ids_per_address=0x69..
Returns string of plot ids given address owns (ex. "/1&2&2&4...")
address in the end of GET request must be changed to ethereum address
plots_per_address=address
https://api.tmwstw.io/plots_per_address=0x69..
Returns number of plots given address owns (ex. "/69")
address in the end of GET request must be changed to ethereum address
leaderboard_page=page_number
https://api.tmwstw.io/leaderboard_page=0
Returns leaderboard page of 15 addresses and number of plots in ownership and ensname if registered in descending order (ex. "/0x1Db..=69=name.eth&0x4rt..=61&...")
page_number in the end of GET request must be changed to leaderboard page number starting at page 0. Given example will return 15 largest plot owners
All game data related methods.
game_death_list
https://api.tmwstw.io/game_death_list
Returns list of last 100 deaths as array of objects including victim address, killer address and date of death in UTC (ex. "[{victim:0x231...,killer:0xdw3...,date:1.12:12:12},{...}]")
game_plots_with_players
https://api.tmwstw.io/game_plots_with_players
Returns list of plots with number of players (ex. "{1:5,1111:1,2222:3}")
All faucets related data methods.
faucet_data
https://api.tmwstw.io/faucet_data
Returns array of arrays of unlocked faucets in pair with amount of daily generated resource (ex. "[[1,1],[2,0],[3,3],[4,20],[...]]")
faucet_state=resource_name
https://api.tmwstw.io/faucet_state=bob
Returns array of arrays of high giving faucets in pair with amount of resource available at the moment (ex. "[[1,20],[2,20],[3,0],[...]]")
resource_name in the end of GET request must be changed to name of resource lower case
faucet_state_mid=resource_name
https://api.tmwstw.io/faucet_state_mid=slag
Returns array of arrays of mid giving faucets (if resource has that) in pair with amount of resource available at the moment (ex. "[[1,16],[2,16],[3,0],[...]]")
resource_name in the end of GET request must be changed to name of resource lower case