fanfou-sdk-weapp
Fanfou SDK for WeApp
The package is for WeApp, if you are developing with Node.js, please use fanfou-sdk.
Install
$ npm i fanfou-sdk-weapp
Or either of this below:
- Add this repo as submodule to your project
- Copy the
src
directory to your project
Usage
const Fanfou = // orconst Fanfou = ;
OAuth
const ff = consumerKey: '' consumerSecret: '' oauthToken: '' oauthTokenSecret: ''; ff ;
XAuth
const ff = consumerKey: '' consumerSecret: '' username: '' password: ''; ff ;
Options
consumerKey
: The consumer keyconsumerSecret
: The consumer secretoauthToken
: The OAuth tokenoauthTokenSecret
: The OAuth token secretusername
: The Fanfou usernamepassword
: The Fanfou passwordprotocol
: Set the prototol, default ishttps:
apiDomain
: Set the API domain, default isapi.fanfou.com
oauthDomain
: Set the OAuth domain, default isfanfou.com
hooks
: Hooks allow modifications with OAuth
For more Fanfou API docs, see the Fanfou API doc.
API
ff;ff;ff;ff;
Examples
// OAuthff ; ff ; // Uploadwx; // XAuthff ;
Tips
Use hooks
for your reverse-proxy server
const ff = consumerKey: '' consumerSecret: '' oauthToken: '' oauthTokenSecret: '' apiDomain: 'api.example.com' oauthDomain: 'example.com' hooks: { return str; } ;
Related
- xiaofan - WeApp for Fanfou
- fanta - Another WeApp for Fanfou
- fanfou-sdk-node - Fanfou SDK for Node.js
- fanfou-sdk-browser - Fanfou SDK for browser
License
MIT © LitoMore