search_games
Search Player Two's games
Find games on Player Two (playertwo.lol), a store of games played in the browser: by words (in a game's name, tagline, description, studio, genres, modes and features: every word must match), genre, platform, free or paid, multiplayer, store game or raise. Each game with its slug, name, tagline, studio, genres, modes, price and whether it is free, a sale, a free trial, whether it plays with others, where it plays, players, reviews and its page's address. get_game_facts tells one in full. No key needed.
Parameterskindgenrelimitorderpricequeryoffsetplatformmultiplayer
list_games
List Player Two's games
Every game in Player Two's store (playertwo.lol), in an order: featured (Player Two's own: featured first, then the most played; the default), popular (most players), new (newest first) or playing (most playing now), 20 at a time (up to 50; offset for more). The same filters as search_games. No key needed.
Parameterskindgenrelimitorderpriceoffsetplatformmultiplayer
get_game_facts
A game's facts
Everything an agent needs to answer a player about one game on Player Two, by its slug (from search_games or its address, playertwo.lol/game/<slug>): what it is, its genres and modes, what it plays on, who it is for, its price (a sale, a trial, a raise's progress), where to play it and whether a guest can, how to play it (its controls and goals, in its developer's words), whether it is multiplayer, the Player Two services it has (trophies, leaderboards, cloud saves, add-ons), its latest updates, and how to report a bug. The same facts its page gives agents. No key needed.
Parametersslugrequired
get_sdk_docs
Read Player Two's developer docs
A part of Player Two's developer docs, in Markdown, as the docs pages say it today: the game SDK (trophies, leaderboards, stats, cloud saves, presence, in-game purchases, multiplayer rooms and room code), hosting a web game and pushing builds, Player Two Connect for a game on its own site, travel and avatars, webhooks, and the platform's rules for developers (listing, raises, fees, agents). topic: a page and part ("/docs/sdk#rooms"), a part's id ("rooms-sync"), or a few words ("leaderboards", "push", "fees"); left out, the list of every topic. No key needed.
Parameterstopic
where_to_publish
Publishing a game on Player Two
What Player Two offers a game's developer, as its docs state it, each fact with its link: what it keeps of sales, in-game purchases and raises, how a game gets there (the form, an agent, a zip, a pushed folder, GitHub, its own site served), and everything a game gets (store page, hosting, SDK, multiplayer rooms, trophies, leaderboards, saves, purchases, webhooks, MCP). No key needed.
Takes no parameters.
get_submission_guide
How to submit a game
Read this first: every field of a game's page, its limits, the rules, the steps, and an example store game and raise. No key needed.
Takes no parameters.
Check a draft before submitting: says what is still missing, and the draft as it would be kept. Saves nothing. No key needed.
Parametersdraftrequired
upload_media
Upload a picture, a trailer or a font
Keep a picture (PNG, JPEG or WebP up to 12 MB: the key art, screenshots, a feature's picture), a trailer or a gameplay video (MP4 or WebM up to 80 MB) or a font for the name's lettering (WOFF2, WOFF, TTF or OTF up to 2 MB, checked by what it is; only a font you are allowed to use on the web) in Player Two's file store. Returns its address, for the draft's art, poster, shots, clip, videos, a feature's art, or font. With game (a slug), a picture or a video for that game's updates instead: the only kind of address post_update's media takes.
Parametersurldatagamefilename
upload_web_build
Upload a web build
Keep a game played in the browser: a .zip with index.html at its top (up to 100 MB), or a single .html page. Returns the address to put in the draft's build. version (optional): what the build is called, up to 32 characters of letters, digits, dots, dashes, plus signs and spaces, starting with a letter or a digit (like 1.4.0); left out, it is called by its number in its game's builds ("12") once the draft names it.
Parametersurldataversionfilename
Submit the player's game, for the store (kind: store) or as a raise (kind: raise). Live at once, or kept as a draft in their studio with publish: false. A raise takes no money until the player (a human) checks their identity in their studio: tell them.
Parametersdraftrequiredpublishrelease
update_game
Change a game's page
Change one of the player's games: only the fields given change. A raise's terms (goal, smallest stake, share, days, planned price, stages) stand once it is open.
Parametersslugrequireddraftrequired
get_game
Read one of the player's games
One of the player's games as stored (drafts too), with its raise if it has one.
Parametersslugrequired
list_trophies
A game's trophies
One of the player's games' trophies (retired ones too), how many players hold each, the XP budget left of 1,000, and whether the game counts toward players' levels yet.
Parametersslugrequired
define_trophy
Add or change a trophy
Add a trophy to one of the player's hosted games, or change one by its key. Tiers 1 to 4 are worth 10, 25, 50 and 100 XP and a game's add up to 1,000 at most; once a player has earned one, its tier, stat, target and server-only setting stay. Every trophy is a relic, a small sculpture of cubes built from its sign: rows from the top on a grid of up to 16 by 16, # a cube and . none ("..#../.###./#####"), or a library sign's name (crown, rocket, gem, pad, bell, lantern, flag, fist, star, bolt, key, sword, shield, heart, moon, flame, hourglass, anchor, tower, joystick, gift); without one Player Two picks one by its key. The completion trophy (key "complete") is a crown until it is given the game's own sign: send key "complete" with a sign alone. The game earns a trophy with the SDK's trophies.unlock(key).
Parametersslugrequiredtrophyrequired
list_boards
A game's leaderboards
One of the player's games' leaderboards, with how many players are on each.
Parametersslugrequired
define_board
Add or change a leaderboard
Add a leaderboard to one of the player's hosted games, or change one by its key (up to 20): which way is better, how a score reads, its bounds, the wait between scores, and whether only the game's own server sends scores (trusted). The game fills it with the SDK's scores.submit(key, value).
Parametersslugrequiredboardrequired
list_builds
A web game's builds
One of the player's web games' builds that are still kept (30 days after another took its place, and the last 20 always), newest first: each one's version (its developer's, or its number in the game's builds), which is live, who sent each (the player, or which agent key), its size, its files against the build before, its commit and note, the players on it now and where to try it without making it live; and the game's latest changes of build.
Parametersslugrequired
make_build_live
Roll back (or forward) to a build
Make a build from list_builds the game's build again: players get it on their next page load. The build live now stays kept, so this can be undone the same way. Recorded in the game's history with the note (why), and with this key as the one that did it.
Parameterskeyrequirednoteslugrequired
name_build
Name a build's version
Give one of the player's web games' kept builds (key from list_builds, live or not) its version: up to 32 characters of letters, digits, dots, dashes, plus signs and spaces, starting with a letter or a digit (like 1.4.0 or 2.0 beta). Shown wherever its builds are from then on; nobody is told. A push names a build as it goes up (p2 push --version); this is for one that came without (a GitHub commit's, called by its number) or a correction.
Parameterskeyrequiredslugrequiredversionrequired
list_products
What a game sells
One of the player's games' add-ons and in-game products (off-sale ones too), each with its kind, key and price, how many players have it, how many times it was bought and what the studio has made from it.
Parametersslugrequired
define_product
Add or change a product
Add something one of the player's games sells, or change one by its key. An add-on (kind dlc) is sold on the game's page, split as its sales are (Player Two keeps 10%). Everything else is sold inside the game: the game lists them (p2.store.list) and asks to sell one (p2.store.buy), Player Two's own step takes the player's yes, and Player Two keeps 20%: a consumable (bought again and again, qty a time, used up by the game's server), an item or skin, a mod, a pack (contents: 2 to 10 of the others). Key and kind stay once a player has it; retired takes it off sale.
Parametersslugrequiredproductrequired
get_rooms
A game's rooms now
One of the player's games' multiplayer rooms open now (by build) and how their players' connections were over the last minute, overall and for its eight busiest rooms: ping (the middle page's and p90, ms there and back), jitter, bytes a second each way a page, corrections and rewinds a minute a page, connections dropped; whether rooms are on, the live build's room code, and the last error that code threw. What the studio's Rooms panel shows; `units` says what each figure is in. Read-only.
Parametersslugrequired
playtest_link
A game's playtest link
One of the player's games not out yet (kept private, or coming on a day): its "anyone with the link" playtest, as its studio's Playtesters has it. on: true turns it on (anyone who opens the link sees the game's page, a private one's too, and once signed in plays it as a tester: free, in test mode, a paid game too, from then on without the link); on: false turns it off, and every tester who came by it is taken off (invited testers stay); reset: true makes a new link, the old one stopping at once. Neither: how it stands. Answers whether it is on and the link to share while it is.
Parametersonslugrequiredreset
post_update
Post an update on a game's page
Post news on one of the player's games, first in its page's Updates (what its page's and studio's Post an update do): a title (2 to 80 characters) and the words in Markdown, up to 10,000 characters (**bold**, *italic*, ## a heading, - or 1. lists, > a quote, [words](https://...) links, http and https only; no HTML, no pictures by Markdown), with up to 4 pictures, or a video and 3 pictures (media: addresses from upload_media with game set to this slug; the first is the post's picture in the feed). Backers, owners, wishlisters and the studio's followers are told in their notices, in plain words (none for a private game); it can be edited (edit_update), pinned (pin_update) or deleted (delete_update) after, but nobody is told again and an email sent stays sent, so post only what the player asked for. With at (milliseconds or an ISO time with its zone, 5 minutes to 90 days ahead) it waits: only the team sees it (list_updates), nobody is told until it goes up at that time, as if posted then. 20 a day a player.
Parametersatbodyslugrequiredmediatitlerequired
list_updates
A game's posted updates
One of the player's games' posts still up on its page, the pinned one first and then the newest (up to 100): each one's id (what edit_update, pin_update and delete_update take), its kind (devlog: its team wrote it, so it can be edited and deleted; release, unlock, vote and raise are Player Two's own, which can only be pinned), title, Markdown words, attachments, when it went up, when it was last edited, whether it is pinned, how many comments it has and whether they are locked.
Parametersslugrequired
edit_update
Edit a posted update
Change one of the player's developer posts (kind devlog, from list_updates) by its id: its title (2 to 80), its words in Markdown (up to 10,000) and its attachments (media: the whole new list, in order, up to 4 pictures or a video and 3; the ones it had, and new ones from upload_media with game). What you leave out stays. The same rules as post_update; nobody is told again; its page says Edited after its date, and its translations are made again. A post waiting to go up (scheduled in list_updates): at moves its time, now: true posts it now (its audience told then); it isn't marked Edited. A file taken out leaves the store a day later unless another post shows it. Only what the player asked for.
Parametersatidrequirednowbodyslugrequiredmediatitle
pin_update
Pin an update first
Pin one of a game's posts first in its page's Updates, before the newest (pinned: true, the default), or unpin it (false). Any post, Player Two's own "Out now" too. One a game: pinning another unpins the one before. Nobody is told; visitors see Pinned on it.
Parametersidrequiredslugrequiredpinned
delete_update
Delete a posted update
Take one of the player's developer posts (kind devlog) off its game's page for good, by its id from list_updates: gone from the page, the feeds, the studio and the API; the notices it sent are taken out of players' lists (an email already sent stays sent); its pictures and video leave the store a day later unless another post shows them; unpinned if it was pinned. It can't be undone: only when the player asked for it. Player Two's own posts can't be deleted.
Parametersidrequiredslugrequired
my_studio
The player's studio
The player's studio: its games and where each stands, and whether their identity is checked (needed only for raises).
Takes no parameters.