public function crawl($name = null, Api $api = null)
    {
        $api = new Crawl($name, $api);
        if (!$this->getHttpClient()) {
            $this->setHttpClient();
        }
        if (!$this->getEntityFactory()) {
            $this->setEntityFactory();
        }
        return $api->registerDiffbot($this);
    }
public function crawl($name = null, Api $api = null)
    {
        $api = new Crawl($name, $api);
        if (!$this->getHttpClient()) {
            $this->setHttpClient();
        }
        if (!$this->getEntityFactory()) {
            $this->setEntityFactory();
        }
        return $api->registerDiffbot($this);
    }
public function crawl ( $ name = null , Api $ api = null ) { $ api = new Crawl ( $ name , $ api ) ; if ( ! $ this -> getHttpClient ( ) ) { $ this -> setHttpClient ( ) ; } if ( ! $ this -> getEntityFactory ( ) ) { $ this -> setEntityFactory ( ) ; } return $ api -> registerDiffbot ( $ this ) ; }
Creates a new Crawljob with the given name.

@see https://www.diffbot.com/dev/docs/crawl/

@param string $name Name of the crawljob. Needs to be unique.
@param Api $api Optional instance of an API - if omitted, must be set
later manually
@return Crawl
Creates a new Crawljob with the given name .