Jike Open platfrom JavaScript SDK
Installation
npm install @jike/open-sdk --save
Configuration
import { JikeOpenSDK } from '@jike/open-sdk'
// FIRST OF ALL: apply for your application at jike open platform.
// replace <OPEN_APP_ID> with your openAppId.
const sdk = new JikeOpenSDK(<OPEN_APP_ID>)
// or
const sdk = new JikeOpenSDK({
openAppId: <OPEN_APP_ID>
})
API
sdkInstance.getUserInfo()
- avaliable version 4.15.0
sdkInstance.getUserInfo(): Promise<UserInfo>
Interface
UserInfo
interface UserInfo {
user: {
id: string,
isLoginUser: boolean,
screenName: string,
profileImage: {
format: string,
picUrl: string,
middlePicUrl: string,
thumbnailUrl: string,
}
}
}