| Line 34... |
Line 34... |
| 34 |
$url = $apihost."user_actions/by/$userId";
|
34 |
$url = $apihost."user_actions/by/$userId";
|
| 35 |
// $params = array('client_id'=>$this->instagramconfig['client_id'],'client_secret'=>$this->instagramconfig['client_secret'],'grant_type'=>$this->instagramconfig['grant_type'],'redirect_uri'=>$this->instagramconfig['redirect_uri']);
|
35 |
// $params = array('client_id'=>$this->instagramconfig['client_id'],'client_secret'=>$this->instagramconfig['client_secret'],'grant_type'=>$this->instagramconfig['grant_type'],'redirect_uri'=>$this->instagramconfig['redirect_uri']);
|
| 36 |
return $this->make_request($url,null);
|
36 |
return $this->make_request($url,null);
|
| 37 |
}
|
37 |
}
|
| 38 |
|
38 |
|
| - |
|
39 |
public function getLiveScore($userId=null) {
|
| - |
|
40 |
$apihost = Configure::read('pythonapihost');
|
| - |
|
41 |
$url = $apihost."liveCricketScore/";
|
| - |
|
42 |
return $this->make_request($url,null);
|
| - |
|
43 |
}
|
| - |
|
44 |
|
| 39 |
public function make_request($url,$fields,$format='json'){
|
45 |
public function make_request($url,$fields,$format='json'){
|
| 40 |
$fields_string = '';
|
46 |
$fields_string = '';
|
| 41 |
if(!empty($fields)){
|
47 |
if(!empty($fields)){
|
| 42 |
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
|
48 |
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
|
| 43 |
rtrim($fields_string, '&');
|
49 |
rtrim($fields_string, '&');
|