Add/Update custom player

Add/Update custom player

Request URL

http://fanvictor.com/api/mobile/CustomPlayer/{api_key}/{user_id}

Request Method

POST

Request parameters

api_key
string
Subscription key which provides access to this API.
user_id
interger
User id of account from client site.
id (Optional)
interger
add player id for update and empty value for insert
team_id (Optional)
interger
The id of team (include this value for team sport)
position_id
interger
The id of player position
image (Optional)
string
player image url
name
string
player name
salary
interger
player salary
indicator_id (Optional)
interger
0: Normal player
1: Injured Reserve
2: Out
3: Doubtful
4: Questionable
5: Probable
6: Not Active
sport_id (Optional)
interger
The id of sport (include this value for non team sport)

Sample Code

$params = array(
     'id' => '{id}',
     'team_id' => '{team_id}',
     'position_id' => '{position_id}',
     'image' => '{image}',
     'name' => '{name}',
     'salary' => '{salary}',
     'indicator_id' => '{indicator_id}',
     'sport_id' => '{sport_id}',
)

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://fanvictor.com/api/mobile/CustomPlayer/{api_key}/{user_id}");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, urlencode(http_build_query($params)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec ($ch);
curl_close ($ch);