public function search(array $options)
    {
        $options = Options::buildOptions(Options::$defaultOptions, $options, $this);

        $deferred = new Deferred();

        $this->http->get(Endpoints::SEARCH.$options)->then(function ($response) use ($deferred) {
            $collection = new Collection();

            foreach ($response as $key => $values) {
                if ($key == 'artists') {
                    $artists = new Collection();

                    foreach ($values['items'] as $value) {
                        $artists->push(new Artist($this->http, $this, $value));
                    }

                    $collection['artists'] = $artists;
                } elseif ($key == 'albums') {
                    $albums = new Collection();

                    foreach ($values['items'] as $value) {
                        $albums->push(new Album($this->http, $this, $value));
                    }

                    $collection['albums'] = $albums;
                } elseif ($key == 'playlists') {
                    $playlists = new Collection();

                    foreach ($values['items'] as $value) {
                        $playlists->push(new Playlist($this->http, $this, $value));
                    }

                    $collection['playlists'] = $playlists;
                } elseif ($key == 'tracks') {
                    $tracks = new Collection();

                    foreach ($values['items'] as $value) {
                        $tracks->push(new Track($this->http, $this, $value));
                    }

                    $collection['tracks'] = $tracks;
                } elseif ($key == 'videos') {
                    $videos = new Collection();

                    foreach ($values['items'] as $value) {
                        $videos->push(new Video($this->http, $this, $value));
                    }

                    $collection['videos'] = $videos;
                }
            }

            $deferred->resolve($collection);
        }, function ($e) use ($deferred) {
            $deferred->reject($e);
        });

        return $deferred->promise();
    }