\app\common\library\wechat\liveRoom

微信小程序直播接口 Class Room

Summary

Methods
Properties
Constants
__construct()
getError()
getLiveRoomList()
No public properties found
No constants found
setConfig()
doLogs()
getAccessToken()
get()
post()
jsonEncode()
jsonDecode()
$appId
$appSecret
$error
N/A
No private methods found
No private properties found
N/A

Properties

$appId

$appId : 

Type

$appSecret

$appSecret : 

Type

$error

$error : 

Type

Methods

__construct()

__construct(  $appId = null,   $appSecret = null) 

构造函数 WxBase constructor.

Parameters

$appId
$appSecret

getError()

getError() : mixed

返回错误信息

Returns

mixed

getLiveRoomList()

getLiveRoomList() 

微信小程序直播-获取直播房间列表接口 api文档: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/live-player-plugin.html

Throws

\app\common\exception\BaseException

setConfig()

setConfig(  $appId = null,   $appSecret = null) 

Parameters

$appId
$appSecret

doLogs()

doLogs(  $values) : boolean|integer

写入日志记录

Parameters

$values

Returns

boolean|integer

getAccessToken()

getAccessToken() : mixed

获取access_token

Throws

\app\common\exception\BaseException

Returns

mixed

get()

get(string  $url) : string

模拟GET请求 HTTPS的页面

Parameters

string $url

请求地址

Returns

string —

$result

post()

post(  $url, array  $data = array(), boolean  $useCert = false, array  $sslCert = array()) : mixed

模拟POST请求

Parameters

$url
array $data
boolean $useCert
array $sslCert

Returns

mixed

jsonEncode()

jsonEncode(  $data) : string

数组转json

Parameters

$data

Returns

string

jsonDecode()

jsonDecode(  $json) : mixed

json转数组

Parameters

$json

Returns

mixed