{"id":15062866,"url":"https://github.com/open-jike/jike-sdk","last_synced_at":"2025-04-05T23:10:00.105Z","repository":{"id":36983773,"uuid":"438269448","full_name":"open-jike/jike-sdk","owner":"open-jike","description":"Ⓙ Jike SDK for Node.js / Deno / browser","archived":false,"fork":false,"pushed_at":"2024-10-29T17:57:06.000Z","size":1065,"stargazers_count":57,"open_issues_count":6,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T19:15:07.010Z","etag":null,"topics":["api","deno","jike","nodejs","sdk","typescript"],"latest_commit_sha":null,"homepage":"https://jike-sdk.sxzz.moe","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-jike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2021-12-14T13:46:55.000Z","updated_at":"2024-09-09T09:17:50.000Z","dependencies_parsed_at":"2023-02-16T06:16:07.603Z","dependency_job_id":"880a1cbe-deef-4689-afde-c5b1d3e9f4df","html_url":"https://github.com/open-jike/jike-sdk","commit_stats":{"total_commits":224,"total_committers":4,"mean_commits":56.0,"dds":0.2723214285714286,"last_synced_commit":"24fa721fae9509e257a8e5800cede1317f908774"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-jike%2Fjike-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-jike%2Fjike-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-jike%2Fjike-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-jike%2Fjike-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-jike","download_url":"https://codeload.github.com/open-jike/jike-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411235,"owners_count":20934653,"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":["api","deno","jike","nodejs","sdk","typescript"],"created_at":"2024-09-24T23:47:41.785Z","updated_at":"2025-04-05T23:10:00.084Z","avatar_url":"https://github.com/open-jike.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jike-sdk Ⓙ Jike SDK\n\n[![Unit Test](https://github.com/open-jike/jike-sdk/actions/workflows/unit-test.yml/badge.svg)](https://github.com/open-jike/jike-sdk/actions/workflows/unit-test.yml)\n[![GitHub](https://img.shields.io/github/license/open-jike/jike-sdk)](https://github.com/open-jike/jike-sdk)\n[![node-lts](https://img.shields.io/node/v-lts/jike-sdk)](https://www.npmjs.com/package/jike-sdk)\n[![npm type definitions](https://img.shields.io/npm/types/jike-sdk)](https://www.npmjs.com/package/jike-sdk)\n[![GitHub Repo stars](https://img.shields.io/github/stars/open-jike/jike-sdk?style=social)](https://github.com/open-jike/jike-sdk)\n[![GitHub forks](https://img.shields.io/github/forks/open-jike/jike-sdk?style=social)](https://github.com/open-jike/jike-sdk)\n[![Jike (followers)](https://img.shields.io/badge/dynamic/json?for-the-badge\u0026logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAEsmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94c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AAAdZJREFUOI2llLFrU1EUh7%2FzXmLSFpIsUrDgYiFbBsGhTsFR6qjimsVd+s90KYib4uxasDgILnXJowrWYHEQadLaoeSdn8NLX26S9zTogwv3Xn5897vnPK4B6GujiVkP7CmwiVnMMp+UAp9Au0h7dnM0tAlsH4s6QLQUaAGMIz8EdSPMev8JAxGhqIOsZxq0+pi1%2FxGUjXytxDRojf9as%2Fo2VG8BcPrzFa34pASqtLJUA1YfwsoDAPaSuzxbf7xoByCLK8tdLc2Xv9LGrFkAlaAcGIbxfNvQdDnJKJgvAjUbntnLVaZ7mstVwlw5zALDAFJwaGWxsEXBad9KYTPAMjMBVoX4OgCXqZPKshqWiFSCes8W2+pQ68DqfajdBuDgW8qanU4hc83JDEvMFK9jG2+Y9JWTc+flkbPdfFd+5dww%2FJeuApfHnF8M+HJxg%2FffnY8%2FxmzVX3Bv5Xmh2dXc9Lk1RhZr7iSAg7NHvD17wka1z9baazZrHzCp2A6QlJqOWn1h7SJ9YbjHxIwLG7BQJimJsscRR0y7l+srg4WAuUwwHLRrShpNl+0bUSd718rr8wc7d%2FmhS93I2qNhZOoi35ErkSvFA5PQaM5OrlSuRPiOS91rd0bD31iIPlmy3nObAAAAAElFTkSuQmCC\u0026label=%E4%B8%89%E5%92%B2%E6%99%BA%E5%AD%90%20%E5%8D%B3%E5%88%BB%E8%A2%AB%E5%85%B3%E6%B3%A8\u0026labelColor=282c34\u0026color=f7cf07\u0026query=%24.data.totalSubs\u0026url=https%3A%2F%2Fapi.spencerwoo.com%2Fsubstats%2F%3Fsource%3DjikeFollower%26queryKey%3D5C505995-681E-4C1E-AD4A-1CC683627B6E\u0026longCache=true)](https://web.okjike.com/u/5C505995-681E-4C1E-AD4A-1CC683627B6E)\n\n**本项目仅供学习交流使用，在使用过程中对你或他人造成的任何损失我们概不负责。**\n\n\u003e [!CAUTION]\n\u003e 本项目不再积极维护。\n\n## Features\n\n- 🌈 可能是东半球最全的第三方 SDK\n- ⭐️ 同时支持 Node.js / 浏览器 / Deno / Bun\n- 🦾 自带 TypeScript 类型声明\n\n\u003cdetails\u003e\n  \u003csummary\u003eAPI 列表\u003c/summary\u003e\n\n- [用户](https://jike-sdk.sxzz.moe/modules/api_users.html)\n  - [x] [获取用户信息](https://jike-sdk.sxzz.moe/functions/api_users.profile.html)\n  - [x] [刷新 Access Token](https://jike-sdk.sxzz.moe/functions/api_users.refreshToken.html)\n  - [x] [发送登录验证码](https://jike-sdk.sxzz.moe/functions/api_users.getSmsCode.html)\n  - [x] [短信登录](https://jike-sdk.sxzz.moe/functions/api_users.loginWithSmsCode.html)\n  - [x] [手机号与密码登录](https://jike-sdk.sxzz.moe/functions/api_users.loginWithPhoneAndPassword.html)\n  - [x] [弹一弹头像](https://jike-sdk.sxzz.moe/functions/api_users.avatarGreet.html)\n  - [x] [修改用户信息](https://jike-sdk.sxzz.moe/functions/api_users.editProfile.html)\n  - [ ] ~~保存设备 Token~~\n- [用户关系](https://jike-sdk.sxzz.moe/modules/api_user_relation.html)\n  - [x] [获取关注列表](https://jike-sdk.sxzz.moe/functions/api_user_relation.getFollowingList.html)\n  - [x] [获取被关注列表](https://jike-sdk.sxzz.moe/functions/api_user_relation.getFollowerList.html)\n  - [x] [关注](https://jike-sdk.sxzz.moe/functions/api_user_relation.follow.html)\n  - [x] [取消关注](https://jike-sdk.sxzz.moe/functions/api_user_relation.unfollow.html)\n  - [x] [是否关注用户](https://jike-sdk.sxzz.moe/classes/index.JikeUser.html#isFollowing)\n  - [x] [不看 TA 的内容](https://jike-sdk.sxzz.moe/functions/api_user_relation.mute.html)\n  - [x] [重新看 TA 的内容](https://jike-sdk.sxzz.moe/functions/api_user_relation.unmute.html)\n  - [x] [加入黑名单](https://jike-sdk.sxzz.moe/functions/api_user_relation.addBlock.html)\n  - [x] [解除黑名单](https://jike-sdk.sxzz.moe/functions/api_user_relation.removeBlock.html)\n- [动态帖子](https://jike-sdk.sxzz.moe/modules/api_posts.html)\n  - [x] [发送动态](https://jike-sdk.sxzz.moe/functions/api_posts.create.html)\n  - [x] [获取动态详情](https://jike-sdk.sxzz.moe/functions/api_posts.get.html)\n  - [x] [删除动态](https://jike-sdk.sxzz.moe/functions/api_posts.remove.html)\n  - [x] [分享动态](https://jike-sdk.sxzz.moe/functions/api_posts.share.html)\n  - [x] [点赞](https://jike-sdk.sxzz.moe/functions/api_posts.like.html)\n  - [x] [取消点赞](https://jike-sdk.sxzz.moe/functions/api_posts.unlike.html)\n  - [x] [获取点赞用户列表](https://jike-sdk.sxzz.moe/functions/api_posts.listLikedUsers.html)\n  - [x] [隐藏动态](https://jike-sdk.sxzz.moe/functions/api_posts.hide.html)\n  - [x] [动态转为公开](https://jike-sdk.sxzz.moe/functions/api_posts.recover.html)\n- [动态广场](https://jike-sdk.sxzz.moe/modules/api_recommend_feed.html)\n  - [x] [获取动态推荐](https://jike-sdk.sxzz.moe/functions/api_recommend_feed.list.html)\n- [评论](https://jike-sdk.sxzz.moe/modules/api_comments.html)\n  - [x] [获取动态下评论](https://jike-sdk.sxzz.moe/functions/api_comments.listPrimary.html)\n  - [x] [获取评论](https://jike-sdk.sxzz.moe/functions/api_comments.list.html)\n  - [x] [发送评论](https://jike-sdk.sxzz.moe/functions/api_comments.add.html) （发送子评论）\n  - [x] [点赞](https://jike-sdk.sxzz.moe/functions/api_comments.like.html)\n  - [x] [取消点赞](https://jike-sdk.sxzz.moe/functions/api_comments.unlike.html)\n  - [x] [删除评论](https://jike-sdk.sxzz.moe/functions/api_comments.remove.html)\n- [动态](https://jike-sdk.sxzz.moe/modules/api_personal_update.html)\n  - [x] [获取用户动态](https://jike-sdk.sxzz.moe/functions/api_personal_update.single.html)\n  - [x] [获取关注动态](https://jike-sdk.sxzz.moe/functions/api_personal_update.followingUpdates.html)\n  - [x] [置顶动态](https://jike-sdk.sxzz.moe/functions/api_personal_update.pin.html)\n  - [x] [取消置顶动态](https://jike-sdk.sxzz.moe/functions/api_personal_update.unpin.html)\n- [通知](https://jike-sdk.sxzz.moe/modules/api_notifications.html)\n  - [x] [获取通知列表](https://jike-sdk.sxzz.moe/functions/api_notifications.list.html)\n  - [x] [获取合并通知列表](https://jike-sdk.sxzz.moe/functions/api_notifications.listMergedMentions.html)\n  - [x] [获取通知列表（自动展开合并通知）](https://jike-sdk.sxzz.moe/functions/api_notifications.listWithMerged.html)\n- [上传](https://jike-sdk.sxzz.moe/modules/api_upload.html)\n  - [x] [获取上传 token](https://jike-sdk.sxzz.moe/functions/api_upload.token.html)\n  - [x] [上传图片](https://jike-sdk.sxzz.moe/functions/api_upload.upload.html)\n- [日记](https://jike-sdk.sxzz.moe/modules/api_stories.html)\n  - [x] [获取关注用户日记列表](https://jike-sdk.sxzz.moe/functions/api_stories.followingFeed.html)\n  - [x] [获取用户的日记详情](https://jike-sdk.sxzz.moe/functions/api_stories.listUserStories.html)\n- [圈子](https://jike-sdk.sxzz.moe/modules/api_topics.html)\n  - [x] [获取圈子热门动态](https://jike-sdk.sxzz.moe/functions/api_topics.getTabsSelectedFeed.html)\n  - [x] [获取圈子动态](https://jike-sdk.sxzz.moe/functions/api_topics.getTabsSquareFeed.html)\n  - [x] [搜索圈子](https://jike-sdk.sxzz.moe/functions/api_topics.search.html)\n\n\u003c/details\u003e\n\n## Installation\n\n### Node.js\n\nNode.js \u003e= v18.12.0\n\n```bash\nnpm i jike-sdk\n```\n\n#### ESM 导入\n\n如果使用 ESM 方式导入，需要把 `package.json` 的 `type` 设置为 `module`，或将后缀名改为 `.mjs`。\n\n```ts\n// index.mjs\n\n// 使用此版本需 node \u003e= 18 或 自行 ployfill fetch。\nimport { setApiConfig } from 'jike-sdk'\n\nsetApiConfig({\n  // ...\n})\n```\n\n#### CJS 导入\n\n```ts\nconst { setApiConfig } = require('jike-sdk')\nsetApiConfig({\n  // ...\n})\n```\n\n### Bun\n\nBun \u003e= 0.5.8\n\n```bash\nbun i jike-sdk\n```\n\n```ts\n// index.ts\nimport { setApiConfig } from 'jike-sdk'\nsetApiConfig({\n  // ...\n})\n```\n\n### Deno\n\n```ts\nimport { setApiConfig } from 'https://cdn.skypack.dev/jike-sdk/index?dts'\n```\n\n### 浏览器\n\n```ts\nimport { setApiConfig } from 'jike-sdk'\n```\n\n或使用 CDN 的方式加载（与 Deno 一致）\n\n```html\n\u003cscript type=\"module\"\u003e\n  import { setApiConfig } from 'https://cdn.skypack.dev/jike-sdk/index'\n\u003c/script\u003e\n```\n\n**由于 CORS 策略的原因，第三方网站无法直接请求外部服务器。但可以使用浏览器扩展的能力请求。**\n\n## Usage\n\n[API Reference](https://jike-sdk.sxzz.moe/)\n\n```ts\nimport { ApiClient, api, setAccessToken, setApiConfig } from 'jike-sdk'\n\n// 自行在 GitHub 搜索「jike endpoint」探索配置\nconst apiConfig = {\n  endpointId: 'jike',\n  endpointUrl: '\u003cjike-endpoint-url\u003e', // 请自行替换\n  bundleId: '\u003cbundle-id\u003e', // 请自行替换\n  buildNo: '\u003cbuild-no\u003e', // 请自行替换\n  userAgent: '\u003cjike-sdk-user-agent\u003e', // 请自行替换\n  accessToken: '\u003caccess-token\u003e', // 请自行替换\n}\nsetApiConfig(apiConfig)\n\nsetAccessToken('update-access-token')\napi.userRelation.getFollowingList('82D23B32-CF36-4C59-AD6F-D05E3552CBF3', {\n  limit: 100,\n})\n\n// 或使用 ApiClient\nconst client = ApiClient(apiConfig)\nclient.users.profile()\n```\n\n## Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)\n\nsee [CONTRIBUTING.md](./CONTRIBUTING.md)\n\n## Sponsors\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg\"\u003e\n    \u003cimg src='https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg'/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## License\n\n[AGPL-3.0](./LICENSE) License © 2021-PRESENT [三咲智子](https://github.com/sxzz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-jike%2Fjike-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-jike%2Fjike-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-jike%2Fjike-sdk/lists"}