public function all($role)
    {
        if (!is_string($role)) {
            throw new \InvalidArgumentException(sprintf('Expected $role of type string and got %s', gettype($role)));
        }

        if (!in_array(strtolower($role), array('member', 'contributor', 'admin'), true)) {
            throw new \InvalidArgumentException(sprintf('Unknown role %s', $role));
        }

        return $this->getClient()->setApiVersion('2.0')->get('teams', array('role' => $role));
    }
public function all($role)
    {
        if (!is_string($role)) {
            throw new \InvalidArgumentException(sprintf('Expected $role of type string and got %s', gettype($role)));
        }

        if (!in_array(strtolower($role), array('member', 'contributor', 'admin'), true)) {
            throw new \InvalidArgumentException(sprintf('Unknown role %s', $role));
        }

        return $this->getClient()->setApiVersion('2.0')->get('teams', array('role' => $role));
    }
public function all ( $ role ) { if ( ! is_string ( $ role ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Expected $role of type string and got %s' , gettype ( $ role ) ) ) ; } if ( ! in_array ( strtolower ( $ role ) , array ( 'member' , 'contributor' , 'admin' ) , true ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Unknown role %s' , $ role ) ) ; } return $ this -> getClient ( ) -> setApiVersion ( '2.0' ) -> get ( 'teams' , array ( 'role' => $ role ) ) ; }
Get a list of teams to which the caller has access.

@access public
@param  string           $role Will only return teams on which the user has the specified role.
@return MessageInterface

@throws \InvalidArgumentException
Get a list of teams to which the caller has access .