Skip to main content

Documents

Overview

The SDK functionality allows you to add automatically generated standard documents to your game project. You can also upload your own HTML, RAW, TXT documents and display them in the app as needed.

Privacy Policy

You can turn on the privacy policy for the game at any time in the documents section of the project.

You can use an auto-generated standard document, taking into account SpellSync and the metrics that you have included in the project.

Or you can upload your document, it can be text or HTML.

Then you can open privacy policy from the game by +1 Request:

ss.documents.open({ type: 'PLAYER_PRIVACY_POLICY' });

Or you can download document and display as you want +1 Request:

// By default format is HTML
const document = await ss.documents.fetch({
type: 'PLAYER_PRIVACY_POLICY'
});

// Type of document - PLAYER_PRIVACY_POLICY
document.type;
// Content in preferred format
document.content;

// Custom format - HTML | RAW | TXT
ss.documents.fetch({
type: 'PLAYER_PRIVACY_POLICY',
format: 'TXT'
});

Documents events

// Overlay opened
ss.documents.on('open', () => {});

// Overlay closed
ss.documents.on('close', () => {});

// Fetch
ss.documents.on('fetch', (document) => {});

// Fetch error
ss.documents.on('error:fetch', (error) => {});

Stay in Touch

Other documents of this chapter available Here. To get started, welcome to the Tutorials chapter.

SpellSync Community Telegram: @spellsync.

For your suggestions e-mail: [email protected]

We Wish you Success!