Skip to content

Commit

Permalink
Merge pull request #259 from yuanxinyu/master
Browse files Browse the repository at this point in the history
bugfix: short_url to shorturl
  • Loading branch information
Eric-Guo authored May 8, 2019
2 parents 40d701c + aa6ff61 commit cdcd3a3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@

* Fix when access_token failed lead ticket can not refresh problem.
* Default duration should be 1 hours instead of 0 seconds for wechat_oauth2.
* New short_url allowing convert from long URL to short.
* New shorturl allowing convert from long URL to short.

## v0.7.13 (released at 5/14/2016)

Expand Down
2 changes: 1 addition & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ Wechat Public Account commands:
wechat qrcode_create_limit_scene [SCENE_ID_OR_STR] # 请求永久二维码
wechat qrcode_create_scene [SCENE_ID_OR_STR, EXPIRE_SECONDS] # 请求临时二维码
wechat qrcode_download [TICKET, QR_CODE_PIC_PATH] # 通过ticket下载二维码
wechat short_url [LONG_URL] # 长链接转短链接
wechat shorturl [LONG_URL] # 长链接转短链接
wechat tag [TAGID] # 获取标签下粉丝列表
wechat tag_add_user [TAG_ID, OPEN_IDS] # 批量为用户打标签
wechat tag_create [TAGNAME, TAG_ID] # 创建标签
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ Wechat Public Account commands:
wechat qrcode_create_limit_scene [SCENE_ID_OR_STR] # 请求永久二维码
wechat qrcode_create_scene [SCENE_ID_OR_STR, EXPIRE_SECONDS] # 请求临时二维码
wechat qrcode_download [TICKET, QR_CODE_PIC_PATH] # 通过ticket下载二维码
wechat short_url [LONG_URL] # 长链接转短链接
wechat shorturl [LONG_URL] # 长链接转短链接
wechat tag [TAGID] # 获取标签下粉丝列表
wechat tag_add_user [TAG_ID, OPEN_IDS] # 批量为用户打标签
wechat tag_create [TAGNAME, TAG_ID] # 创建标签
Expand Down
6 changes: 3 additions & 3 deletions bin/wechat
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,9 @@ class App < Thor
puts wechat_api.qrcode_create_limit_scene(scene_id_or_str)
end

desc 'short_url [LONG_URL]', '长链接转短链接'
def short_url(long_url)
puts wechat_api.short_url(long_url)
desc 'shorturl [LONG_URL]', '长链接转短链接'
def shorturl(long_url)
puts wechat_api.shorturl(long_url)
end

desc 'customservice_getonlinekflist', '获取在线客服接待信息'
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/wechat/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@

describe '#shorturl' do
shorturl_result = { errcode: 0, errmsg: 'ok',
short_url: 'http://w.url.cn/s/AvCo6Ih' }
shorturl: 'http://w.url.cn/s/AvCo6Ih' }

specify 'will post short_url with access_token and long_url' do
specify 'will post shorturl with access_token and long_url' do
long_url = 'http://wap.koudaitong.com/v2/showcase/goods?alias=128wi9shh&spm=h56083&redirect_count=1'
shorturl_req = { action: 'long2short', long_url: long_url }
expect(subject.client).to receive(:post)
Expand Down

0 comments on commit cdcd3a3

Please sign in to comment.