Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path в публичных ресурсах #26

Open
thestanislav opened this issue Feb 19, 2018 · 2 comments
Open

Path в публичных ресурсах #26

thestanislav opened this issue Feb 19, 2018 · 2 comments

Comments

@thestanislav
Copy link

Не нашел способа получить список ресурсов по пути (path).
Думаю вы забыли в запросе добавить параметр path
Нужно как то так https://github.com/jack-theripper/yandex/blob/master/src/Disk/Resource/Opened.php#L100.

$response = $this->client->send((new Request($this->uri->withPath($this->uri->getPath().'public/resources')
->withQuery(http_build_query(array_merge($this->getParameters($this->parametersAllowed), [
					'public_key' => $this->getPublicKey(),
                                        'path' => $this->getPath()
				]), null, '&')), 'GET')));
@thestanislav
Copy link
Author

Так же этот код выдает не правильный урл для скачивания

$resource->items->get(0)->getLink();

Думаю надо при создание ресурса, так же указывать его путь
https://github.com/jack-theripper/yandex/blob/master/src/Disk/Resource/Opened.php#L68

$this->store['docviewer'] = $this->createDocViewerUrl();
$this->path= $this->store['path']

@jack-theripper
Copy link
Owner

@thestanislav
Может быть забыл :-)) Обязательно разберусь в вопросе, в свободное время. Благодарю за примеры кода)) Сейчас ничего конкретного не смогу сказать :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants