Print this Page

PRIVATE MESSAGE Functions

Below is a listing of all the functions.

 

AddPrivateFolder

AddPrivateFolder

This method adds a private folder for a specified user in which private messages are stored.

 

Return Type: n/a

 

Name

Type

Description

UserID

Integer

The user ID to which the folder will belong to.

FolderName

String

The name of the new private message folder.

 

Examples

Visual Basic.Net

'Method AddPrivateFolder

ftObj.AddPrivateFolder(UserID, "My New Folder")

 

C#

//Method AddPrivateFolder

ftObj.AddPrivateFolder(UserID, "My New Folder");

 

DeletePrivateMessageByDate

DeletePrivateMessageByDate

This function deletes private messages based on a date.

 

Return Type: n/a

 

Name

Type

Description

DelDate

DateTime

 

 

Examples

Visual Basic.Net

'Method DeletePrivateMessageByDate

ftObj.DeletePrivateMessageByDate(New DateTime(2004, 1, 1))

 

C#

//Method DeletePrivateMessageByDate

ftObj.DeletePrivateMessageByDate(new DateTime(2004, 1, 1));

 

DeletePrivateMessages

DeletePrivateMessages

This method deletes a private message.

 

Return Type: n/a

 

Name

Type

Description

MessageList

String

The List of IDs of the private message to delete.

UserID

Integer

The ID of the user that the private message belongs to.

 

GetNewPrivateMessageCount

GetNewPrivateMessageCount

 

Return Type: Integer

 

Name

Type

Description

UserID

Integer

The user ID for which to get ignored users for.

 

Examples

Visual Basic.Net

'Method GetNewPrivateMessageCount

Dim Count As Integer = ftObj.GetNewPrivateMessageCount(UserID)

MsgBox(Count)

 

C#

//Method GetNewPrivateMessageCount

int Count = ftObj.GetNewPrivateMessageCount(UserID);

Interaction.MsgBox(Count, 0, null);

 

GetPrivateBanning

GetPrivateBanning

This method gets the list of users that are banned for a specific user ID. This populates a users ignore list essentially.

 

Return Type:  PrivateBanning()

 

Name

Type

Description

UserID

Integer

The user ID for which to get ignored users for.

 

Examples

Visual Basic.Net

'Method GetPrivateBanning

Dim Bans() As PrivateBanning = ftObj.GetPrivateBanning(UserID)

If Not Bans Is Nothing Then    

Dim ban As PrivateBanning    

For Each ban In Bans        

MsgBox(ban.Nickname)        

ftObj.RemoveIgnoreUser(ban.ID)   

Next

End If

 

C#

//Method GetPrivateBanning FuseTalk.API.PrivateBanning[] Bans = ftObj.GetPrivateBanning(UserID); if (Bans != null) {

foreach (FuseTalk.API.PrivateBanning ban in Bans)

{

Interaction.MsgBox(ban.Nickname, 0, null);

ftObj.RemoveIgnoreUser(ban.ID);

}

}

 

GetPrivateHistoryByUser

GetPrivateHistoryByUser

This method gets the history for a specified user, in relation to another user.

 

Return Type:  PrivateMessage()

 

Name

Type

Description

UserID

Integer

The ID of the user to retrieve the history for.

PMUserID

Integer

The ID of the user that the owner conversed with.

 

Related Items

ReadPrivateMessage, GetPrivateMessageHistory, GetPrivateMessages

 

GetPrivateMessageCategories

GetPrivateMessageCategories

Get the private categories for a user.

 

Return Type:  Category()

 

Name

Type

Description

UserID

Integer

The ID of the user.

 

Related Items

CreateCategory, IsCategory, GetAllCategories, GetAllForumCategories, GetAvailableSubCategories, GetCategories

 

GetPrivateMessageCount

GetPrivateMessageCount

Get the total number of private messages for a user.

 

Return Type: Integer

 

Name

Type

Description

UserID

Integer

The ID of the user.

 

Examples

Visual Basic.Net

'Method GetPrivateMessageCount

Count = ftObj.GetPrivateMessageCount(UserID)

MsgBox(Count)

 

C#

//Method GetPrivateMessageCount

Count = ftObj.GetPrivateMessageCount(UserID);

Interaction.MsgBox(Count, 0, null);

 

GetPrivateMessageHistory

GetPrivateMessageHistory

This method gets the history for a user.

 

Return Type:  PrivateMessage()

 

Name

Type

Description

UserID

Integer

The ID of the user to retrieve the history for.

Letter

String

The alphabetical letter to filter results by (i.e A).

 

Examples

Visual Basic.Net

'Method GetPrivateMessageHistory

Dim MessageHistory() As PrivateMessage = ftObj.GetPrivateMessageHistory(UserID, "b")

If Not MessageHistory Is Nothing Then   

Dim Message As PrivateMessage    

For Each Message In MessageHistory        

MsgBox(Message.Message)   

Next

End If

 

C#

//Method GetPrivateMessageHistory

FuseTalk.API.PrivateMessage[] MessageHistory = ftObj.GetPrivateMessageHistory(UserID, "b"); if (MessageHistory != null)

{

foreach (FuseTalk.API.PrivateMessage Message in MessageHistory)

{

Interaction.MsgBox(Message.Message, 0, null);

}

}

 

Related Items

ReadPrivateMessage, GetPrivateHistoryByUser, GetPrivateMessages

 

GetPrivateMessages

GetPrivateMessages

This method gets all private messages for a user by user ID.

 

Return Type:  PrivateMessage()

 

Name

Type

Description

UserID

Integer

The ID of the user to retrieve private messages for.

FolderUsage

String

The name of the private message folder, defaults are received, sent.

MessageStatus

String

