This method lets users create a new list. A valid session id is required.

@param  string $name
@param  string $description
@param  array  $parameters
@param  array  $headers
@return mixed
547123
public function createList($name, $description, array $parameters = [], array $headers = [])
    {
        return $this->postJson('list', ['name' => $name, 'description' => $description], $parameters, $headers);
    }
827664
public function create($uri, $path = [], $parameters = [], $headers = [], $method = 'GET')
    {
        return $this->serializer->serialize(
            new Request($uri, $method, $path, $parameters, $headers),
            'json'
        );
    }
2434
public static function get($url, $headers = [], $parameters = null)
    {
        return Request::create('default')->get($url, $headers, $parameters);
    }
959387
public function addModule($name, array $description)
    {
        if (!isset($this->descriptor['modules'])) {
            $this->descriptor['modules'] = [];
        }
        $this->descriptor['modules'][$name] = $description;

        return $this;
    }
197598
public function loadMovieCollection(array $parameters = [], array $headers = [])
    {
        return $this->createCollection(
            $this->getApi()->getMovieGenres($parameters, $headers)
        );
    }
151608
public function load($id, array $parameters = [], array $headers = [])
    {
        if (!isset($parameters['append_to_response'])) {

            $parameters = array_merge($parameters, [
                new AppendToResponse([
                    AppendToResponse::CREDITS,
                    AppendToResponse::EXTERNAL_IDS,
                    AppendToResponse::IMAGES,
                    AppendToResponse::TRANSLATIONS,
                    AppendToResponse::SIMILAR,
                    AppendToResponse::RECOMMENDATIONS,
                    AppendToResponse::KEYWORDS,
                    AppendToResponse::CHANGES,
                    AppendToResponse::CONTENT_RATINGS,
                    AppendToResponse::ALTERNATIVE_TITLES,
                    AppendToResponse::VIDEOS,
                ])
            ]);
        }

        $data = $this->getApi()->getTvshow($id, $this->parseQueryParameters($parameters), $headers);

        return $this->getFactory()->create($data);
    }
1326719
public function addMailboxListHeader(string $name, array $addresses)
    {
        return $this->add(new MailboxListHeader($name, Address::createArray($addresses)));
    }
236137
protected function _createElement($name, $stream, CollectionHeader $headers)
    {
        if (!$headers->has('Content-Disposition'))
            $headers->insert(FactoryHttpHeader::of(
                array( 'Content-Disposition' => "form-data; name=\"{$name}\"" )
            ));


        ## Add Created Element As Stream
        ## it included headers and body stream

        ### headers
        $renderHeaders = '';
        /** @var iHeader $first */
        foreach ($headers->get('Content-Disposition') as $first)
            $renderHeaders .= $first->render();

        
        ## with new instance on delete
        $headers = $headers->del('Content-Disposition');
        /** @var iHeader $h */
        foreach($headers as $h)
            $renderHeaders .= $h->render();

        $renderHeaders = "--{$this->_boundary}\r\n" .$renderHeaders. "\r\n";


        $tStream = new STemporary($renderHeaders);
        $this->_t__wrap_stream->addStream($tStream->rewind());

        ($stream instanceof iStreamable) ?: $stream = new StreamBridgeFromPsr($stream);
        $this->_t__wrap_stream->addStream($stream);
        $this->_t__wrap_stream->addStream(new STemporary("\r\n"));
    }
548382
public function create($name, $description, $code)
	{
		$this->userId = $this->getEntityProvider()->getMe()->getId();
		$this->command = $name;
		$this->description = $description;
		$this->code = $code;
		$this->getLogger()->info('Creating new display command ' . $name);
		$response = $this->doPost('/command', $this->toArray());

		return $this->hydrate($response);
	}
1313404
public function withOption($name, $description, $default = '', array $choices = [])
    {
        $this->choices[$name] = $choices;

        return $this->addOption($name, null, InputOption::VALUE_OPTIONAL, $description, $default);
    }
1060804
public function setRole($name, $description = null)
    {
        $role = $this->getRole($name) ?: $this->createRole($name);
        if ($description) {
            $role->description = $description;
        }
        $this->add($role);

        return $role;
    }
1009930
public function addBox($name, $description = null)
    {
        return $this->boxes[$name] = new Box($name, $description);
    }
483254
@Override
    public List<String> headers(String name) {
        return request.headers().get(name);
    }
549973
public function generateUrl(string $name, array $parameters = []): string
    {
        $definition = $this->provider->getRouteDefinitionByName($name);
        return $definition->formatUrl($parameters);
    }
369176
private function composeAddColumn($name, array $description)
    {
        $type = strtoupper($description['type']);
        $attributes = $description['attributes'];

        // Transform attributes
        $default = $attributes['default'] ?? null;
        $size = $attributes['size'] ?? false;
        $primary = $attributes['primary'] ?? false;
        $increment = $attributes['increment'] ?? false;
        $nullable = $attributes['nullable'] ?? false;
        $unique = $attributes['unique'] ?? false;
        $check = $attributes['check'] ?? false;

        // String to VARCHAR
        if ($type == 'STRING') {
            $type = 'VARCHAR';

            if (!$size) {
                $size = 255;
            }
        }

        // Add column size
        if ($size) {
            $type = sprintf('%s(%s)', $type, $size);
        }

        // Bind auto increment action
        if ($increment) {
            $type = sprintf('%s AUTO_INCREMENT', $type);
        }

        // Set column as primary key
        if ($primary) {
            $type = sprintf('%s PRIMARY KEY', $type);
        }

        // Set column as unique
        if ($unique) {
            $type = sprintf('%s UNIQUE', $type);
        }

        // Add null or not null
        if ($nullable) {
            $type = sprintf('%s NULL', $type);
        } else {
            $type = sprintf('%s NOT NULL', $type);
        }

        // Add default value
        if ($default) {
            $type = sprintf('%s DEFAULT %s', $type, $default);
        }

        if ($check) {
            $type = sprintf('%s CHECK (%s)', $type, $check);
        }

        return trim(
            sprintf('%s `%s` %s', $description['command'], $name, $type)
        );
    }
253074
public function searchList($query, array $parameters = [], array $headers = [])
    {
        return $this->get('search/list', array_merge($parameters, [
            'query' => $query
        ], $headers));
    }
646809
public function load($id, array $parameters = [], array $headers = [])
    {
        return $this->getFactory()->create(
            $this->getApi()->getList($id, $parameters, $headers)
        );
    }