@smash-sdk/core is a JavaScript library that provides core functionality for Smash SDK.
This package is already installed when a Smash SDK package is installed in your project, so you should not have to install it manually. If you are using the Smash Uploader and/or Smash Downloader, this package is not yet usable (for now).
Anyway, @smash-sdk/core is available on npm:
npm install @smash-sdk/core
The main feature of @smash-sdk/core is to set a default configuration for any SDKs futur instanciation. Most of Smash SDKs needs a token and/or a region to be used.
To use @smash-sdk/core in your project, you need to first import it into your JavaScript file:
import { config } from "@smash-sdk/core";
You can set the config object with your Smash API credentials (How to get Smash API crendentials).
config.setToken("Your Smash API key here");
Smash is available accross 9 regions. You may pick up a region of your choice and set it as default:
config.setRegion("eu-west-3");
For more information on how to use Smash SDKs, you can refer to the Smash Docs documentation.
We welcome contributions! If you'd like to help improve @smash-sdk/core, please fork the repository, make your changes, and submit a pull request.
@smash-sdk/core is released under the MIT License.