<?php $plugin_info = array('pi_name' => 'Github API', 'pi_version' => '0.8', 'pi_author' => 'Pascal Kriete', 'pi_author_url' => 'http://pascalkriete.com/', 'pi_description' => 'A wrapper to Github\'s API {@link http://develop.github.com/}', 'pi_usage' => Github::usage()); /** * Github Class * * @package ExpressionEngine * @category Plugin * @author Pascal Kriete * @link @todo * * Loosely built on the twitter timeline plugin by Derek Jones * Saved me some fsockopen / caching / localize work */ class Github { var $return_data; var $base_url = 'http://github.com/api/v2/xml/'; // other formats are YAML or JSON var $cache_name = 'github_cache'; var $cache_expired = FALSE; var $refresh = 30; // Period between cache refreshes, in minutes var $limit = 20; // @todo look up default github limit var $username = ''; var $prefix = ''; // github vars are very generic, so use this to avoid conflicts (also a parameter) // Used by _parse_xml to clean up the returned array var $ignore = array('commit', 'repository', 'tree'); var $nested = array('author' => array('name', 'email'), 'committer' => array('name', 'email'));