Skip to content

Instantly share code, notes, and snippets.

@tswicegood
Forked from anonymous/gist:83595
Created March 23, 2009 15:46
Show Gist options
  • Save tswicegood/83609 to your computer and use it in GitHub Desktop.
Save tswicegood/83609 to your computer and use it in GitHub Desktop.
public function buildResource($league, $event_key, $test = false) {
App::import('Vendor', 'utility');
$utility = new Utility();
$this->league = $utility->getKey($league);
// Get the season key, which we can parse from the event_key
// i.e l.nba.com-2008-e-11099
$tmp = split('-', $event_key);
$this->season_key = $tmp[1];
if ($test == true) {
return APP . '/tests/fixtures/games-event-input.xml';
}
$params = array(
'c' => 'getevents',
'event-keys' => $event_key,
'publisher-keys' => 'sportsnetwork.com',
'content-returned' => 'metadata-only',
'rendering-engine' => 'mvc-view'
);
return "http://local.sportscaster/engine/index.php?" . http_build_query($params);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment