Class: InstantiatedSDK

InstantiatedSDK()

Initializes the SDK for networking developers.

Constructor

new InstantiatedSDK()

Source:

Methods

AboutInstantiated()

Displays the about section of Instantiated.
Source:

AccountAssignRole(Username, RoleName)

Assigns the account a role specified by the host.
Parameters:
Name Type Description
Username String
RoleName String
Source:

AccountChangePassword(NewPassword, Username)

Changes the account's password.
Parameters:
Name Type Default Description
NewPassword String
Username String null
Source:

AccountDelete(Username)

Deletes the account. Username left blank will delete your account.
Parameters:
Name Type Default Description
Username String null
Source:

AccountDeleteData(Item)

Deletes the item from your personal account.
Parameters:
Name Type Description
Item String
Source:

AccountDeleteMessage(Position, Username)

Deletes a message from their session.
Parameters:
Name Type Description
Position Number
Username String
Source:

AccountEdit(Alias, Bio, Status, ProfileIMG_Url, Username)

Edits the session account.
Parameters:
Name Type Default Description
Alias String
Bio String
Status String
ProfileIMG_Url String
Username String null
Source:

AccountExport()

Exports account data from the session.
Source:

AccountImport(account_data)

Imports account data to the session.
Parameters:
Name Type Description
account_data JSON
Source:

AccountInfo(Username)

Looks for the account information.
Parameters:
Name Type Default Description
Username String null
Source:

AccountLoadData(Item)

Loads an item from your personal account.
Parameters:
Name Type Description
Item String
Source:

AccountLogin(username, password)

Logs in to your account in the session. Must be registered in your session.
Parameters:
Name Type Description
username String
password String
Source:

AccountLogout()

Logs out of the session account.
Source:

AccountProfileSearch(Username)

Searches the profile account from inside the session.
Parameters:
Name Type Description
Username String
Source:

AccountReadMail(mail_id, username)

Reads mail in your account. Hosts can use Username to read messages from the account.
Parameters:
Name Type Default Description
mail_id Number
username String null
Source:

AccountRegister(username, password, alias)

Registers an account on the session.
Parameters:
Name Type Description
username String
password String
alias String
Source:

AccountSaveData(Item, Data)

Stores an item to your personal account.
Parameters:
Name Type Description
Item String
Data String
Source:

AccountSendMail(To, Subject, TextMessage)

Sends mail to someone connected.
Parameters:
Name Type Description
To String
Subject String
TextMessage String
Source:

AccountUnassignRole(Username, RoleName)

Unassigns the account a role specified by the host.
Parameters:
Name Type Description
Username String
RoleName String
Source:

AddClientToRole(RoleName, SocketID)

Adds the client to the role.
Parameters:
Name Type Description
RoleName String
SocketID Number
Source:

AddIPToWhitelist(IPAddress)

Adds the ip address to the whitelist.
Parameters:
Name Type Description
IPAddress String
Source:

AddInstanceRule(Rule_String)

Adds the instance rule to the session.
Parameters:
Name Type Description
Rule_String String
Source:

AddSessionData(Item_, Data_, Password)

Adds/Updates the item from the session's storage.
Parameters:
Name Type Default Description
Item_ String
Data_ String
Password String null
Source:

AddSpammer(Username)

Adds someone to a spam list.
Parameters:
Name Type Description
Username String
Source:

AnnounceOnDiscord(Message, Type)

Announces the message to the instantiated discord under #session-loginfo.
Parameters:
Name Type Default Description
Message String
Type String maintenance
Source:

BanIP(IPAddress, SocketID, Duration, Reason)

Bans the ip address from the session.
Parameters:
Name Type Description
IPAddress String
SocketID Number
Duration EpochTimeStamp
Reason String
Source:

BlockMailUser(Username)

Blocks a user from contacting you.
Parameters:
Name Type Description
Username String
Source:

ChangeInstancePassword(NewPassword)

Changes the instance's password.
Parameters:
Name Type Description
NewPassword String
Source:

ChangeSessionIcon(ImageURL)

Changes the session's icon from a image url.
Parameters:
Name Type Description
ImageURL URL
Source:

Check_Newsletters()

Check's the newsletter displayed from instantiated.
Source:

CloudAccountDelete()

Deletes your cloud storage account (Warning: Once this packet is sent, your account will be permanently deleted from the database. It may be recoverable if contacted about missing accounts.)
Source:

CloudAdd(Key, Value)

Adds data to the cloud storage.
Parameters:
Name Type Description
Key String
Value String
Source:

CloudAppend(Key, Value)

Increments a value by either adding or inserting a string or number.
Parameters:
Name Type Description
Key String
Value String
Source:

CloudGetValue(Key)

Returns the data from cloud storage.
Parameters:
Name Type Description
Key String
Source:

CloudInfo()

Returns the cloud information, such as your support code, storage structure and your size limits.
Source:

CloudLogin(user, pass)

