@subgames/sdk
v1.0.10
Published
Official browser SDK for sub.games tier-gating
Readme
@subgames/sdk
Official browser SDK for sub.games tier-gating.
Install
npm install @subgames/sdkOr load it directly in the browser:
<script src="https://sdk.sub.games/sdk.js"></script>Quick Start
import { SubGamesSDK } from '@subgames/sdk';
const sdk = SubGamesSDK.init({
gameKey: 'my-platformer',
overlay: true,
});CDN usage:
<script src="https://sdk.sub.games/sdk.js"></script>
<script>
const sdk = SubGames.SubGamesSDK.init({
gameKey: 'my-platformer',
overlay: true,
});
</script>The CDN bundle is exposed on window.SubGames.SubGamesSDK.
Features
- Tier-gating for
free,supporter, andfounder - Login and subscribe prompts
- Pause and unpause events around modal flows
- Browser bundle for script-tag integrations
Docs
- Browser SDK docs: https://sub.games/docs/sdk/browser-sdk
- React SDK docs: https://sub.games/docs/sdk/react-sdk
- Server SDK docs: https://sub.games/docs/sdk/server-sdk
