Class: Wechat::Core::TinyLink
- Inherits:
-
Object
- Object
- Wechat::Core::TinyLink
- Defined in:
- lib/wechat/core/tiny_link.rb
Class Method Summary collapse
Class Method Details
.create(access_token, link) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/wechat/core/tiny_link.rb', line 7 def self.create(access_token, link) = ::JSONClient.new.post "https://api.weixin.qq.com/cgi-bin/shorturl?access_token=#{access_token}", { action: 'long2short', long_url: link } .body end |