All Projects → sxzz → jike-sdk

sxzz / jike-sdk

Licence: AGPL-3.0 license
Ⓙ Jike SDK for Node.js / Deno / browser

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to jike-sdk

sqlite3
The fastest and correct module for SQLite3 in Deno.
Stars: ✭ 143 (+320.59%)
Mutual labels:  deno
deno registry2
The backend for the deno.land/x service
Stars: ✭ 79 (+132.35%)
Mutual labels:  deno
microdiff
A fast, zero dependency object and array comparison library. Significantly faster than most other deep comparison libraries and has full TypeScript support.
Stars: ✭ 3,138 (+9129.41%)
Mutual labels:  deno
cotton
SQL Database Toolkit for Deno
Stars: ✭ 129 (+279.41%)
Mutual labels:  deno
dataStructure
Implement different Data Structures using TypeScript and JavaScript. Deno Third-party Module.
Stars: ✭ 24 (-29.41%)
Mutual labels:  deno
tsafe
🔩 The missing TypeScript utils
Stars: ✭ 285 (+738.24%)
Mutual labels:  deno
justjavac
justjavac's modules
Stars: ✭ 15 (-55.88%)
Mutual labels:  deno
maze generator
A work-in-progress Javascript maze generator module, compatible with both Deno and Node. 🌽
Stars: ✭ 35 (+2.94%)
Mutual labels:  deno
http4ts
Server as a Function http toolkit for TypeScript & JavaScript
Stars: ✭ 30 (-11.76%)
Mutual labels:  deno
nanoid
A NanoID implementation for Deno
Stars: ✭ 63 (+85.29%)
Mutual labels:  deno
node2deno
Deno for Node.js developers
Stars: ✭ 19 (-44.12%)
Mutual labels:  deno
denocker
A Docker client library for Deno
Stars: ✭ 23 (-32.35%)
Mutual labels:  deno
deno-pokemon
a simple api to create and explore pokemons - made with oak deno framework
Stars: ✭ 20 (-41.18%)
Mutual labels:  deno
reno
A thin, testable routing library designed to sit on top of Deno's standard HTTP module
Stars: ✭ 127 (+273.53%)
Mutual labels:  deno
angular deno
Angular Deno - Experimental Angular renderer in server with Deno
Stars: ✭ 78 (+129.41%)
Mutual labels:  deno
deno-mongo-api
Example for building REST APIS with deno and MongoDB
Stars: ✭ 17 (-50%)
Mutual labels:  deno
youtube-sr
Simple library for Node, Deno & Bun to make YouTube search easily
Stars: ✭ 68 (+100%)
Mutual labels:  deno
calcite
A rust framework for creating deno plugins
Stars: ✭ 62 (+82.35%)
Mutual labels:  deno
johanbrook.com
Naming the repo "johanbrook.com" was a mistake.
Stars: ✭ 17 (-50%)
Mutual labels:  deno
snatchblock
A strictly typed utility library.
Stars: ✭ 1,059 (+3014.71%)
Mutual labels:  deno

jike-sdk Ⓙ Jike SDK

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

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

Features

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

Installation

Node.js

Node.js >= v14.19.0

npm i jike-sdk

ESM 导入

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

// index.mjs

// 自带 node-fetch。node < 18 使用此版本。
import { setApiConfig } from 'jike-sdk'

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

setApiConfig({
  // ...
})

CJS 导入

const { setApiConfig } = require('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 三咲智子

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].