{"id":13633445,"url":"https://github.com/AlexSuperStar/Yandex-Alisa-PHP-Example","last_synced_at":"2025-04-18T10:34:54.475Z","repository":{"id":216844538,"uuid":"139031498","full_name":"AlexSuperStar/Yandex-Alisa-PHP-Example","owner":"AlexSuperStar","description":"Пример PHP скрипта для навыка Алисы Яндекса.","archived":false,"fork":false,"pushed_at":"2018-06-28T14:55:06.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-01T23:31:18.848Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexSuperStar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-06-28T14:44:51.000Z","updated_at":"2018-11-23T10:29:30.000Z","dependencies_parsed_at":"2024-02-01T22:45:40.185Z","dependency_job_id":null,"html_url":"https://github.com/AlexSuperStar/Yandex-Alisa-PHP-Example","commit_stats":null,"previous_names":["alexsuperstar/yandex-alisa-php-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexSuperStar%2FYandex-Alisa-PHP-Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexSuperStar%2FYandex-Alisa-PHP-Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexSuperStar%2FYandex-Alisa-PHP-Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexSuperStar%2FYandex-Alisa-PHP-Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexSuperStar","download_url":"https://codeload.github.com/AlexSuperStar/Yandex-Alisa-PHP-Example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223779727,"owners_count":17201220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T23:00:43.608Z","updated_at":"2024-11-09T02:32:10.904Z","avatar_url":"https://github.com/AlexSuperStar.png","language":"PHP","funding_links":[],"categories":["Примеры и навыки"],"sub_categories":["Примеры"],"readme":"# Yandex-Alisa-PHP-Example\nПример PHP скрипта для навыка Алисы Яндекса.\n# Установка\nУстанавливаем необходимые компоненты\n```sh\ncomposer init\ncomposer require alexsuperstar/jsonmaker\ncomposer install\n```\n\nСоздание скрипта обрабатывающего запросы от Алисы\n\nСоздаем файл index.php\n```php\n\u003c?php\nheader('Content-type:application/json;charset=utf-8');\ninclude 'vendor/autoload.php';\n$in = new \\alexstar\\JsonMaker(file_get_contents('php://input'));\nif(isset($in-\u003eversion)){\n    # если есть параметр version то будем считать что  входные данные в порядке\n    # формируем ответ\n    $out = new \\alexstar\\JsonMaker();\n    #  необходимые параметры ответа\n    $out-\u003eversion = '1.0';\n    $out-\u003eresponse-\u003eend_session = false;\n    $out-\u003esession-\u003esession_id = $in-\u003esession-\u003esession_id;\n    $out-\u003esession-\u003emessage_id = $in-\u003esession-\u003emessage_id;\n    $out-\u003esession-\u003euser_id = $in-\u003esession-\u003euser_id;\n    # Ответ Алисы\n    $out-\u003eresponse-\u003etext='Привет';\n    # Например ссылка под текстом\n    $out-\u003eresponse-\u003ebuttons[0]-\u003etitle = 'Открыть сайт разработчика';\n    $out-\u003eresponse-\u003ebuttons[0]-\u003eurl = 'https://alexstar.ru/';\n    echo $out;\n}\n?\u003e\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexSuperStar%2FYandex-Alisa-PHP-Example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlexSuperStar%2FYandex-Alisa-PHP-Example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexSuperStar%2FYandex-Alisa-PHP-Example/lists"}