Warning: session_start() expects parameter 1 to be array, string given in /home/fanvicto/public_html/wp-includes/class-wp-hook.php on line 286
Developers - Fan Victor

Developers

If you are a developer, you can use our data API's to get and set data.   Get the schedules, results, player info all by REST API.  You can also store your contests on our servers and have them automated as well.  Create your own plugin or game using our API's.

If you are a developer,  you still need a valid license.

If you have any questions please email support at support@fanvictor.com

 

Api Documentation

 getIsOrganizationExist

Description: check if an organization is exist or not.
Method: GET
Return: true or false
Command: http://fanvictor.com/admin/isOrganizationExist/api_token Parameters:

o orgID (interger - require): the input organization ID. Example:

$url = "http://fanvictor.com/admin/isOrganizationExist/api_token?orgID=1" $client = $this->getRestClient("GET", $url);

$client->send(false);

 getIsSportExist
Description: check if a sport is exist or not.
Method: GET
Return: true or false
Command: http://fanvictor.com/admin/isSportExist/api_token Parameters:
o type (sport - require): the input sport name.

Example:
$url = "http://fanvictor.com/admin/ isSportExist /api_token?type=MMA" $client = $this->getRestClient("GET", $url);
$client->send(false);

 getOrganization
Description: get list organization.
Method: GET
Return: json
Command: http://fanvictor.com/admin/organization/api_token Parameters:

o orgID (int): return list organization match organization ID.
o sport (string): return list organization match sport name.
o setting (string): if setting is given and set true, it will return list organization

that were activated. Example:

$url = "http://fanvictor.com/admin/ organization/api_token?orgID=1&sport=MMA&setting=true"

$client = $this->getRestClient("GET", $url);

$client->send(false);

 getSport
Description: get list sport.
Method: GET
Return: json
Command: http://fanvictor.com/admin/sport/api_token Parameters:

o setting (string): if setting is given and set true, it will return list sport that were activated.

Example:
$url = "http://fanvictor.com/admin/ sport /api_token?setting=true" $client = $this->getRestClient("GET", $url);
$client->send(false);

 postUpdateOrgsActive
Description: active or unactive an organization.
Method: POST
Return: true or false
Command: http://fanvictor.com/admin/updateOrgsActive/api_token Parameters:

o orgID (int - require): the input organization id. Example:

$data = array('organizationID' => $orgID, 'is_active' => $is_active); $url = $this->api_url."/updateOrgsActive/".$this->api_token; $client = $this->getRestClient("POST", $url);
$client->send($data)

 getPools
Description: get list pools.
Method: GET
Return: json
Command: http://fanvictor.com/admin/pools/api_token Parameters:

o poolID (int): the input pool ID, return a pool matched the id.
o orgID (int): the input organization ID, return list pool matched organization ID. o isNew (string): if isNew is given and set true, it will return pools that have

status is NEW.
o all (string):: if all is given and set true, it will return all pools include admin

server pools. Example:

$url = "http://fanvictor.com/admin/pools/api_token?poolID=1&orgID=2&isNew=true&all=true"

$client = $this->getRestClient("GET", $url);

$client->send(false);

 getTotalCurrentPools Description: get list pools. Method: GET
Return: json

Command: http://fanvictor.com/admin/ totalCurrentPools/api_token Parameters:

o orgID (int): the input organization ID, return list pool matched organization ID. o all (string): if all is given and set true, it will return all pools include admin

server pools. Example:

&all=true"

$url = "http://fanvictor.com/admin/totalCurrentPools/api_token? orgID=2

$client = $this->getRestClient("GET", $url);

$client->send(false);

 postPoolsByFilter
Description: get list pools (use for paging, filter, sorting). Method: POST
Return: json
Command: http://fanvictor.com/admin/poolsByFilter/api_token Parameters:

o aConds (string): the input condition string. o sSort (string): the input sorting string.
o iPage (int): page number.
o iLimit (int): number of record per page.

o statistic (string): if statistic is given and set true, it will return pools include leagues (use for statistic)

Example:

$data = array("aConds" => "sport = MMA", "sSort" => "poolID DESC", "iPage" => 1, "iLimit" => 10, "statistic" => "true");

