Skip to main content

SDK Initialization

Last updated on

Before using the DSM Controller service from the SDK, you will need to initialize your server-side SDK to ensure that you are authorized and able to perform create, read, update, and delete actions.

Golang SDK Initialization

Before using the DSM Controller service from the Golang SDK, you will need to initialize the SDK by following the steps below:

sessionService := &dsmcontroller.SessionService{
Client: factory.NewDsmControllerClient(&repository.ConfigRepositoryImpl{}),
TokenRepository: &repository.TokenRepositoryImpl{},
}

Once completed, you can use the Golang SDK to create, read, update, or delete the DSM Controller from your serverless app.

Python SDK Initialization

Before using the DSM Controller service from the Python SDK, you will need to initialize the SDK by following the steps below:

Once completed, you can use the Python SDK to create, read, update, or delete the DSM Controller from your serverless app.

.NET (C#) SDK Initialization

Before using the DSMC service, you will need to set some permissions. Use the following .NET namespaces:

using AccelByte.Sdk.Api.Dsmc.Model;
using AccelByte.Sdk.Api.Dsmc.Operation;
using AccelByte.Sdk.Api.Dsmc.Wrapper;

Java SDK Initialization

Before using the DSMC service, you will need to set some permissions. Initialize the Session wrapper from the DSMC service using the following code:

net.accelbyte.sdk.api.dsmc.wrappers.Session wSession = new net.accelbyte.sdk.api.dsmc.wrappers.Session(sdk);

Once completed, you can use the SDK to create, read, update, or delete DSMCs.