/** * Raw Git Data * @param string $user - username * @param string $repo - repository * @param string $sha - sha1 hash for object * @return string */ public static function raw($user, $repo, $sha) { $url = Loader::prep_url(self::RAW, compact('user', 'repo', 'sha')); return Loader::send($url); }
/** * Listing Commits for a File * @param string $repository - repository name * @param string $user_id - github user_id * @param string $branch - branch you want to load * @param string $path - path to file in repo */ public static function file($repository, $user_id, $branch, $path) { $url = Loader::prep_url(self::SHOW_FILE, compact('repository', 'user_id', 'branch', 'path')); return Loader::get_obj($url); }
/** * Repository branches * @param string $user - username * @param string $repo - repository name */ public static function branches($user, $repo) { $url = Loader::prep_url(self::BRANCHES, compact('user', 'repo')); return Loader::get_obj($url); }
/** * Gets the watched repos for user * @param string $user - username */ public static function watching($user) { $url = Loader::prep_url(self::WATCHED, compact('user')); return Loader::get_obj($url); }
/** * View an Issue * @param string $user - username * @param string $repo - repository name * @param string $number - issue number */ public static function view($user, $repo, $number) { $url = Loader::prep_url(self::VIEW, compact('user', 'repo', 'number')); return Loader::get_obj($url); }