{"action":"closed","issue":{"url":"https://api.github.com/repos/nixsolutions/yandex-php-library/issues/74","labels_url":"https://api.github.com/repos/nixsolutions/yandex-php-library/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/nixsolutions/yandex-php-library/issues/74/comments","events_url":"https://api.github.com/repos/nixsolutions/yandex-php-library/issues/74/events","html_url":"https://github.com/nixsolutions/yandex-php-library/issues/74","id":54182609,"number":74,"title":"Ссылка на файл.","user":{"login":"stalker-people","id":5948627,"avatar_url":"https://avatars.githubusercontent.com/u/5948627?v=3","gravatar_id":"","url":"https://api.github.com/users/stalker-people","html_url":"https://github.com/stalker-people","followers_url":"https://api.github.com/users/stalker-people/followers","following_url":"https://api.github.com/users/stalker-people/following{/other_user}","gists_url":"https://api.github.com/users/stalker-people/gists{/gist_id}","starred_url":"https://api.github.com/users/stalker-people/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stalker-people/subscriptions","organizations_url":"https://api.github.com/users/stalker-people/orgs","repos_url":"https://api.github.com/users/stalker-people/repos","events_url":"https://api.github.com/users/stalker-people/events{/privacy}","received_events_url":"https://api.github.com/users/stalker-people/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-13T11:44:01Z","updated_at":"2015-01-13T11:48:12Z","closed_at":"2015-01-13T11:48:12Z","body":"Доброго времени суток!\r\nПодскажите пожалуйста как можно реализовать цикличный вывод списка файлов с возможностью перехода на сам файл?\r\nДело в том что я пытался сделать следующим образом:\r\n<xmp>\r\n<?foreach ($dirContent as $dirItem) {\r\n    if ($dirItem['resourceType'] === 'dir') {\r\n        echo '[dir]' . $dirItem['displayName'] . '/<br />';\r\n    } else {\r\n\t$shareFile = '/'.$dirItem['displayName'].'';\r\n\t$url = $diskClient->startPublishing($shareFile);\r\n        echo \"<a href=\";\r\n\techo $url;\r\n\techo \"/ >[file]\";\r\n\techo $dirItem['displayName'];\r\n\techo \" size: \";\r\n\techo $dirItem['contentLength'];\r\n\techo \" byte</a><br />\";\r\n    }\r\n}\r\n?>\r\n</xmp>\r\n\r\nРезультат: \r\n\r\nFatal error: Uncaught exception 'Yandex\\Disk\\Exception\\DiskRequestException' with message 'Service responded with error code: \"404\" and message: \"Object Not Found\"' in phar:///home/alex/web_chaes2/files/yadisk_file_retranslate/yandex-php-library_master.phar/src/Yandex/Disk/DiskClient.php:106 Stack trace: #0 phar:///home/alex/web_chaes2/files/yadisk_file_retranslate/yandex-php-library_master.phar/src/Yandex/Disk/DiskClient.php(438): Yandex\\Disk\\DiskClient->sendRequest(Object(Guzzle\\Http\\Message\\EntityEnclosingRequest)) #1 /home/alex/web_chaes2/files/yadisk_file_retranslate/index.php(37): Yandex\\Disk\\DiskClient->startPublishing('/Zakk Wylde.mp4') #2 {main} thrown in phar:///home/alex/web_chaes2/files/yadisk_file_retranslate/yandex-php-library_master.phar/src/Yandex/Disk/DiskClient.php on line 106"}}