weixin-class: Class "weixin"

weixin-classR Documentation

Class "weixin"

Description

To use the APIs of Weixin open platform, you have to register a application first. The open platform will provide a unique App ID and App Secret for every application. You can use these ID and secret to invoke the authorize interface of OAuth2. All the authorization information will be stored in this object of weixin.

Objects from the Class

Objects can be created by calls of the function createWeixin.

Fields

appPath:

Object of class "character". Path of the application folder.

appName:

Object of class "character". Name of the application.

appID:

Object of class "character". ID of the application.

appSecret:

Object of class "character". Secret of the application.

appLatestday:

Object of class "character". Latest day of the application.

oauthToken:

Object of class "character". Token of the oauth.

oauthTime:

Object of class "character". Created time.

oauthLife:

Object of class "numeric". Expected life (in sec) of the oauth.

authURL:

Object of class "character". URL of authorization.

oauthLimits:

Object of class "numeric". Number of oauth limits.

oauthMsg:

Object of class "character". oauth massage.

Methods

expiresIn(byAPI = FALSE):

Will return the expired time in seconds.

authorize(forcelogin = FALSE):

Will do the authorization.

save():

Save the authorization information to file.

list():

List the fields of the object.

show():

Show all the fields of the object.

Author(s)

Jian li <rweibo@sina.com>

Examples

	showClass("weixin")

Lchiffon/Rweixin documentation built on June 14, 2022, 3:04 p.m.