public function resource($name)
  {
      if (!isset($this->resources[$name])) {
          throw new Exceptions\ResourceException("Resource $name does not exist!");

          return;
      }

      return $this->resources[$name];
  }
public function resource($name)
  {
      if (!isset($this->resources[$name])) {
          throw new Exceptions\ResourceException("Resource $name does not exist!");

          return;
      }

      return $this->resources[$name];
  }
public function resource ( $ name ) { if ( ! isset ( $ this -> resources [ $ name ] ) ) { throw new Exceptions \ ResourceException ( "Resource $name does not exist!" ) ; return ; } return $ this -> resources [ $ name ] ; }
Returns an API resource.

@param  string $name Name of the resource

@return Raideer\TwitchApi\Resources\Resource
Returns an API resource .