Module: Wechat

Defined in:
lib/wechat.rb,
lib/wechat/error.rb,
lib/wechat/request.rb,
lib/wechat/version.rb,
lib/wechat/response.rb,
lib/wechat/data_object.rb,
lib/wechat/access_token.rb,
lib/wechat/local_resource.rb,
lib/wechat/data_objects/menu.rb,
lib/wechat/data_objects/media.rb,
lib/wechat/data_objects/qrcode.rb,
lib/wechat/data_objects/message.rb,
lib/wechat/data_objects/follower.rb,
lib/wechat/data_objects/broadcast.rb

Defined Under Namespace

Classes: AccessToken, BadRequest, Broadcast, DataObject, Error, Follower, InternalServerError, LocalResource, Media, Menu, Message, Qrcode, Request, Response, Unauthorized

Constant Summary collapse

VERSION =
"0.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.access_tokenObject

Returns the value of attribute access_token.



38
39
40
# File 'lib/wechat.rb', line 38

def access_token
  @access_token
end

.api_appidString

Returns Obtained in WeChat Account.

Returns:

  • (String)

    Obtained in WeChat Account



38
# File 'lib/wechat.rb', line 38

attr_accessor :api_endpoint, :file_endpoint, :api_appid, :api_appsecret,:access_token

.api_appsecretString

Returns Obtained in WeChat Account.

Returns:

  • (String)

    Obtained in WeChat Account



38
# File 'lib/wechat.rb', line 38

attr_accessor :api_endpoint, :file_endpoint, :api_appid, :api_appsecret,:access_token

.api_endpointString

Returns Base URL for WeChat API. default: api.weixin.qq.com/cgi-bin.

Returns:



38
39
40
# File 'lib/wechat.rb', line 38

def api_endpoint
  @api_endpoint
end

.file_endpointString

Returns Base URL for WeChat Media API. default: file.api.weixin.qq.com/cgi-bin.

Returns:



38
# File 'lib/wechat.rb', line 38

attr_accessor :api_endpoint, :file_endpoint, :api_appid, :api_appsecret,:access_token

Class Method Details

.configure {|_self| ... } ⇒ Object

Set configuration options using a block

Yields:

  • (_self)

Yield Parameters:

  • _self (Wechat)

    the object that the method was called on



51
52
53
# File 'lib/wechat.rb', line 51

def configure
  yield self
end