Skip to content

Instantly share code, notes, and snippets.

Created March 23, 2009 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/83595 to your computer and use it in GitHub Desktop.
Save anonymous/83595 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