$url = "http://fanvictor.com/admin/poolsByFilter/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 postAddPools
Description: add a new pool.
Method: POST
Return: pool ID
Command: http://fanvictor.com/admin/addPools/api_token Parameters:

o poolName (string - require): the input pool name.
o startDate (datetime - require): the input start date.
o cutDate (datetime - require): the input end date.
o organization (int - require): the input organization ID. o type (string - require): the input sport name.

Example:

$data = array("poolName" => "pool1", "startDate" => "2014-10-05 19:00:00", "cutDate" => "2014-10-05 23:00:00", "organization" => 2, "type" => "MMA");

$url = "http://fanvictor.com/admin/addPools/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 postAddLivePool
Description: set live pool.
Method: POST
Return: true or false
Command: http://fanvictor.com/admin/addLivePool/api_token Parameters:

o poolID: the input pool ID. Example:

$data = array("poolID" => 1);
$url = "http://fanvictor.com/admin/addLivePool/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 postDeleteLivePool Description: unset live pool. Method: POST
Return: true or false

Command: http://fanvictor.com/admin/deleteLivePool/api_token Parameters:

o poolID: the input pool ID. Example:

$data = array("poolID" => 1);
$url = "http://fanvictor.com/admin/deleteLivePool/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 postUpdatePools
Description: update pool values.
Method: POST
Return: true or false
Command: http://fanvictor.com/admin/updatePools/api_token Parameters:

o poolID (int - require): the input pool ID.
o poolName (string - require): the input pool name.
o startDate (datetime - require): the input start date.
o cutDate (datetime - require): the input end date.
o organization (int - require): the input organization ID. o type (string - require): the input sport name.

Example:

$data = array("poolID " => 1, "poolName" => "pool1", "startDate" => "2014- 10-05 19:00:00", "cutDate" => "2014-10-05 23:00:00", "organization" => 2, "type" => "MMA");

$url = "http://fanvictor.com/admin/deleteLivePool/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 postDeletePools

Description: delete pool.
Method: POST
Return: true or false
Command: http://fanvictor.com/admin/deletePools/api_token Parameters:

o poolID (int - require): the input pool ID. Example:

$data = array("poolID " => 1);
$url = "http://fanvictor.com/admin/deletePools/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 postUpdatePoolComplete
Description: complete a pool.
Method: POST
Return: true or false
Command: http://fanvictor.com/admin/updatePoolComplete/api_token Parameters:

o poolID (int - require): the input pool ID. Example:

$data = array("poolID " => 1);
$url = "http://fanvictor.com/admin/updatePoolComplete/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 getUserWonHistory
Description: get user award history.

Method: GET
Return: json
Command: http://fanvictor.com/admin/userWonHistory/api_token Example:

$url = "http://fanvictor.com/admin/userWonHistory/api_token"; $client = $this->getRestClient("GET", $url); $client->send(false);

 getFights
Description: get list fights.
Method: GET
Return: json
Command: http://fanvictor.com/admin/fights/api_token Parameters:

o poolID (int): the input pool ID, return list fights matched the pool id.
o fightID (int): the input fight ID, return a fight matched the id.
o all (string): if all is given and set true, it will return all fights include admin

server fights. Example:

$url = "http://fanvictor.com/admin/fights/api_token?poolID=2&fightID=1&all=true";

$client = $this->getRestClient("GET", $url);

$client->send(false);

 postAddFights
Description: add a new fight. Method: POST
Return: fight id

Command: http://fanvictor.com/admin/addFights/api_token Parameters:

o poolID (int - require): the input pool ID.
o name (int - require): the input fight name. o fighterID1 (int): the input fighter ID 1.
o fighterID2 (int): the input fighter ID 2.
o champFight (string): YES or NO.
o amateurFight (string): YES or NO.
o mainFight (string): YES or NO.
o prelimFight (string): YES or NO.
o rounds (int)

Example:

$data = array("poolID" => 1, "name" => "a vs b", "fighterID1" => 2, "fighterID2" => 3);

$url = "http://fanvictor.com/admin/addFights/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 postUpdateFights
Description: update fight values.
Method: POST
Return: true or false
Command: http://fanvictor.com/admin/updateFights/api_token Parameters:

o fightID (int - require):: the input fight ID. o poolID (int - require): the input pool ID.
o name (int - require): the input fight name. o fighterID1 (int): the input fighter ID 1.

o fighterID2 (int): the input fighter ID 2. o champFight (string): YES or NO.
o amateurFight (string): YES or NO.
o mainFight (string): YES or NO.

o prelimFight (string): YES or NO.

o rounds (int) Example:

$data = array("fightID" => 1, "poolID" => 1, "name" => "a vs b", "fighterID1" => 2, "fighterID2" => 3);

$url = "http://fanvictor.com/admin/updateFights/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 postDeleteFights
Description: delete pool.
Method: POST
Return: true or false
Command: http://fanvictor.com/admin/deleteFights/api_token Parameters:

o poolID (int): the input pool ID. o fightID (int): the input fight ID.

Example:
$data = array("fightID" => 1, "poolID" => 1);
$url = "http://fanvictor.com/admin/deleteFights/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 getIsFighterExist
Description: check if a fighter is exist or not.
Method: GET
Return: true or false
Command: http://fanvictor.com/admin/isFighterExist/api_token Parameters:

o fighterID (int - require): the input fighter id. Example:

$url = "http://fanvictor.com/admin/isFighterExist/api_token?fighterID=2"; $client = $this->getRestClient("GET", $url);
$client->send(false);

 getFighters
Description: get list fighters.
Method: GET
Return: json
Command: http://fanvictor.com/admin/pools/api_token Parameters:

o fighterID (int): the input fighter ID, return a fighter matched the id.
o orgsID (int): the input organization ID, return list fighters matched organization

ID.
o all (string): if all is given and set true, it will return all fighters include admin

server fighters. Example:

$url = "http://fanvictor.com/admin/pools/api_token?fighterID=2&orgsID=2&all=true";

$client = $this->getRestClient("GET", $url);

$client->send(false);

 postFightersByFilter
Description: get list fighters (use for paging, filter, sorting). Method: POST
Return: json
Command: http://fanvictor.com/admin/fightersByFilter/api_token Parameters:

o aConds (string): the input condition string. o sSort (string): the input sorting string.
o iPage (int): page number.
o iLimit (int): number of record per page.

Example:

$data = array("aConds" => "sport = MMA", "sSort" => "fighterID DESC", "iPage" => 1, "iLimit" => 10);

$url = "http://fanvictor.com/admin/fightersByFilter/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 getMethods
Description: get list methods.
Method: GET
Return: json
Command: http://fanvictor.com/admin/methods/api_token Parameters:

o methodID (int): the input method ID, return a method matched the id. Example:

$url = "http://fanvictor.com/admin/methods/api_token?methodID=2 "; $client = $this->getRestClient("GET", $url);
$client->send(false);

 getMinutes
Description: get list minutes.
Method: GET
Return: json
Command: http://fanvictor.com/admin/minutes/api_token

Parameters:
o minuteID (int): the input minute ID, return a minute matched the id.

Example:
$url = "http://fanvictor.com/admin/minutes/api_token?minuteID=2 "; $client = $this->getRestClient("GET", $url);
$client->send(false);

 postAddFighters
Description: add a new fighter.
Method: POST
Return: fighter id
Command: http://fanvictor.com/admin/addFighters/api_token Parameters:

o name (string - require): the input name. o nickName (string): the input nick name. o age (int): the input age.
o fightCamp (string): the input fightCamp. o strengths (int): the input strengths.

o homepageLink (string): the input homepageLink. o height (string): the input height.
o weight (string): the input weight.
o record (string): the input record.

Example:
$data = array("name" => "Fighter 1");
$url = "http://fanvictor.com/admin/addFighters/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 postUpdateFighters
Description: update fighter values.

Method: POST
Return: true or false
Command: http://fanvictor.com/admin/updateFighters/api_token Parameters:

o fighterID: the input fighter id.
o name (string - require): the input name.
o nickName (string): the input nick name.
o age (int): the input age.
o fightCamp (string): the input fightCamp.
o strengths (int): the input strengths.
o homepageLink (string): the input homepageLink. o height (string): the input height.
o weight (string): the input weight.
o record (string): the input record.

Example:
$data = array("fighterID" => 1, "name" => "Fighter 1");
$url = "http://fanvictor.com/admin/updateFighters/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 postDeleteFighters
Description: delete fighter.
Method: POST
Return: true or false
Command: http://fanvictor.com/admin/deleteFighters/api_token Parameters:

