Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK-Documentation Update #3

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
!.yarn/sdks
node_modules
.next
.env
17 changes: 15 additions & 2 deletions pages/sdks/sdk/methods/authenticateAsync.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
CompeyDev marked this conversation as resolved.
Show resolved Hide resolved
title: Authentication
description: Datalink Authentication
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# authenticateAsync

Primary resource used in authenticating the SDK

<Code>
```lua
local DatalinkSDK = require(Path.To.DatalinkSDK)
local DatalinkInstance = DatalinkSDK.new({
datalinkUserAccountId = YOUR_ACCOUNT_ID,
datalinkUserToken = YOUR_ACCOUNT_TOKEN
})

DatalinkInstance:authenticateAsync():andThen(function()
print('Hello from Datalink!')
end)
```
```typescript

```
</Code>
49 changes: 49 additions & 0 deletions pages/sdks/sdk/methods/fireCustomEvent.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# fireCustomEvent

This method is used to invoke a custom developer event, a custom event allows the developer to send whatever information they would like to send over to the Datalink Service
CompeyDev marked this conversation as resolved.
Show resolved Hide resolved

## Parameters

#### eventName: String

The `eventName` parameter should be used to define the name of the custom event the developer would like to invoke.

#### eventParameters: Dictionary ( [string]: [datatype](https://www.tutorialspoint.com/lua/lua_data_types.htm) )

The `eventParameters` parameter should be defined as a dictionary which contains the parameters the developer would like to attach to the custom event

## Example

<Code>
```lua
local DatalinkSDK = require(Path.To.DatalinkSDK)
local DatalinkInstance = DatalinkSDK.new({
datalinkUserAccountId = YOUR_ACCOUNT_ID,
datalinkUserToken = YOUR_ACCOUNT_TOKEN
})

DatalinkInstance:authenticateAsync():andThen(function()
DatalinkInstance:fireCustomEvent(
"MyEventName", {
["MyEventParameter"] = "PlayerExperience",
["MyEventValue"] = Player.Experience
}
)
end)
```
```typescript

```
</Code>

<Callout type="warning" emoji="">
The above sample is an **EXAMPLE** of what you are able to do, a players expereince is one of many things you're able to send over to the dashboard
CompeyDev marked this conversation as resolved.
Show resolved Hide resolved
</Callout>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Guide to using Datalink's server-side Lua SDK
import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# invokeEventAsync
# fireEconomyEvent

<Code>
```lua
Expand Down
15 changes: 15 additions & 0 deletions pages/sdks/sdk/methods/fireProgressionEvent.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# fireProgressionEvent

<Code>
```lua

```
</Code>
15 changes: 15 additions & 0 deletions pages/sdks/sdk/methods/getAllFastFlagsAsync.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# getAllFastFlagsAsync

<Code>
```lua

```
</Code>
15 changes: 15 additions & 0 deletions pages/sdks/sdk/methods/getLocalVariable.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# getLocalVariable

<Code>
```lua

```
</Code>
15 changes: 15 additions & 0 deletions pages/sdks/sdk/methods/getLocalVariables.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# getLocalVariables

<Code>
```lua

```
</Code>
18 changes: 17 additions & 1 deletion pages/sdks/sdk/methods/isAuthenticated.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,26 @@ description: Guide to using Datalink's server-side Lua SDK
import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# IsAuthenticated
# isAuthenticated

Primary resource for acknowledging if the SDK is or is not authenticated

<Code>
```lua
local DatalinkSDK = require(Path.To.DatalinkSDK)
local DatalinkInstance = DatalinkSDK.new({
datalinkUserAccountId = YOUR_ACCOUNT_ID,
datalinkUserToken = YOUR_ACCOUNT_TOKEN
})

local isDatalinkAuthenticated = DatalinkInstance:isAuthenticated()

if not isDatalinkAuthenticated then
...
end
```
```typescript


```
</Code>
11 changes: 9 additions & 2 deletions pages/sdks/sdk/methods/meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"isAuthenticated": ":isAuthenticated",
"authenticateAsync": ":authenticateAsync",
"getFastFlagAsync": ":getFastFlagAsync",
"fireCustomEvent": ":fireCustomEvent",
"fireEconomyEvent": ":fireEconomyEvent",
"fireProgressionEvent": ":fireProgressionEvent",
"getFastIntAsync": ":getFastIntAsync",
"invokeEventAsync": ":invokeEventAsync"
"getFastFlagAsync": ":getFastFlagAsync",
"getAllFastFlagsAsync": ":getAllFastFlagsAsync",
"setVerboseLogging": ":setVerboseLogging",
"setLocalVariable": ":setLocalVariable",
"getLocalVariable": ":getLocalVariable",
"getLocalVariables": ":getLocalVariables"
}
15 changes: 15 additions & 0 deletions pages/sdks/sdk/methods/setLocalVariable.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# setLocalVariable

<Code>
```lua

```
</Code>
15 changes: 15 additions & 0 deletions pages/sdks/sdk/methods/setVerboseLogging.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# setVerboseLogging

<Code>
```lua

```
</Code>
15 changes: 15 additions & 0 deletions pages/sdks/sdk/properties/branch.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# Branch

<Code>
```lua

```
</Code>
5 changes: 4 additions & 1 deletion pages/sdks/sdk/properties/meta.json
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{ }
{
"branch": ".Branch",
"version": ".Version"
}
15 changes: 15 additions & 0 deletions pages/sdks/sdk/properties/version.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# Version

<Code>
```lua

```
</Code>
7 changes: 6 additions & 1 deletion pages/sdks/sdk/signals/meta.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"onAuthenticated": ".onAuthenticated"
"onAuthenticated": ".onAuthenticated",
"onDaemonStarted": ".onDaemonStarted",
"onDaemonStopped": ".onDaemonStopped",
"onMessageRequestFail": ".onMessageRequestFail",
"onMessageRequestSent": ".onMessageRequestSent",
"onThrottled": ".onThrottled"
}
15 changes: 15 additions & 0 deletions pages/sdks/sdk/signals/onDaemonStarted.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# onDaemonStarted

<Code>
```lua

```
</Code>
15 changes: 15 additions & 0 deletions pages/sdks/sdk/signals/onDaemonStopped.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# onDaemonStopped

<Code>
```lua

```
</Code>
15 changes: 15 additions & 0 deletions pages/sdks/sdk/signals/onMessageRequestFail.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# onMessageRequestFail

<Code>
```lua

```
</Code>
15 changes: 15 additions & 0 deletions pages/sdks/sdk/signals/onMessageRequestSent.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# onMessageRequestSent

<Code>
```lua

```
</Code>
15 changes: 15 additions & 0 deletions pages/sdks/sdk/signals/onThrottled.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Authenticating using the Server Side SDK
description: Guide to using Datalink's server-side Lua SDK
---

import {Code} from '../../../../components/code';
import Callout from 'nextra-theme-docs/callout';

# onThrottled

<Code>
```lua

```
</Code>