{"id":13472608,"url":"https://github.com/line/clova-extension-sample-dice","last_synced_at":"2025-03-26T17:30:55.878Z","repository":{"id":66087598,"uuid":"140565795","full_name":"line/clova-extension-sample-dice","owner":"line","description":null,"archived":true,"fork":false,"pushed_at":"2023-03-20T22:03:21.000Z","size":18,"stargazers_count":10,"open_issues_count":0,"forks_count":13,"subscribers_count":43,"default_branch":"github-public","last_synced_at":"2025-01-10T17:51:24.278Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/line.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-07-11T11:28:09.000Z","updated_at":"2023-05-30T07:44:54.000Z","dependencies_parsed_at":"2024-01-16T07:22:49.329Z","dependency_job_id":"65aec249-d69e-4474-9ebc-33dd06be2f60","html_url":"https://github.com/line/clova-extension-sample-dice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fclova-extension-sample-dice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fclova-extension-sample-dice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fclova-extension-sample-dice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fclova-extension-sample-dice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/line","download_url":"https://codeload.github.com/line/clova-extension-sample-dice/tar.gz/refs/heads/github-public","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245702157,"owners_count":20658556,"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-07-31T16:00:56.230Z","updated_at":"2025-03-26T17:30:55.581Z","avatar_url":"https://github.com/line.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[Japanese Document is here](README_ja.md)\n\n### Overview\nThis repository stores the REST API server source code used for the Clova extension \"Dice Drawer\". To see how the \"Dice Drawer\" extension works, use the voice command \"サイコロ遊びを起動して (Launch the dice game)\" on the Clova app or any Clova-compatible speaker (such as WAVE or Friends). The extension will tell you the results of the dice roll. You can roll 1-10 dice at a time, and the extension will tell you the sum of all dice if you are rolling 2 or more dice.\n\n### Requirements\nThe REST API server for the \"Dice Drawer\" Clova extension is implemented using Node.js. Any compatible operating system including Windows, macOS, Linux can run the server. You can find more information on compatibility, and download the latest version of Node.js on the official Node.js website. https://nodejs.org/ja/download/current/\n\n### Installation\nFollow the steps below to install the \"Dice Drawer\" REST API server source code.\n1) Install Node.js: https://nodejs.org/ja/download/current/\n2) Download the source code: git clone https://github.com/line/clova-extension-sample-dice.git\n3) Install library dependencies: npm install\n4) Edit config.js to replace \"com.example.dice\" with your Extension ID \n\n### Usage\nThe REST API server for the \"Dice Drawer\" Clova extension is designed to return appropriate responses to the extension requests sent from the Clova platform. Be advised that even if you run the API server, the API requests must be identical to the requests sent from the Clova platform. When publicly launching the service, you must change the domain to a HTTPS-based domain that can be accessed publicly.\n- Run the API server: node app.js\n  - To disable the signature verification、run  `DEBUG=true node app.js` \n- Test the API server: Using [Postman](https://www.getpostman.com/), send the following JSON request to test if a JSON response is returned.\n    - URL: http://localhost:3000/clova\n    - Request method: POST\n    - Body: Select \"raw\" and then select \"JSON (application/json)\" from the dropdown menu\n- Request example\n```\n{\n  \"version\": \"0.1.0\",\n  \"session\": {\n    \"sessionId\": \"55ca6ee4-72dd-4694-b30f-4b49e238634f\",\n    \"user\": {\n      \"userId\": \"U1bd47e4c7c68ca8a8ead15517d055ad1\",\n      \"accessToken\": \"3d0e7bab-2c1a-44d4-be20-c84910b78e2c\"\n    },\n    \"new\": true\n  },\n  \"context\": {\n    \"System\": {\n      \"user\": {\n        \"userId\": \"U1bd47e4c7c68ca8a8ead15517d055ad1\",\n        \"accessToken\": \"3d0e7bab-2c1a-44d4-be20-c84910b78e2c\"\n      },\n      \"device\": {\n        \"deviceId\": \"da6db6c26dcbe1a077eb2c890031ce2b1980asf2d30e00ee58804daf0ee89eff\"\n      },\n      \"application\": {\n        \"applicationId\": \"com.example.dice\"\n      }\n    }\n  },\n  \"request\": {\n    \"type\": \"IntentRequest\",\n    \"intent\": {\n      \"name\": \"ThrowDiceIntent\",\n      \"slots\": {\n        \"diceCount\": {\n          \"name\": \"diceCount\",\n          \"value\": \"1\"\n        }\n      }\n    }\n  }\n}\n```\n\n### License\nNAVER \u0026 LINE Corporation\n\n[LICENSE](https://github.com/line/clova-extension-sample-dice/blob/github-public/LICENSE)\n\n```\nCopyright 2018 NAVER Corp. \u0026 LINE Corporation\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fclova-extension-sample-dice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fline%2Fclova-extension-sample-dice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fclova-extension-sample-dice/lists"}