o fighterID (int - require): the input fighter id. Example:

$data = array("fighterID" => 1);

$url = "http://fanvictor.com/admin/deleteFighters/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 getIsTeamExist
Description: check if a team is exist or not.
Method: GET
Return: true or false
Command: http://fanvictor.com/admin/isTeamExist/api_token Parameters:

o teamID (int - require): the input team ID. Example:

$url = "http://fanvictor.com/admin/isTeamExist/api_token?teamID=2"; $client = $this->getRestClient("GET", $url);
$client->send(false);

 getTeams
Description: get list teams.
Method: GET
Return: json
Command: http://fanvictor.com/admin/teams/api_token Parameters:

o teamID (int): the input team ID, return a team matched the id.
o orgsID (int): the input organization ID, return list teams matched organization

ID.
o all (string): if all is given and set true, it will return all teams include admin

server teams. Example:

$url = "http://fanvictor.com/admin/teams/api_token?teamID=2& orgsID =2& all =true";

$client = $this->getRestClient("GET", $url);

$client->send(false);

 postTeamsByFilter
Description: get list teams (use for paging, filter, sorting). Method: POST
Return: json
Command: http://fanvictor.com/admin/teamsByFilter/api_token Parameters:

o aConds (string): the input condition string. o sSort (string): the input sorting string.
o iPage (int): page number.
o iLimit (int): number of record per page.

Example:

$data = array("aConds" => "organization_id = 1", "sSort" => "teamID DESC", "iPage" => 1, "iLimit" => 10);

$url = "http://fanvictor.com/admin/teamsByFilter/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 postAddTeams
Description: add a new team.
Method: POST
Return: team id
Command: http://fanvictor.com/admin/addTeams/api_token Parameters:

o name (string - require): the input name.

o nickName (string): the input nick name.
o organization_id (int): the input organization id.
o homepageLink (string): the input home page link. o cityname (string): the input city name.
o teamname (string): the input team name.
o record (string): the input record.

Example:
$data = array("organization_id" => 1, "name" => "team 1"); $url = "http://fanvictor.com/admin/addTeams/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 postUpdateTeams
Description: update team values.
Method: POST
Return: true or false
Command: http://fanvictor.com/admin/updateTeams/api_token Parameters:

o teamID: the input team id.
o name (string - require): the input name.
o nickName (string): the input nick name.
o organization_id (int): the input organization id.
o homepageLink (string): the input home page link. o cityname (string): the input city name.
o teamname (string): the input team name.
o record (string): the input record.

Example:
$data = array("teamID" => 1, "organization_id" => 1, "name" => "team 1"); $url = "http://fanvictor.com/admin/updateTeams/api_token";
$client = $this->getRestClient("POST", $url);

$client->send($data);

 postDeleteTeams
Description: delete team.
Method: POST
Return: true or false
Command: http://fanvictor.com/admin/deleteTeams/api_token Parameters:

o teamID (int - require): the input team id. Example:

$data = array("teamID" => 1);
$url = "http://fanvictor.com/admin/deleteTeams/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 getLeagues
Description: get list leagues.
Method: GET
Return: json
Command: http://fanvictor.com/admin/leagues/api_token Parameters:

o poolID (int): the input pool id, return list leagues matched pool id. Example:

$url = "http://fanvictor.com/admin/leagues/api_token?poolID=2"; $client = $this->getRestClient("GET", $url); $client->send(false);

 postUpdateLeague
Description: update league values.

Method: POST
Return: true or false
Command: http://fanvictor.com/admin/updateLeague/api_token Parameters:

o leagueID (int - require): the input league id. o fixtures (int - require): the input fixtures.

Example:
$data = array("leagueID" => 1, "fixtures" => "101,102,103"); $url = "http://fanvictor.com/admin/deleteTeams/api_token"; $client = $this->getRestClient("POST", $url);

$client->send($data);

 getUserpicks
Description: get list leagues.
Method: GET
Return: json
Command: http://fanvictor.com/admin/userpicks/api_token Parameters:

o leagueID: the input league id, return list userpicks that matched league id. Example:

$url = "http://fanvictor.com/admin/userpicks/api_token?leagueID=2"; $client = $this->getRestClient("GET", $url);
$client->send(false);

Translate »
s2Member®