The status of the private message, valid params are unread or all.

 

Examples

Visual Basic.Net

'Method GetPrivateMessages

Dim Messages() As PrivateMessage = ftObj.GetPrivateMessages(UserID, "received", "all")

If Not Messages Is Nothing Then   

Dim Message As PrivateMessage    

For Each Message In Messages        

MsgBox(Message.Message)   

Next

End If

 

C#

//Method GetPrivateMessages

FuseTalk.API.PrivateMessage[] Messages = ftObj.GetPrivateMessages(UserID, "received", "all"); if (( Messages != null))

{

foreach (FuseTalk.API.PrivateMessage Message in Messages)

{

Interaction.MsgBox(Message.Message, 0, null);

}

}

 

Related Items

ReadPrivateMessage, GetPrivateMessageHistory, GetPrivateHistoryByUser

 

InsertIgnoreUser

InsertIgnoreUser

This method inserts an ignored user.

 

Return Type: Integer

 

Name

Type

Description

UserName

String

The name of the buddy to ignore.

ForumID

Integer

The forum ID the user belongs to.

UserID

Integer

 

 

Examples

Visual Basic.Net

'Method InsertIgnoreUser

Result = ftObj.InsertIgnoreUser("MyFriend", ForumID, UserID)

If Result  0 Then MsgBox(Result)

 

C#

//Method InsertIgnoreUser

Result = ftObj.InsertIgnoreUser("MyFriend", ForumID, UserID);

if (Result != 0)

{

Interaction.MsgBox(Result, 0, null);

}

 

MoveMessageToFolder

MoveMessageToFolder

This method moves private messages to a new folder.

 

Return Type: n/a

 

Name

Type

Description

MessageList

String

A comma separated list of the private message IDs to move.

UserID

Integer

The ID of the user that the folder belongs to.

FolderName

String

The name of the folder to move the private messages to.

 

ReadPrivateMessage

ReadPrivateMessage

This method gets a private message by ID.

 

Return Type:  PrivateMessage

 

Name

Type

Description

MessageID

Integer

The ID of the message to read.

ForumID

Integer

The forum ID the user belongs to.

UserID

Integer

The ID of the user who owns the private message.

 

Examples

Visual Basic.Net

'Method ReadPrivateMessage

Dim Msg As PrivateMessage = ftObj.ReadPrivateMessage(1, ForumID, UserID)

If Msg.ID  0 Then MsgBox(Msg.Message)

 

C#

//Method ReadPrivateMessage

FuseTalk.API.PrivateMessage Msg = ftObj.ReadPrivateMessage(1, ForumID, UserID);

if (Msg.ID != 0)

{

Interaction.MsgBox(Msg.Message,0,null);

}

 

Related Items

GetPrivateMessageHistory, GetPrivateHistoryByUser, GetPrivateMessages

 

RemoveIgnoreUser

RemoveIgnoreUser

This method removes an ignored user.

 

Return Type: n/a

 

Name

Type

Description

BanID

Integer

The ID of the ignored user to remove.

 

Examples

Visual Basic.Net

'Method GetPrivateBanning

Dim Bans() As PrivateBanning = ftObj.GetPrivateBanning(UserID)

If Not Bans Is Nothing Then    

Dim ban As PrivateBanning    

For Each ban In Bans        

MsgBox(ban.Nickname)        

ftObj.RemoveIgnoreUser(ban.ID)   

Next

End If

 

C#

//Method GetPrivateBanning

FuseTalk.API.PrivateBanning[] Bans = ftObj.GetPrivateBanning(UserID);

if (Bans != null)

{

foreach (FuseTalk.API.PrivateBanning ban in Bans)

{

Interaction.MsgBox(ban.Nickname, 0, null); ftObj.RemoveIgnoreUser(ban.ID);

}

}

 

RemovePrivateFolder

RemovePrivateFolder

This method removes a private folder for a specified user in which private messages are stored.

 

Return Type: n/a

 

Name

Type

Description

FolderID

String

The folder name to remove.

UserID

Integer

The ID of the user that the folder belongs to.

 

Examples

Visual Basic.Net

'Method RemovePrivateFolder

ftObj.RemovePrivateFolder(1, UserID)

 

C#

//Method RemovePrivateFolder

ftObj.RemovePrivateFolder("1", UserID);

 

SendPrivateMessage

SendPrivateMessage

This method sends a private message.

 

Return Type: Integer

 

Name

Type

Description

UserToSendTo

Integer

The ID of the user to send the private message to.

Message

String

The contents of the private message.

ForumID

Integer

The forum ID the user belongs to.

UserID

Integer

The username for the user.

SaveFlag

String

Whether you wish to save the message once it has been sent or not.

 

Examples

Visual Basic.Net

Dim Result As Integer = ftObj.SendPrivateMessage(UserID, "Hello how are you?", ForumID, UserID, "No")

If Result <> 0 Then MsgBox(Result)

 

C#

int Result = ftObj.SendPrivateMessage(UserID, "Hello how are you?", ForumID, UserID, "No");

if (Result != 0)

{

Interaction.MsgBox(Result, 0, null);

}

 

UpdatePrivateMessageStatus

UpdatePrivateMessageStatus

Updates the status of a private message.

 

Return Type: n/a

 

Name

Type

Description

MessageID

Integer

The ID of the private message you want to change the status of.

OwnerID

Integer

The ID of the user who owns the private message.

Status

String

The new status.

 

Examples

Visual Basic.Net

'Method UpdatePrivateMessageStatus

ftObj.UpdatePrivateMessageStatus(1, UserID, "read")

 

C#

//Method UpdatePrivateMessageStatus

ftObj.UpdatePrivateMessageStatus(1, UserID, "read");