Print this Page

POLL Functions

Below is a listing of all the functions.

 

CheckVoteStatus

CheckVoteStatus

This function determines if a user has already voted on a poll.

 

Return Type: String

 

Name

Type

Description

PollID

Integer

The ID of the poll you want to check.

UserID

Integer

The ID of the user you want to check.

ParentID

Integer

The ID of the parent of the forum. If you are checking for a forum poll the value should be the forumid, and if you are checking a thread poll the value should be the thread ID.

 

Examples

Visual Basic.Net

'Method CheckVoteStatus

MsgBox(ftObj.CheckVoteStatus(MyPoll.ID, UserID, 1))

 

C#

//Method CheckVoteStatus

Interaction.MsgBox(ftObj.CheckVoteStatus(MyPoll.ID, UserID, 1), 0, null);

 

CreatePoll

CreatePoll

This function creates a poll in FuseTalk.

 

Return Type: Integer

 

Name

Type

Description

Question

String

The description of the polls.

ParentID

Integer

The ID of the thread that the thread is associated with. The value is 0 if the PollType is forum.

PollType

String

The type of poll you are creating.

Thread - create a poll associated to a thread.
Forum - create a poll associated to a forum.

UserID

Integer

The ID of the user who is creating the poll.

ForumID

Integer

The ID of the forum.

 

Examples

Visual Basic.Net

'Method CreatePoll

PollID = ftObj.CreatePoll("What is your favorite color", 0, "forum", UserID, ForumID)

 

C#

//Method CreatePoll

PollID = ftObj.CreatePoll("What is your favorite color", 0, "forum", UserID, ForumID);

 

CreatePollAnswer

CreatePollAnswer

This function adds an answer to a poll.

 

Return Type: Integer

 

Name

Type

Description

Answer

String

The text of the answer you are inserting.

PollID

Integer

The ID of the poll.

 

Examples

Visual Basic.Net

'Method CreatePollAnswer

Dim PollAnswerID As Integer = ftObj.CreatePollAnswer("bleu", PollID) ftObj.CreatePollAnswer("green", PollID)

ftObj.CreatePollAnswer("red", PollID)

ftObj.CreatePollAnswer("yellow", PollID)

ftObj.CreatePollAnswer("other", PollID)

 

C#

//Method CreatePollAnswer

int PollAnswerID = ftObj.CreatePollAnswer("bleu", PollID);

ftObj.CreatePollAnswer("green", PollID);

ftObj.CreatePollAnswer("red", PollID);

ftObj.CreatePollAnswer("yellow", PollID);

ftObj.CreatePollAnswer("other", PollID);

 

DeletePoll

DeletePoll

This function deletes a poll.

 

Return Type: n/a

 

Name

Type

Description

PollID

Integer

The ID of the poll you want to delete.

 

Examples

Visual Basic.Net

'Method DeletePoll

ftObj.DeletePoll(MyPoll.ID)

 

C#

//Method DeletePoll

ftObj.DeletePoll(MyPoll.ID);

 

DeletePollAnswer

DeletePollAnswer

This function deletes an answer associated to a poll.

 

Return Type: n/a

 

Name

Type

Description

AnswerID

Integer

The ID of the answer you are deleting.

 

Examples

Visual Basic.Net

'Method DeletePollAnswer

ftObj.DeletePollAnswer(Answer.ID)

 

C#

//Method DeletePollAnswer

ftObj.DeletePollAnswer(MyPoll.ID);

 

GetPoll

GetPoll

This function gets a poll from the database.

 

Return Type:  Poll

 

Name

Type

Description

PollID

Integer

The ID of the poll you want to retrieve.

 

Examples

Visual Basic.Net

'Method GetPoll

Dim MyPoll As Poll = ftObj.GetPoll(PollID)

MsgBox(MyPoll.Description)

 

C#

//Method GetPoll

FuseTalk.API.Poll MyPoll = ftObj.GetPoll(PollID);

Interaction.MsgBox(MyPoll.Description, 0, null);

 

Related Items

GetPollAnswer, GetPollAnswers

 

GetPollAnswer

GetPollAnswer

This function gets an answer to a poll.

 

Return Type:  PollAnswer

 

Name

Type

Description

AnswerID

Integer

The ID of the answer you want to retrieve.

 

Examples

Visual Basic.Net

'Method GetPollAnswer

Dim Answer As PollAnswer = ftObj.GetPollAnswer(PollAnswerID)

 

C#

//Method GetPollAnswer

FuseTalk.API.PollAnswer Answer = ftObj.GetPollAnswer(PollAnswerID);

 

Related Items

GetPollAnswers

 

GetPollAnswers

GetPollAnswers

This function gets the answers to a poll.

 

Return Type:  PollAnswer()

 

Name

Type

Description

PollID

Integer

The ID of the poll you want to retrieve.

 

Examples

Visual Basic.Net

'Method GetPollAnswers

Dim Answers() As PollAnswer = ftObj.GetPollAnswers(PollID)

Dim ans As PollAnswer

For Each ans In Answers    

MsgBox(ans.Answer.ToString)

Next

 

C#

//Method GetPollAnswers

FuseTalk.API.PollAnswer[] Answers = ftObj.GetPollAnswers(PollID);

foreach (FuseTalk.API.PollAnswer ans in Answers)

{

Interaction.MsgBox(ans.Answer.Tostring(), 0, null);

}

 

Related Items

GetPollAnswer

 

UpdatePollAnswer

UpdatePollAnswer

This function adds an answer to a poll.

 

Return Type: n/a

 

Name

Type

Description

Answer

String

The text of the answer you are updating.

AnswerID

Integer

The ID of the answer you are updating.

 

Examples

Visual Basic.Net

'Method UpdatePollAnswer

ftObj.UpdatePollAnswer("blue", Answer.ID)

 

C#

//Method UpdatePollAnswer

ftObj.UpdatePollAnswer("blue", Answer.ID);

 

UpdatePollQuestion

UpdatePollQuestion

This function updates a poll question.

 

Return Type: n/a

 

Name

Type

Description

Question

String

The description of the polls.

PollID

Integer

The ID of the poll you want to update.

 

Examples

Visual Basic.Net

  

'Method UpdatePollQuestionftObj.UpdatePollQuestion("What is your favorite color", PollID)

 

C#

  

//Method UpdatePollQuestionftObj.UpdatePollQuestion("What is your favorite color", PollID);

 

VotePoll

VotePoll

This function allows you to vote on a poll.

 

Return Type: n/a

 

Name

Type

Description

PollID

Integer

The ID of the poll you want to vote on.

UserID

Integer

The ID of the user that is voting.

AnswerID

Integer

The ID of the answer the user has voted on.

 

Examples

Visual Basic.Net

'Method VotePoll

ftObj.VotePoll(MyPoll.ID, UserID, PollAnswerID)

 

C#

//Method VotePoll

ftObj.VotePoll(MyPoll.ID, UserID, PollAnswerID);