-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexample.php
111 lines (94 loc) · 5.44 KB
/
example.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
require_once 'vendor/autoload.php';
$client = new GlobalSportsMedia\Client('http://webpull.globalsportsmedia.com', 'demo', 'demo');
try {
$xml = $client->api('am_football')->get_groups(19);
$xml = $client->api('am_football')->get_head2head(25, 26);
$xml = $client->api('baseball')->get_rounds(79);
$xml = $client->api('baseball')->get_trophies(5, 'competition');
$xml = $client->api('baseball')->get_venues(1, 'area');
$xml = $client->api('baseball')->get_weather(22688, 'match');
$xml = $client->api('basketball')->get_injuries(191, 'team');
$xml = $client->api('basketball')->get_player_statistics(408, 'season', ['team_id' => 178]);
$xml = $client->api('basketball')->get_rankings('ap_top_25');
$xml = $client->api('cricket')->get_seasons(['authorized' => 'yes', 'active' => 'yes']);
$xml = $client->api('cricket')->get_squads(113, 'season', ['detailed' => 'yes']);
$xml = $client->api('golf')->get_holebyhole(1294, 'round');
$xml = $client->api('golf')->get_leaderboard(333, 'season');
$xml = $client->api('golf')->get_people(138, 'person', ['detailed' => 'yes']);
$xml = $client->api('handball')->get_tables(114, 'season', ['tabletype' => 'form-home']);
$xml = $client->api('hockey')->get_match_extra(102880);
$xml = $client->api('motorsports')->get_circuit(1, 'championship', ['detailed' => 'yes']);
$xml = $client->api('motorsports')->get_sessions(3013, 'session', ['detailed' => 'yes']);
$xml = $client->api('motorsports')->get_teammembers(3007, 'session', ['detailed' => 'yes']);
$xml = $client->api('tennis')->get_doubles(31, 'double', ['detailed' => 'yes']);
$xml = $client->api('tennis')->get_players(31, 'double', ['gender' => 'male']);
$xml = $client->api('tennis')->get_season_competitor(1741);
$xml = $client->api('tennis')->get_tours(['type' => 'tour']);
$xml = $client->api('soccer')->get_betting_statistics(8055, 'season', 'result');
$xml = $client->api('soccer')->get_career(961, 'team');
$xml = $client->api('soccer')->get_competitions();
$xml = $client->api('soccer')->get_deleted(['type' => 'person']);
$xml = $client->api('soccer')->get_hashtags(964, 'team');
$xml = $client->api('soccer')->get_match_commentary(1286864, ['source' => 'auto']);
$xml = $client->api('soccer')->get_match_editorials(1286861, ['text' => 'both']);
$xml = $client->api('soccer')->get_match_formations(1286869);
$xml = $client->api('soccer')->get_matches(8318, 'season');
$xml = $client->api('soccer')->cacheOff()->get_matches_live(['now_playing' => 'no', 'minutes' => 'yes', 'type' => 'match', 'id' => 1445860, 'date' => '2013-06-11']);
$xml = $client->api('soccer')->cacheOff()->get_matches_live_updates(['last_updated' => '2012-03-23 13:25:00']);
$xml = $client->api('soccer')->get_players_abroad(80, 'area', '2012-11-15');
$xml = $client->api('soccer')->get_referees('round', 13557);
$xml = $client->api('soccer')->get_runningball_matches();
$xml = $client->api('soccer')->get_squads(663, 'team');
$xml = $client->api('soccer')->get_squads_changes('2013-09-10');
$xml = $client->api('soccer')->get_statistics(1286862);
$xml = $client->api('soccer')->get_statistics_v2(1468351 );
$xml = $client->api('soccer')->get_suspensions(1483412);
$xml = $client->api('soccer')->get_suspensions_warning(1063217, 'match');
$xml = $client->api('soccer')->get_tables(8055, 'season');
$xml = $client->api('soccer')->get_tables_cumulative(7299, 'season', ['lang' => 'en']);
$xml = $client->api('soccer')->cacheOff()->get_tables_live(4943, 'season');
$xml = $client->api('soccer')->get_team_statistics(6951, ['season_id' => 8055, 'form' => 'no']);
$xml = $client->api('soccer')->get_teams(661, 'team', ['detailed' => 'yes']);
$xml = $client->api('soccer')->get_transfers(8, 'competition', ['proceeded' => 'yes']);
print_r($xml);die;
$xml = $client->api('soccer')->get_competitions();
$ret = [];
foreach ($xml->competition as $competition) {
$ret[(int) $competition['competition_id']] = [
'competition_id' => (int) $competition['competition_id'],
'name' => (string) $competition['name'],
'soccertype' => (string) $competition['soccertype'],
'teamtype' => (string) $competition['teamtype'],
'display_order' => (int) $competition['display_order'],
'format' => (string) $competition['format'],
'area_id' => (int) $competition['area_id'],
'area_name' => (string) $competition['area_name'],
'last_updated' => (string) $competition['last_updated'],
'countrycode' => (string) $competition['countrycode'],
];
}
print_r($ret);die;
$xml = $client->api('soccer')->get_areas(['area_id' => 7]);
$ret = [];
foreach ($xml->area->area as $area) {
$ret[(int) $area['area_id']] = [
'area_id' => (int) $area['area_id'],
'countrycode' => (string) $area['countrycode'],
'name' => (string) $area['name'],
];
}
print_r($ret);die;
$xml = $client->api('am_football')->get_areas(['area_id' => 7]);
$ret = [];
foreach ($xml->area->area as $area) {
$ret[(int) $area['area_id']] = [
'area_id' => (int) $area['area_id'],
'countrycode' => (string) $area['countrycode'],
'name' => (string) $area['name'],
];
}
print_r($ret);die;
} catch (\Exception $e) {
die('ERROR : '.$e->getMessage());
}