Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetShareFile ¶
[2014.2.6] 2.从shareinfo获取文件下载地址 POST http://web.cgi.weiyun.com/share_dl.fcg sharekey:79ff0e64bd9c88cbd53a0ae72c14401c uin:756458112 skey: fid:bdbc4714-b322-437b-87b3-25c978fcfa37 dir: pdir:80a2162d77c92765438ca4ef1d170515 zn:jd-gui.exe os_info:windows browser:chrome ver:12 err_callback:http://www.weiyun.com/web/callback/iframe_share_down_fail.html
RET 302 -> true file download url
func ParseShareKey ¶
从url地址获取sharekey 支持三种格式: 79ff0e64bd9c88cbd53a0ae72c14401c http://url.cn/PVX6FN(或其他短链,需跳转到后者) http://share.weiyun.com/79ff0e64bd9c88cbd53a0ae72c14401c
Types ¶
type ShareInfo ¶
type ShareInfo struct { string `json:"file_id"` FileName string `json:"file_name"` FileSize string `json:"file_size"` } `json:"file_list"` }FileId
func GetShareInfo ¶
[2014.2.6] 1.获取文件信息 GET http://web2.cgi.weiyun.com/wy_share_v2.fcg cmd:view_share g_tk: callback:CALLBACK data:{"req_header":{"cmd":"view_share","main_v":11,"proto_ver":10006,"sub_v":1,"encrypt":0,"msg_seq":1,"source":30111,"appid":30111,"client_ip":"127.0.0.1","token":"4d3754f563ad04a56fece81bbcc83302"},"req_body":{"share_key":"79ff0e64bd9c88cbd53a0ae72c14401c"}} _:1391326126322
RET: try{CALLBACK({"rsp_body":{"createtime":"2013-08-28 12:40:43","dir_list":[],"dlskey":"74c726bfa1e9978207b41e9b312fa5d8709a1c5c7099774009af37429e0c58fd40e9cb52d7b84819","downcnt":54,"file_list":[{"file_id":"bdbc4714-b322-437b-87b3-25c978fcfa37","file_name":"jd-gui.exe","file_size":"719872"}],"note_info":null,"pdir_key":"80a2162d77c92765438ca4ef1d170515","res_type":0,"share_flag":0,"share_key":"79ff0e64bd9c88cbd53a0ae72c14401c","sharename":"jd-gui.exe","short_url":"http://url.cn/PVX6FN","show_store":true,"storecnt":0,"uin":756458112,"viewcnt":87},"rsp_header":{"ret":0}})}catch(e){};