1.0.16 • Published 2 years ago

stardust-gg v1.0.16

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Stardust-gg

interact with the stardust api over http using your favorite language - javascript! (typescript too!)

npm i stardust-gg
yarn add stardust-gg

Stardust dashboard setup

To hit the stardust api directly a few items must be completed.

  • login to stardust
  • create a game (preferrably an isolated one - called test) on polygon
  • create an api key
  • copy the api key into your .env file under STARDUST_APIKEY
  • create a template called test
  • copy the template id into your .env file under TEMPLATE_ID

Create a game

// game.ts
import * as stardust from 'stardust-gg'
export const game = new stardust.Game('API_KEY_HERE')

Reference the game you created

// app.ts
import { game } from './game'
main()
  .catch(console.error)

async function main() {
  await game.health.check() // { data: { status: 'OK' } }
  const { data: gameInstance } = await game.get()
  const { data: player } = await game.player.get('PLAYER_ID_HERE')
}
1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago