public function postSeries(array $data, $onlyFutureEpisodes = true)
    {
        $uri = 'series';
        $uriData = [];

        // Required
        $uriData['tvdbId'] = $data['tvdbId'];
        $uriData['title'] = $data['title'];
        $uriData['qualityProfileId'] = $data['qualityProfileId'];

        if ( array_key_exists('titleSlug', $data) ) { $uriData['titleSlug'] = $data['titleSlug']; }
        if ( array_key_exists('seasons', $data) ) { $uriData['seasons'] = $data['seasons']; }
        if ( array_key_exists('path', $data) ) { $uriData['path'] = $data['path']; }
        if ( array_key_exists('rootFolderPath', $data) ) { $uriData['rootFolderPath'] = $data['rootFolderPath']; }
        if ( array_key_exists('tvRageId', $data) ) { $uriData['tvRageId'] = $data['tvRageId']; }
        $uriData['seasonFolder'] = ( array_key_exists('seasonFolder', $data) ) ? $data['seasonFolder'] : true;
        if ( array_key_exists('monitored', $data) ) { $uriData['monitored'] = $data['monitored']; }
        if ( $onlyFutureEpisodes ) {
            $uriData['addOptions'] = [
                'ignoreEpisodesWithFiles' => true,
                'ignoreEpisodesWithoutFiles' => true
            ];
        }

        $response = [
            'uri' => $uri,
            'type' => 'post',
            'data' => $uriData
        ];

        return $this->processRequest($response);
    }
public function postSeries(array $data, $onlyFutureEpisodes = true)
    {
        $uri = 'series';
        $uriData = [];

        // Required
        $uriData['tvdbId'] = $data['tvdbId'];
        $uriData['title'] = $data['title'];
        $uriData['qualityProfileId'] = $data['qualityProfileId'];

        if ( array_key_exists('titleSlug', $data) ) { $uriData['titleSlug'] = $data['titleSlug']; }
        if ( array_key_exists('seasons', $data) ) { $uriData['seasons'] = $data['seasons']; }
        if ( array_key_exists('path', $data) ) { $uriData['path'] = $data['path']; }
        if ( array_key_exists('rootFolderPath', $data) ) { $uriData['rootFolderPath'] = $data['rootFolderPath']; }
        if ( array_key_exists('tvRageId', $data) ) { $uriData['tvRageId'] = $data['tvRageId']; }
        $uriData['seasonFolder'] = ( array_key_exists('seasonFolder', $data) ) ? $data['seasonFolder'] : true;
        if ( array_key_exists('monitored', $data) ) { $uriData['monitored'] = $data['monitored']; }
        if ( $onlyFutureEpisodes ) {
            $uriData['addOptions'] = [
                'ignoreEpisodesWithFiles' => true,
                'ignoreEpisodesWithoutFiles' => true
            ];
        }

        $response = [
            'uri' => $uri,
            'type' => 'post',
            'data' => $uriData
        ];

        return $this->processRequest($response);
    }
public function postSeries ( array $ data , $ onlyFutureEpisodes = true ) { $ uri = 'series' ; $ uriData = [ ] ; // Required
 $ uriData [ 'tvdbId' ] = $ data [ 'tvdbId' ] ; $ uriData [ 'title' ] = $ data [ 'title' ] ; $ uriData [ 'qualityProfileId' ] = $ data [ 'qualityProfileId' ] ; if ( array_key_exists ( 'titleSlug' , $ data ) ) { $ uriData [ 'titleSlug' ] = $ data [ 'titleSlug' ] ; } if ( array_key_exists ( 'seasons' , $ data ) ) { $ uriData [ 'seasons' ] = $ data [ 'seasons' ] ; } if ( array_key_exists ( 'path' , $ data ) ) { $ uriData [ 'path' ] = $ data [ 'path' ] ; } if ( array_key_exists ( 'rootFolderPath' , $ data ) ) { $ uriData [ 'rootFolderPath' ] = $ data [ 'rootFolderPath' ] ; } if ( array_key_exists ( 'tvRageId' , $ data ) ) { $ uriData [ 'tvRageId' ] = $ data [ 'tvRageId' ] ; } $ uriData [ 'seasonFolder' ] = ( array_key_exists ( 'seasonFolder' , $ data ) ) ? $ data [ 'seasonFolder' ] : true ; if ( array_key_exists ( 'monitored' , $ data ) ) { $ uriData [ 'monitored' ] = $ data [ 'monitored' ] ; } if ( $ onlyFutureEpisodes ) { $ uriData [ 'addOptions' ] = [ 'ignoreEpisodesWithFiles' => true , 'ignoreEpisodesWithoutFiles' => true ] ; } $ response = [ 'uri' => $ uri , 'type' => 'post' , 'data' => $ uriData ] ; return $ this -> processRequest ( $ response ) ; }
Adds a new series to your collection

NOTE: if you do not add the required params, then the series wont function.
Some of these without the others can indeed make a "series". But it wont function properly in Sonarr.

Required: tvdbId (int) title (string) qualityProfileId (int) titleSlug (string) seasons (array)
See GET output for format

path (string) - full path to the series on disk or rootFolderPath (string)
Full path will be created by combining the rootFolderPath with the series title

Optional: tvRageId (int) seasonFolder (bool) monitored (bool)

@param array $data
@param bool|true $onlyFutureEpisodes It can be used to control which episodes Sonarr monitors
after adding the series, setting to true (default) will only monitor future episodes.

@return array|object|string
Adds a new series to your collection