npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jike-sdk-latest

v0.26.3

Published

Jike Ⓙ SDK for Node.js

Downloads

6

Readme

jike-sdk Ⓙ Jike SDK

Unit Test GitHub node-lts npm type definitions GitHub Repo stars GitHub forks Jike (followers)

本项目仅供学习交流使用,在使用过程中对你或他人造成的任何损失我们概不负责。

[!CAUTION] 本项目不再积极维护。

Features

  • 🌈 可能是东半球最全的第三方 SDK
  • ⭐️ 同时支持 Node.js / 浏览器 / Deno / Bun
  • 🦾 自带 TypeScript 类型声明

Installation

Node.js

Node.js >= v18.12.0

npm i jike-sdk

ESM 导入

如果使用 ESM 方式导入,需要把 package.jsontype 设置为 module,或将后缀名改为 .mjs

// index.mjs

// 使用此版本需 node >= 18 或 自行 ployfill fetch。
import { setApiConfig } from 'jike-sdk'

setApiConfig({
  // ...
})

CJS 导入

const { setApiConfig } = require('jike-sdk')
setApiConfig({
  // ...
})

Bun

Bun >= 0.5.8

bun i jike-sdk
// index.ts
import { setApiConfig } from 'jike-sdk'
setApiConfig({
  // ...
})

Deno

import { setApiConfig } from 'https://cdn.skypack.dev/jike-sdk/index?dts'

浏览器

import { setApiConfig } from 'jike-sdk'

或使用 CDN 的方式加载(与 Deno 一致)

<script type="module">
  import { setApiConfig } from 'https://cdn.skypack.dev/jike-sdk/index'
</script>

由于 CORS 策略的原因,第三方网站无法直接请求外部服务器。但可以使用浏览器扩展的能力请求。

Usage

API Reference

import { ApiClient, api, setAccessToken, setApiConfig } from 'jike-sdk'

// 自行在 GitHub 搜索「jike endpoint」探索配置
const apiConfig = {
  endpointId: 'jike',
  endpointUrl: '<jike-endpoint-url>', // 请自行替换
  bundleId: '<bundle-id>', // 请自行替换
  buildNo: '<build-no>', // 请自行替换
  userAgent: '<jike-sdk-user-agent>', // 请自行替换
  accessToken: '<access-token>', // 请自行替换
}
setApiConfig(apiConfig)

setAccessToken('update-access-token')
api.userRelation.getFollowingList('82D23B32-CF36-4C59-AD6F-D05E3552CBF3', {
  limit: 100,
})

// 或使用 ApiClient
const client = ApiClient(apiConfig)
client.users.profile()

Contributing PRs Welcome

see CONTRIBUTING.md

Sponsors

License

AGPL-3.0 License © 2021-PRESENT 三咲智子