Logins to your cloud account. (Only have to use it once)
Parameters:
Name Type Description
user String
pass String
Source:

CloudRegister(user, pass)

Registers an account with the cloud services.
Parameters:
Name Type Description
user String
pass String
Source:

CloudRemove(Key)

Grabs the item from cloud storage.
Parameters:
Name Type Description
Key String
Source:

CloudReset()

Resets the cloud storage to zero. This action cannot be undone.
Source:

CloudUpdate(Key, Value)

Updates the data from the cloud storage.
Parameters:
Name Type Description
Key String
Value String
Source:

ComposeMail(To, Subj, Msg, invite)

Sends a message to someone with the invite code if specified.
Parameters:
Name Type Default Description
To String
Subj String
Msg String
invite String null
Source:

CreateInvite(max_use)

Creates an invite code for users to join with. (Does not bypass bans or passwords.)
Parameters:
Name Type Description
max_use Number
Source:

CreateMailFolder(NewFolder)

Creates a new folder in the mail account.
Parameters:
Name Type Description
NewFolder String
Source:

CreateRole(RoleName, Color)

Creates the role with a specified color if defined.
Parameters:
Name Type Default Description
RoleName String
Color Color #ff0000
Source:

CreateServer(Session_ID, AppTitle, MaxConnections, Whitelist, Password, DefaultValues, AnnounceOpenSession)

Parameters:
Name Type Default Description
Session_ID String
AppTitle String
MaxConnections Number
Whitelist Boolean
Password String
DefaultValues Boolean
AnnounceOpenSession Boolean false
Source:

CreateSession(AppTitle, MaxConnections, Whitelist, Password, RootPassword, DefaultValues, ForceHostTransfer, KillHostServer, AnnounceOpenSession)

Creates a new session to host.
Parameters:
Name Type Default Description
AppTitle String
MaxConnections Number
Whitelist Boolean
Password String
RootPassword String
DefaultValues Boolean
ForceHostTransfer Boolean
KillHostServer Boolean
AnnounceOpenSession Boolean false
Source:

DeleteInvite(code)

Deletes an invite code making it useless.
Parameters:
Name Type Description
code String
Source:

DeleteMail(FolderName, MailNumber)

Deletes the message to the folder.
Parameters:
Name Type Description
FolderName String
MailNumber Number
Source:

DeleteMailAccount()

Deletes the mail account. This action cannot be undone. You must also be logged in.
Source:

DeleteMailFolder(FolderName)

Deletes a folder from the mail account.
Parameters:
Name Type Description
FolderName String
Source:

DeleteRole(RoleName)

Delete's the role. Any client assigned to this role is automatically removed.
Parameters:
Name Type Description
RoleName String
Source:

DeleteSessionItem(Item_, Password)

Deletes the item from the session's storage.
Parameters:
Name Type Default Description
Item_ String
Password String null
Source:

Disconnect()

Disconnects from the session.
Source:

EditRoleColor(RoleName, Color)

Edit the role's color.
Parameters:
Name Type Description
RoleName String
Color Color
Source:

EditRolePermission(PermissionID, RoleName)

Edits the role's permission. If a permission is not defined from the permission's list it creates a definedpermission.
Parameters:
Name Type Description
PermissionID String
RoleName String
Source:

ExposeClientsIP()

Exposes the client's ip address if there connected to your session.
Source:

GetInstanceMOTD()

Grabs the instance's message of the day.
Source:

GetInstanceRules()

Grabs the instance rules and displays them as arrays.
Source:

GetMOTD()

Grabs Instantiated's message of the day. This is global.
Source:

GetRole()

Returns the role's id and outputs it in a string.
Source:
Returns:
Role's ID String

GetSessionData(Item_, Password)

Grabs the data from the session's storage.
Parameters:
Name Type Default Description
Item_ String
Password String null
Source:

GetSessionID()

Grabs the session id from the object and returns a string.
Source:
Returns:
Session ID

GetSessionIcon()

Grabs the session's icon.
Source:

GetSocketID()

Grabs the socket id from the object and returns a number.
Source:
Returns:
Socket ID

InspectSession(Inspection)

Inspects the session and outputs the inspection. Use "All" for grabbing everything.
Parameters:
Name Type Default Description
Inspection String All
Source:

JoinServer(InstanceID, Password, Invitation_Code)

Joins the instance session if it's available.
Parameters:
Name Type Description
InstanceID String
Password String
Invitation_Code String
Source:

Kick(SocketID, Reason)

Kicks the user from the session.
Parameters:
Name Type Description
SocketID Number
Reason String
Source:

LockInstance()

Locks the instance from accepting new connections.
Source:

LockRole(RoleName)

Lock's the role from being edited or removed. Only the instance host can manage this role.
Parameters:
Name Type Description
RoleName String
Source:

MailListFolders()

Lists folders inside the mail account.
Source:

MailListMailInFolder(FolderName)

