{"id":20014827,"url":"https://github.com/pepebecker/pinyin-api","last_synced_at":"2025-03-02T02:41:25.496Z","repository":{"id":85022022,"uuid":"91961137","full_name":"pepebecker/pinyin-api","owner":"pepebecker","description":"API for the pinyin-rest server.","archived":false,"fork":false,"pushed_at":"2020-05-31T09:26:52.000Z","size":450,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-12T15:24:13.809Z","etag":null,"topics":["chinese","hacktoberfest","hanzi","mandarin","pinyin","pinyin-api"],"latest_commit_sha":null,"homepage":"https://github.com/pepebecker/pinyin-api","language":"JavaScript","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/pepebecker.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-21T13:56:49.000Z","updated_at":"2023-08-22T06:32:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"7fb6f53b-66ff-44e8-94c8-546e872a29bf","html_url":"https://github.com/pepebecker/pinyin-api","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/pepebecker%2Fpinyin-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepebecker%2Fpinyin-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepebecker%2Fpinyin-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepebecker%2Fpinyin-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pepebecker","download_url":"https://codeload.github.com/pepebecker/pinyin-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241451546,"owners_count":19964899,"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":["chinese","hacktoberfest","hanzi","mandarin","pinyin","pinyin-api"],"created_at":"2024-11-13T07:44:02.225Z","updated_at":"2025-03-02T02:41:25.490Z","avatar_url":"https://github.com/pepebecker.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pinyin API\n\n[![Travis Build Status](https://travis-ci.org/pepebecker/pinyin-api.svg)](https://travis-ci.org/pepebecker/pinyin-api)\n[![Coverage Status](https://coveralls.io/repos/github/pepebecker/pinyin-api/badge.svg)](https://coveralls.io/github/pepebecker/pinyin-api)\n[![Greenkeeper badge](https://badges.greenkeeper.io/pepebecker/pinyin-api.svg)](https://greenkeeper.io/)\n[![dependency status](https://img.shields.io/david/pepebecker/pinyin-api.svg)](https://david-dm.org/pepebecker/pinyin-api)\n[![dev dependency status](https://img.shields.io/david/dev/pepebecker/pinyin-api.svg)](https://david-dm.org/pepebecker/pinyin-api#info=devDependencies)\n[![MIT-licensed](https://img.shields.io/github/license/pepebecker/pinyin-api.svg)](https://opensource.org/licenses/MIT)\n[![chat on gitter](https://badges.gitter.im/pepebecker.svg)](https://gitter.im/pepebecker)\n\n## Install\n\n```shell\nnpm install pepebecker/pinyin-api\n```\n\n## Usage\n\n```js\nconst api = require('pinyin-api')\n\napi.convert('我的猫喜欢喝牛奶')\n.then(console.log)\n// {\n//   text: 'wǒ de māo xǐhuan hē niúnǎi',\n//   data: [\n//     'wǒ ',\n//     [ 'de', 'dī', 'dí', 'dì' ],\n//     ' māo xǐhuan ',\n//     [ 'hē', 'hè' ],\n//     ' niúnǎi'\n//   ]\n// }\n\napi.convert('wo3 de mao1 xi3huan he1 niu2nai3')\n.then(console.log)\n// {\n//   text: 'wǒ de māo xǐhuan hē niúnǎi',\n//   data: 'wǒ de māo xǐhuan hē niúnǎi'\n// }\n\napi.convert('wǒ de māo xǐhuan hē niúnǎi')\n.then(console.log)\n// {\n//   text: 'wo3 de5 mao1 xi3huan5 he1 niu2nai3',\n//   data: 'wo3 de5 mao1 xi3huan5 he1 niu2nai3'\n// }\n\napi.split('wodemaoxihuanheniunai')\n.then(console.log)\n// {\n//   text: 'wo de mao xi huan he niu nai',\n//   data: [ 'wo', 'de', 'mao', 'xi', 'huan', 'he', 'niu', 'nai' ]\n// }\n```\n\n## Related\n\n- [`pinyin-utils`](https://github.com/pepebecker/pinyin-utils)\n- [`pinyin-split`](https://github.com/pepebecker/pinyin-split)\n- [`find-hanzi`](https://github.com/pepebecker/find-hanzi)\n- [`hsk-words`](https://github.com/pepebecker/hsk-words)\n- [`pinyin-or-hanzi`](https://github.com/pepebecker/pinyin-or-hanzi)\n- [`hanzi-to-pinyin`](https://github.com/pepebecker/hanzi-to-pinyin)\n- [`pinyin-convert`](https://github.com/pepebecker/pinyin-convert)\n- [`pinyin-rest`](https://github.com/pepebecker/pinyin-rest)\n- [`pinyin-bot-core`](https://github.com/pepebecker/pinyin-bot-core)\n- [`pinyin-telegram`](https://github.com/pepebecker/pinyin-telegram)\n- [`pinyin-messenger`](https://github.com/pepebecker/pinyin-messenger)\n\n## Contributing\n\nIf you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/pepebecker/pinyin-api/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepebecker%2Fpinyin-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpepebecker%2Fpinyin-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepebecker%2Fpinyin-api/lists"}