Releases: fanfoujs/fanfou-sdk-node
Releases · fanfoujs/fanfou-sdk-node
v5.0.0
Breaking changes
- Move to ESM
- Requires Node.js 14 or later
- Move
plain_text
,entities
to utils. See https://github.com/fanfoujs/fanfou-sdk-node/blob/main/source/utils.ts.
getEntities
& getPlainText
+import {getEntities, getPlainText} from 'fanfou-sdk';
const status = ff.get('/statues/show', id: 'status-id');
-const plainText = status.plain_text;
+const plainText = getPlainText(getEntities(status.text);
Features
- Add TypeScript definitions
- Map all Fanfou APIs to functions. See https://github.com/fanfoujs/fanfou-sdk-node/blob/main/source/api.ts.
Chore
- Rewrite with TypeScript
- Bump dependencies
v4.2.0
v4.1.0
v4.0.5
v4.0.4
v4.0.3
v4.0.2
v4.0.1
v4.0.0
FANFOU-SDK 4.0 🎉
Here are the changes of fanfou-sdk 4:
- Remove
fakeHttps
option - Drop support for Node.js 4
- Remove built-in sign name module
- Use got instead of request
- Use oauth-1.0a instead of oauth
- Completely async/await
- Throw error on non-200 HTTP status code cases
- Merge
ff.upload()
toff.post()
- Update tests
v3.2.0
New Feature
- 4bd3ddb Add support for OAuth baseString hooks.
Use baseString
hook
const ff = new Fanfou({
consumerKey: '',
consumerSecret: '',
oauthToken: '',
oauthTokenSecret: '',
apiDomain: 'api.example.com',
oauthDomain: 'example.com',
hooks: {
baseString: str => {
return str.replace('example.com', 'fanfou.com');
}
}
});