public function getDownloadUrl($type = "json")
    {
        switch ($type) {
            case "json":
                return $this->data['downloadJson'];
            case "debug":
                return $this->data['downloadUrls'];
            case "csv":
                return rtrim($this->data['downloadJson'], '.json') . '.csv';
            default:
                break;
        }

        throw new \InvalidArgumentException(
            'Only json, debug, or csv download link available. You asked for: '
            . $type);
    }
public function getDownloadUrl($type = "json")
    {
        switch ($type) {
            case "json":
                return $this->data['downloadJson'];
            case "debug":
                return $this->data['downloadUrls'];
            case "csv":
                return rtrim($this->data['downloadJson'], '.json') . '.csv';
            default:
                break;
        }

        throw new \InvalidArgumentException(
            'Only json, debug, or csv download link available. You asked for: '
            . $type);
    }
public function getDownloadUrl ( $ type = "json" ) { switch ( $ type ) { case "json" : return $ this -> data [ 'downloadJson' ] ; case "debug" : return $ this -> data [ 'downloadUrls' ] ; case "csv" : return rtrim ( $ this -> data [ 'downloadJson' ] , '.json' ) . '.csv' ; default : break ; } throw new \ InvalidArgumentException ( 'Only json, debug, or csv download link available. You asked for: ' . $ type ) ; }
Returns the link to the dataset the job produced.

Accepted arguments are: "json", "csv" and "debug".
It is important to be aware of the difference between the types.
See "Retrieving Bulk Data" in link.

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

@param string $type
@return string
@throws DiffbotException
Returns the link to the dataset the job produced .