webhookAPI

circle-exclamation

Using the API

This API is intended for server-side integrations and addons.

You fire actions through the easyLink Server bindable in ServerStorage.

local API = game:GetService("ServerStorage"):WaitForChild("easyLink Server")

Use API:Fire(Action, Payload) to trigger actions.

Receiving events

You can listen for easyLink events through the easyLink Events bindable in ServerStorage.

local easyLink_Events = game:GetService("ServerStorage"):WaitForChild("easyLink Events")

easyLink_Events.Event:Connect(function(Event, Arguments)
	if Event == "HeadsetGiven" then
		local Player = Arguments.Player
	end

	if Event == "HeadsetRemoved" then
		local Player = Arguments.Player

		-- This also runs when someone leaves the game.
		-- Player may no-longer exist!
		-- The headset is also removed when the player respawns.
	end

	if Event == "MessageSent" then
		local Channels = Arguments.Channels -- Array: {"ChannelName", "ChannelName"}
		local Sender = Arguments.Sender -- String or Player
		local Timestamp = Arguments.Timestamp -- os.time()
		local Content = Arguments.Content -- String
		local Image = Arguments.Image -- String or nil
		local Color = Arguments.Color -- ColorSequence or nil
	end

	if Event == "HelpPoint" then
		local Model = Arguments.Model -- Help point model
		local Player = Arguments.Player -- Player who activated the help point
		local Location = Arguments.Location -- String
	end

	if Event == "HelpPointReset" then
		local Model = Arguments.Model -- Help point model
		local Player = Arguments.Player -- Player who reset the help point
		local Location = Arguments.Location -- String
	end

	if Event == "ServiceCall" then
		local Model = Arguments.Model -- Service caller model
		local BtnModel = Arguments.BtnModel -- Button part model
		local Player = Arguments.Player -- Player who activated the service call
		local Location = Arguments.Location -- String
		local Call = Arguments.Call -- String
	end

	if Event == "ServiceCallReset" then
		local Model = Arguments.Model -- Service caller model
		local BtnModel = Arguments.BtnModel -- Button part model
		local Player = Arguments.Player -- Player who reset the service call
		local Location = Arguments.Location -- String
		local Call = Arguments.Call -- String
	end

	if Event == "HubStatus" then
		local Model = Arguments.Model -- Hub model
		local Enabled = Arguments.Enabled -- Boolean
		local Player = Arguments.Player -- Player who updated the status (can be nil if fired by API)
	end
end)

Sending events

All of these examples assume you already have:

SendMessage

Send a message into a channel (or "All").

Image, Sound, and Color are optional.

Color must be a ColorSequence.

GiveHeadset

RemoveHeadset

ManageHub

Enable or disable the hub.

Player is optional.

ServiceCall

Location must match a real device location in your place.

HelpPoint

Location must match a real device location in your place.

Last updated