1.3.3 • Published 1 year ago

@scrimmage/js-sdk v1.3.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Notes about Next.js integration

To integrate the Scrimmage SDK with a Next.js project, you can use the following code snippet:

useEffect(() => {
    require("@scrimmage/js-sdk").init({
        apiServerEndpoint: 'https://<partner>.apps.scrimmage.co/',
        refreshToken: async () => {
            return '';
        },
        onReady: async () => {
            const player = await require("@scrimmage/js-sdk").instance.api.player.get();
            console.log(player);
        }
    });
});

Inside of the onReady function, you can call any of the SDK methods. For example, to get the player's information, you can call the player.get() method.

1.3.3

1 year ago

1.3.2

1 year ago

1.2.0

1 year ago

1.2.0-alpha

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago