KO
|
EN
gitlite — search
Search
#python
#javascript
#react
#reactjs
#hacktoberfest
#aws
#css
#c
#blockchain
#ethereum
#unity
#deep-learning
wx-nba-api
★ 39
Open GitHub ↗
wx-nba-api for wechat by php
Download README (.md)
Explore Similar Repositories
TheoriesAndDataStructures
:
Showing how some simple mathematical theories naturally give rise to some common data-structures
lattepanda-mainline-4.11
:
Mainline Linux Kernel version 4.12.0-rc1 for LattePanda
kirby-autofocus
:
Content aware image cropping for Kirby. Kirby 2 and 3.
Ads
:
个人轻量级Adblock广告规则
GenericDataSource
:
Generic Data Source in Swift.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
wx-nba-api
?
Download (.md)
# wx-nba-api wx-nba-api 是为nba小程序[wx-nba](https://github.com/ecitlm/wx-nba)提供的api接口、抓取其他网站NBA新闻直播、球队、球员数据抓取整理 * 拦截器, * 接口签名校验、 接口服务列表 > 如果熟悉`php`,可以下载项目代码自己部署 [在线地址:](http://wxapp.it919.cn/wx/listAllApis.php) http://wxapp.it919.cn/wx/listAllApis.php  #### 关于接口签名问题 * 接口请求签名,客户端与服务端约定好一个`appkey` * 排除签名参数(sign和接口的service) * 将剩下的全部参数和appkey,按参数名字进行字典升序排序 * 将排序好的参数,全部用字符串拼接起来 * 进行md5运算,生成签名`sign` `appkey`可以在`Config/sys.php`中配置 ``` 'appkey' => '你设定的秘钥', ``` __关于接口的时间戳参数问题__ `timestamp` 用来保存接口一次请求的时效性,时间戳参数传递客户端当前的时间戳给服务端、服务端将该时间戳与服务器的时间进行对比,当两个时间戳的差距大于300S时, 提示接口请求超时,以保证其他人抓取改接口能重复使用 框架通过过滤器可以设置签名 sign 白名单、一些不需要设置签名的接口可以在`app.php`中配置 ```php <?php return array( /** * 应用接口层的统一参数说 */ 'apiCommonRules' => array( 'sign' => array('name' => 'sign', 'require' => true), 'timestamp' => array('name'=>'timestamp', 'type'=>'string', 'require'=>false, 'desc'=>'时间戳参数') ), /** * 不需要带签名的接口 */ 'apiFilterRules' => array( 'Index.index', 'Nba.img', 'Nba.website', ), /** * 需要带Token的接口 */ 'apiTokenRules' => array( 'User.center', 'User.wallet' ), ); ```