Haste Arcade SDK
  • đŸ•šī¸Intro
    • Welcome
    • Quick Start Guide
  • 🚀Prep Work
    • Prepare To Integrate
    • Authentication
    • Register Your Game
  • đŸ› ī¸Integrate
    • SDK
    • Publish Your Game
Powered by GitBook
On this page
  1. Prep Work

Register Your Game

PreviousAuthenticationNextSDK

Last updated 1 year ago

After you've , you need to generate a new gameId by registering your game. You can create multiple games using the same api key.

// Request body
const type CreateGameRequest = {
    name: string; // game name
    description: string; // short game description
    coverUrl: string; // 1920x1080 pixels, 16:9 aspect ratio.
    scoreDisplay: "NORMAL" | "REVERSE"; // choose reverse if a lower value score is better
    prodDomain?: string; // your game's production domain 
};
curl -X POST https://api.hastearcade.com/game/create \
-H "Content-Type: application/json" \
-H "api-key: your-api-key-here" \
-d '{
    "name": "My New Game",
    "description": "An exciting puzzle game with challenging levels.",
    "coverUrl": "http://example.com/cover.jpg",
    "scoreDisplay": "NORMAL"
}'

Update

If you need to make updates to your game you can simply make the following request:

Before going live, make sure to update your prodDomain.

curl -X PATCH https://api.hastearcade.com/game/update \
-H "Content-Type: application/json" \
-H "api-key: your-api-key-here" \
-H "game-id: your-game-id" \
-d '{
    "description": "Updated description with more levels.",
    "coverUrl": "http://example.com/new-cover.jpg",
    "prodDomain": "https://myfunpuzzlegame.com"
}'
🚀
generated an api key