📚 Add API usage documentation to GamemasterManager view
This commit is contained in:
@@ -157,6 +157,27 @@
|
||||
💡 The filtered pokemon.json is ideal for most use cases, while
|
||||
allFormsCostumes is comprehensive for complete data analysis.
|
||||
</p>
|
||||
|
||||
<h3 style="margin-top: 1.5rem; color: #667eea;">Using the API</h3>
|
||||
<p>
|
||||
Once data is saved to the server, other apps can access it via the
|
||||
Gamemaster API:
|
||||
</p>
|
||||
<pre class="code-block"><code>import { GamemasterClient } from './gamemaster-client.js';
|
||||
|
||||
const gm = new GamemasterClient('/api/gamemaster');
|
||||
|
||||
// Get filtered pokemon
|
||||
const pokemon = await gm.getPokemon();
|
||||
|
||||
// Get all forms with costumes
|
||||
const allForms = await gm.getAllForms();
|
||||
|
||||
// Get moves
|
||||
const moves = await gm.getMoves();
|
||||
|
||||
// Check what's available
|
||||
const status = await gm.getStatus();</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user