public function createPushTask( $taskInfo, $additionalParams = array() ) {
        $data = $taskInfo;
        if (!isset($data['ttl'])) {
            $data['ttl'] = 0;
        }
        if( empty($data['title']) || empty($data['website_id']) || empty($data['body']) ) {
            return $this->handleError( 'Not all data' );
        }
        if ($additionalParams) {
            foreach($additionalParams as $key=>$val) {
                $data[$key] = $val;
            }
        }

        $requestResult = $this->sendRequest( '/push/tasks', 'POST', $data );

        return $this->handleResult( $requestResult );
    }
public function createPushTask( $taskInfo, $additionalParams = array() ) {
        $data = $taskInfo;
        if (!isset($data['ttl'])) {
            $data['ttl'] = 0;
        }
        if( empty($data['title']) || empty($data['website_id']) || empty($data['body']) ) {
            return $this->handleError( 'Not all data' );
        }
        if ($additionalParams) {
            foreach($additionalParams as $key=>$val) {
                $data[$key] = $val;
            }
        }

        $requestResult = $this->sendRequest( '/push/tasks', 'POST', $data );

        return $this->handleResult( $requestResult );
    }
public function createPushTask ( $ taskInfo , $ additionalParams = array ( ) ) { $ data = $ taskInfo ; if ( ! isset ( $ data [ 'ttl' ] ) ) { $ data [ 'ttl' ] = 0 ; } if ( empty ( $ data [ 'title' ] ) || empty ( $ data [ 'website_id' ] ) || empty ( $ data [ 'body' ] ) ) { return $ this -> handleError ( 'Not all data' ) ; } if ( $ additionalParams ) { foreach ( $ additionalParams as $ key => $ val ) { $ data [ $ key ] = $ val ; } } $ requestResult = $ this -> sendRequest ( '/push/tasks' , 'POST' , $ data ) ; return $ this -> handleResult ( $ requestResult ) ; }
Create new push campaign

@param $taskInfo
@param array $additionalParams
@return mixed|stdClass
Create new push campaign