API Reference

InstantWinner.getEntryForToday

Retrieves the logged in user's entry to a contest for today.
If the user has entered the contest the user's entry, prize, and skill testing question (if applicable) will be returned. If the user has not entered today false will be returned.


Syntax

mixed instantwinner.getEntryForToday ( int vhost )

Arguments

NameTypeRequiredDefault valueDescription
vhostintRequirednoneThe vhost ID the application is located in.

Instant Winner Response

The response for all instantwinner services will be an array containing an array for the entry, prize and answer.

The tables below represent the information that will be returned for each of the arrays returned in the response.

Entry Array

This is the content of the array for each user that will be returned on success of the request.

NameTypeDescription
idINTThe entry ID.
vhostINTThe vhost ID of the draw.
userIDINTThe user ID associated with the entry.
dateYYYY-MM-DD HH:MM:SSThe date and time of the entry.
prizeIDINTThe prize awarded to the user or false if none.
answerSTRINGThe user's answer to the question or false if none.

Prize Array | Description

This is the content of the array for each user that will be returned on success of the request.

NameTypeDescription
idINTThe prize ID for the entry.
vhostINTThe vhost ID that the prize associated with.
categorySTRINGThe prize category used to group prizes. This is specified in the db.
questionIDINTThe question ID associated with a prize or false if none.
entryIDINTThe entry ID that has been selected for a prize or false if none.
correctTextSTRINGSome text about the prize. This is only returned if a skill testing question has been answered correctly.

Question Array | Description

This is the content of the array for each user that will be returned on success of the request.

NameTypeDescription
idINTThe question ID that was asked.
vhostINTThe vhost ID of the question.
questionSTRINGThe question text that the user has / will need to answer.

Sample Response

Code examples

0 comments

Be the first to comment on getEntryForToday.

Add a Comment

  • captcha