public function all($account, $repo, array $params = array())
    {
        $endpoint = sprintf('repositories/%s/%s/commits', $account, $repo);

        if (!empty($params['branch'])) {
            $endpoint .= '/'.$params['branch']; // can also be a tag
            unset($params['branch']);
        }

        return $this->getClient()->setApiVersion('2.0')->get(
            $endpoint,
            $params
        );
    }
public function all($account, $repo, array $params = array())
    {
        $endpoint = sprintf('repositories/%s/%s/commits', $account, $repo);

        if (!empty($params['branch'])) {
            $endpoint .= '/'.$params['branch']; // can also be a tag
            unset($params['branch']);
        }

        return $this->getClient()->setApiVersion('2.0')->get(
            $endpoint,
            $params
        );
    }
public function all ( $ account , $ repo , array $ params = array ( ) ) { $ endpoint = sprintf ( 'repositories/%s/%s/commits' , $ account , $ repo ) ; if ( ! empty ( $ params [ 'branch' ] ) ) { $ endpoint .= '/' . $ params [ 'branch' ] ; // can also be a tag unset ( $ params [ 'branch' ] ) ; } return $ this -> getClient ( ) -> setApiVersion ( '2.0' ) -> get ( $ endpoint , $ params ) ; }
Get a list of commits

@access public
@param  string           $account The team or individual account owning the repository.
@param  string           $repo    The repository identifier.
@param  array            $params  Additional parameters
@return MessageInterface
Get a list of commits