ESPN's hidden API endpoints
Latest News: http://site.api.espn.com/apis/site/v2/sports/football/college-football/news
Latest Scores: http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard
Latest News: http://site.api.espn.com/apis/site/v2/sports/football/college-football/news
Latest Scores: http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard
| <?php | |
| //set up pods::find parameters to limit to 5 items | |
| $param = array( | |
| 'limit' => 5, | |
| ); | |
| //create pods object | |
| $pods = pods('pod_name', $params ); | |
| //check that total values (given limit) returned is greater than zero | |
| if ( $pods->total() > 0 ) { |
| function memorySizeOf(obj) { | |
| var bytes = 0; | |
| function sizeOf(obj) { | |
| if(obj !== null && obj !== undefined) { | |
| switch(typeof obj) { | |
| case 'number': | |
| bytes += 8; | |
| break; | |
| case 'string': |
| <!-- Featuring three books on a site's homepage --> | |
| <!-- The Pods/WordPress way --> | |
| <ul id="featured-books"> | |
| <?php | |
| $book = new Pod('book'); | |
| $params = array( | |
| 'where'=>'t.show_on_homepage = 1', |
| <?php | |
| public function getEmbedCode($url) | |
| { | |
| if (strpos($url, 'youtube') !== FALSE) { | |
| $url_parts = parse_url($url); | |
| parse_str($url_parts['query'], $segments); | |
| return '//www.youtube.com/embed/' . $segments['v']; | |
| } else if (strpos($url, 'vimeo') !== FALSE) { |