original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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
docstring_tokens: Creates a new Crawljob with the given name .