Lists all the mail inside the folder.
Parameters:
Name Type Description
FolderName String
Source:

MailLogin(Username, Password)

Logs into your mail account.
Parameters:
Name Type Description
Username String
Password String
Source:

MailRegister(Username, Password)

Registers a mail account.
Parameters:
Name Type Description
Username String
Password String
Source:

MarkMailAsRead(FolderName, MailNumber)

Marks the message as read.
Parameters:
Name Type Description
FolderName String
MailNumber Number
Source:

MarkMailAsUnread(FolderName, MailNumber)

Marks the message as un-read.
Parameters:
Name Type Description
FolderName String
MailNumber Number
Source:

MoveMailToFolder(OldFolder, MailNumber, NewFolder)

Moves the message to a folder.
Parameters:
Name Type Description
OldFolder String
MailNumber Number
NewFolder String
Source:

Ping()

Pings the server that your alive. (times out at a minute.)
Source:

PrivateSend(Json, Socket_ID)

Privately sends data to a connected socket.
Parameters:
Name Type Description
Json JSON
Socket_ID Number
Source:

ReadMail(FolderName, MailNumber)

Reads the mail inside the folder.
Parameters:
Name Type Description
FolderName String
MailNumber Number
Source:

Receive(Json)

Host sends data to all connected clients.
Parameters:
Name Type Description
Json JSON
Source:

RemoveClientFromRole(RoleName, SocketID)

Removes the role from the client.
Parameters:
Name Type Description
RoleName String
SocketID Number
Source:

RemoveIPFromWhitelist(IPAddress)

Removes the ip address from the whitelist.
Parameters:
Name Type Description
IPAddress String
Source:

RemoveInstanceRule(RuleNumber)

Removes the instance rule from the session.
Parameters:
Name Type Description
RuleNumber Number
Source:

RemoveSpammer(Username)

Removes someone to a spam list.
Parameters:
Name Type Description
Username String
Source:

ReportUserToHost(Against, Reason)

Reports the user to the session host.
Parameters:
Name Type Description
Against Number
Reason String
Source:

ReportUserToStaff(SocketID, MESSAGE)

Globally reports the user to the staff members of Instantiated.
Parameters:
Name Type Description
SocketID Number
MESSAGE String
Source:

SavePremiumSession(RootPassword)

Saves the premium session's data.
Parameters:
Name Type Description
RootPassword String
Source:

SearchInstanceOnce(ApplicationTitle)

Searches the instance and finds the first one available.
Parameters:
Name Type Description
ApplicationTitle String
Source:

SearchInstances(ApplicationTitle)

Searches the instance for the specified application title.
Parameters:
Name Type Description
ApplicationTitle String
Source:

Send(Json)

Sends data to the host.
Parameters:
Name Type Description
Json JSON
Source:

SetInstanceMOTD(Message)

Sets the instance's message of the day.
Parameters:
Name Type Description
Message String
Source:

SetRole(RoleID)

Sets the role from the client.
Parameters:
Name Type Description
RoleID String
Source:

SetSessionID(InstanceID)

Sets the session id (which is required for any other calls.)
Parameters:
Name Type Description
InstanceID String
Source:

SetSocketID(SocketID)

Sets the socket id (optional but is required for GetSocketID())
Parameters:
Name Type Description
SocketID Number
Source:

SocketSend(Json, Socket_ID)

Sends data to a socket (does not need to join a session.)
Parameters:
Name Type Description
Json JSON
Socket_ID Number
Source:

TakeControl(Password)

Takes control of the instance and transfers instance ownership to the new client.
Parameters:
Name Type Description
Password String
Source:

ToggleWhitelist()

Toggles the whitelist from the session.
Source:

TransferOwnership(socket_id)

Transfers session ownership to someone else. (The host must initiate this.)
Parameters:
Name Type Description
socket_id Number
Source:

UnbanIP(IPAddress)

Unbans the ip address, allowing the session to join.
Parameters:
Name Type Description
IPAddress String
Source:

UnblockMailUser(Username)

Unblocks a user from contacting you.
Parameters:
Name Type Description
Username String
Source:

UpdateInstanceRule(RuleNumber, Rule_String)

Updates the instance rule from an index. First rule is indexed at 0.
Parameters:
Name Type Description
RuleNumber Number
Rule_String String
Source:

ViewRoles()

Views the roles from the session. Anyone can request this at anytime.
Source:

WarnClient(Reason, SocketID)

Host warns the client with a specified reason.
Parameters:
Name Type Description
Reason String
SocketID Number
Source:

onClose(func)

Defines an on close event for when the connection was closed.
Parameters:
Name Type Description
func function
Source:

onError(func)

Defines an on error event for when the connection times out.
Parameters:
Name Type Description
func function
Source:

onMessage(func)

Defines an on message event listening to a event.data
Parameters:
Name Type Description
func function
Source:

onOpen(func)

Defines an on open connection for the websocket.
Parameters:
Name Type Description
func function
Source: