lib/Github/Api/Repository/Contents.php
public function archive($username, $repository, $format, $reference = null)
    {
        if (!in_array($format, ['tarball', 'zipball'])) {
            $format = 'tarball';
        }

        return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/'.rawurlencode($format).
            ((null !== $reference) ? ('/'.rawurlencode($reference)) : ''));
    }
public function archive($username, $repository, $format, $reference = null)
    {
        if (!in_array($format, ['tarball', 'zipball'])) {
            $format = 'tarball';
        }

        return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/'.rawurlencode($format).
            ((null !== $reference) ? ('/'.rawurlencode($reference)) : ''));
    }
public function archive ( $ username , $ repository , $ format , $ reference = null ) { if ( ! in_array ( $ format , [ 'tarball' , 'zipball' ] ) ) { $ format = 'tarball' ; } return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/' . rawurlencode ( $ format ) . ( ( null !== $ reference ) ? ( '/' . rawurlencode ( $ reference ) ) : '' ) ) ; }
Get content of archives in a repository.

@link http://developer.github.com/v3/repos/contents/

@param string      $username   the user who owns the repository
@param string      $repository the name of the repository
@param string      $format     format of archive: tarball or zipball
@param null|string $reference  reference to a branch or commit

@return string repository archive binary data
Get content of archives in a repository .