{"id":17736607,"url":"https://github.com/toshimaru/docomochatter","last_synced_at":"2025-03-31T19:17:05.886Z","repository":{"id":30614976,"uuid":"34170337","full_name":"toshimaru/docomochatter","owner":"toshimaru","description":"Docomo Zatsudan API Client","archived":false,"fork":false,"pushed_at":"2015-08-13T17:41:26.000Z","size":164,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T08:41:48.017Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toshimaru.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}},"created_at":"2015-04-18T15:09:32.000Z","updated_at":"2016-04-07T03:33:41.000Z","dependencies_parsed_at":"2022-08-03T15:14:39.921Z","dependency_job_id":null,"html_url":"https://github.com/toshimaru/docomochatter","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/toshimaru%2Fdocomochatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshimaru%2Fdocomochatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshimaru%2Fdocomochatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshimaru%2Fdocomochatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toshimaru","download_url":"https://codeload.github.com/toshimaru/docomochatter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523847,"owners_count":20791444,"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-10-26T00:23:43.928Z","updated_at":"2025-03-31T19:17:05.862Z","avatar_url":"https://github.com/toshimaru.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docomochatter [![npm version](https://badge.fury.io/js/docomochatter.svg)](http://badge.fury.io/js/docomochatter)\n\nDocomo Zatsudan(雑談) API Client.\n\n# Requirement\n* Node v0.12 or more\n* Docomo API key (Get it [here](https://dev.smt.docomo.ne.jp/?p=about.index))\n\n# Usage\n\nSet docomo API key to the environment variable, `DOCOMO_API_KEY`, then instantiate the object and call `create_dialogue()` with your message. `create_dialogue()` returns [Promise](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), so you can chain methods by using `.then()` and `.catch()`.\n\n```js\nvar Docomochatter = require('docomochatter');\n\nclient = new Docomochatter(process.env.DOCOMO_API_KEY);\nclient.create_dialogue('hello').then(function(response){\n  console.log(response.utt);\n}).catch(function(error){\n  console.log(error);\n});\n```\n\n## via CoffeeScript\n\n```coffee\nDocomochatter = require('docomochatter')\n\nclient = new Docomochatter(process.env.DOCOMO_API_KEY)\nclient.create_dialogue('hello')\n  .then (response) -\u003e\n    console.log response.utt\n  .catch (error) -\u003e\n    console.log error\n```\n\n# Sample API response\n\n```\n{ utt: 'はろー',\n  yomi: 'はろー',\n  mode: 'dialog',\n  da: '30',\n  context: 'mnqsaABy9i7ByZBB6QxU9Q' }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoshimaru%2Fdocomochatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoshimaru%2Fdocomochatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoshimaru%2Fdocomochatter/lists"}