Created
March 23, 2009 15:30
-
-
Save anonymous/83595 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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