查詢日期區間內頻道的最大曆史並發人數

接口URL

https://api.hemihome.com/live/v3/channel/statistics/get-max-history-viewer

接口說明

1_-uc蝴蝶版下载、接口用於獲取頻道在某個日期區間的最大曆史並發人數
2-|免费qq空间克隆、接口支持https

支持格式

JSON

請求方式

GET

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取-_韩恩典图片,在直播係統登記的appId
timestamp long 當前13位毫秒級時間戳-||众益足彩彩票,3分鍾內有效
sign string 簽名|导电铝浆,為32位大寫的MD5值
channelId int 頻道號
startTime long 開始日期13位毫秒級時間戳
endTime long 結束日期13位毫秒級時間戳

響應成功JSON示例---95598网上营业厅:

{
    "code": 200, 
    "status": "success", 
    "message": "", 
    "data": 0
}

響應失敗JSON示例|_168彩票值得玩吗:

未輸入appId

{
    "code": 400,
    "status": "error",
    "message": "appId is required.",
    "data": ""
}

appId不正確

{
    "code": 400,
    "status": "error",
    "message": "application not found.",
    "data": ""
}

時間戳錯誤

{
    "code": 400,
    "status": "error",
    "message": "invalid timestamp.",
    "data": ""
}

簽名錯誤

{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}

頻道號格式錯誤

{
  "code": 400, 
  "status": "error", 
  "message": "param is not digit: dsadasd", 
  "data": ""
}

日期範圍錯誤

{
  "code": 400, 
  "status": "error", 
  "message": "date range error", 
  "data": ""
}

字段說明

參數名 說明
code 響應代碼||致青春 台词,成功為200|-_1分钟贷款,失敗為400-_图标猜成语,簽名錯誤為401|优点彩票能赚钱吗,異常錯誤500
status 成功為success__01彩票官方APP,失敗為error
message 錯誤時為錯誤提示消息
data 日期區間內最大的曆史並發人數

php請求示例

<?php
//引用config.php
include 'config.php';

$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'channelId' => 195770,
  'startTime' => 1546272000000,
  'endTime' => 1548950400000
);

//生成sign
$sign = getSign($params); //詳細查看config.php文件的getSign方法
$params['sign'] = $sign;

$url = "http://api.hemihome.com/live/v3/channel/statistics/get-max-history-viewer?".http_build_query($params);

$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, 0);
$res = curl_exec($curl);
curl_close($curl);

echo $res;
?>

簽名規則(config.php文件代碼查看)

http://dev.hemihome.com/2018/liveproduct/l-api/rule/sign/

以上內容是否對您有幫助_野兽婆婆?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

添加點播視頻作為直播回放

接口URL

http://api.hemihome.com/live/v3/channel/playback/add

接口說明

1_-掌上彩票app苹果版、作用_-京东商城网化妆品:添加賬號對應的點播視頻作為直播頻道下的回放視頻|_水立方图片。
2__众彩国际送彩金、接口支持https協議

支持格式

JSON

請求方式

POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取_|广州火车北站,在直播係統登記的appId
timestamp string 當前13位毫秒級時間戳|_魔法龙虾盒,3分鍾內有效
channelId int 頻道號
vid string 要添加為回放的的點播視頻
sign string 簽名---36元彩票赚钱,32位大寫MD5值
setAsDefault string 添加到回放列表中的位置|不丹王后,Y (回放列表中置頂)--|柳州音乐网,N 回放列表中置底雪橇皮大衣,不傳默認為 N

響應成功JSON示例---长沙友谊商店招聘:

{
    "code": 200,
    "status": "success",
    "message": "",
    "data": {
        "videoId": "bd75a9c155",
        "videoPoolId": "8205ac89d3981cc8070eef326039527f",
        "userId": "8205ac89d3",
        "channelId": 108888,
        "title": "123",
        "firstImage": "8205ac89d3/f/8205ac89d3981cc8070eef326039527f_0.jpg",
        "duration": "00:00:30",
        "myBr": "3",
        "qid": null,
        "seed": 1,
        "ordertime": 0,
        "createdTime": 1548409750793,
        "lastModified": 1548409750793,
        "rank": 1,
        "asDefault": "N",
        "url": "http://hls.videocc.net/source/8205ac89d3/f/8205ac89d3981cc8070eef326039527f_3.mp4",
        "channelSessionId": null,
        "mergeInfo": null,
        "status": "Y",
        "fileUrl": null,
        "fileId": null,
        "startTime": "",
        "liveType": null
    }
}

字段說明

參數名 說明
status 響應狀態
data 響應結果
message 異常錯誤信息 |
videoId 直播係統生成的id
videoPoolId 點播視頻vid
userId 點播後台用戶id
channelId 回放視頻對應的直播頻道id
title 視頻標題
firstImage 視頻首圖
duration 視頻長度
myBr 默認視頻的播放清晰度---九九归一打一生肖,1為流暢|-|2014新股发行一览表,2為高清|-迟重瑞简历,3為超清
qid 訪客信息收集id
seed 視頻加密狀態--|威海卫生365,1表示為加密狀態_--易中彩票代玩账号兼职,0為非加密
createdTime 添加為回放視頻的日期
lastModified 視頻最後修改日期
asDefault 是否為默認播放視頻__106官网彩票怎么下,值為Y/N(已棄用)
url 視頻播放地址-_|361娱乐平台用户登录,注__k mic:如果視頻為加密視頻|-芙蓉国水鱼城,則此地址無法訪問
channelSessionId 用於PPT請求數據芜湖文化馆,與PPT直播的回放相關|||纳税人管理码是什么,普通直播回放值為null
mergeInfo 視頻合並信息
startTime 直播開始時間
liveType 回放視頻的場景類型

php請求示例

<?php

//引用config.php
include 'config.php';

//接口需要的參數(非sign)賦值
$appId = "xxxx";
$channelId = "xxx";
$vid = "xxxxxxxx";
$setAsDefault = "Y";

$params = array(
    'appId'=>$appId,
    'channelId'=>$channelId,
    'vid'=>$vid,
    'setAsDefault'=>$setAsDefault
  );

//生成sign
$sign = getSign($params); //詳細查看config.php文件的getSign方法

//生成sign
$sign = getSign($params); //詳細查看config.php文件的getSign方法
$params['sign'] = $sign;

$url = "http://api.hemihome.com/live/v3/channel/playback/add?".http_build_query($params);

$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, 0);
$res = curl_exec($curl);
curl_close($curl);

echo $res;
?>

簽名規則(config.php文件代碼查看)

http://dev.hemihome.com/2018/liveproduct/l-api/rule/sign/

以上內容是否對您有幫助|英烈寄语?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

問卷設置

接口URL

https://api.hemihome.com/live/v3/channel/questionnaire/add-edit-questionnaire

接口說明

1-|qq空间克隆代码、接口用於編輯或添加問卷信息|_-2m牛蛙彩票开奖直,為全量增加或修改
2|-|财经郎眼 余额宝、接口支持https

支持格式

JSON

請求方式

POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取_-|2m高手交流群,在直播係統登記的appId
timestamp long 當前13位毫秒級時間戳-|_笔秀素材网,3分鍾內有效
sign string 簽名-|难报三春晖ppt,為32位大寫的MD5值
channelId string 頻道號
questionnaireId string 問卷id,修改問卷時需要
questionnaireTitle string 問卷標題
questions array 題目數組
questions[].questionId string 題目id--注册送彩彩金网站,修改問卷時需要傳
questions[].name string 題目
questions[].type string 題目類型,R為單選_-android java模拟器,C為多選_-_仙剑5破解吧,Q為問答
questions[].scoreEnabled string 題目是否需要評分--|lb是什么单位,Y為需要||-2019手机看快开奖结果,N為不需要
questions[].answer string 需要評分的選擇題才有答案-|青岛城管强拆军区大院视频,填入對應選項序號-|出售桂花树,如-_|篱笆墙外百度影音:A或AB
questions[].required string 題目是否為必答-||聊斋奇女子之小谢,Y為必答-_亿博国际注册,N為非必答
questions[].options array 題目為單選題或多選題為必填__奶妈论坛邀请码,選項數組下標0-9對應答案A-J
questions[].options[] string 選項描述

注|-苏州红星美凯龙招聘:這裏的channelId,appId,timestamp,sign必須通過url傳參-|_11选5彩票自动分析软件,json數據通過請求體傳參_--最新上映的电影有哪些,如:

https://api.hemihome.com/live/v3/channel/questionnaire/add-edit-questionnaire?channelId={{channelId}}&appId={{appId}}&timestamp={{timestamp}}&sign={{sign}}

請求體json拚接

{
  "questionnaireId": "f8v53d83qe",
  "questionnaireTitle": "問卷標題", 
  "questions": [
    {
      "questionId": "feqfr13ftz", 
      "name": "題目名稱", 
      "type": "R", 
      "answer": "A", 
      "scoreEnabled": "Y", 
      "score": 10, 
      "required": "Y", 
      "options": [
        "選項1", 
        "選項2", 
        "選項3"
      ]
    }
  ]
}

響應成功JSON示例|_|耳科466:

{
  "code": 200, 
  "status": "success", 
  "message": "", 
  "data": {
    "questionnaireId": "f8v3visks0", 
    "questionIds": [
      "3ff650e4d4"
    ]
  }
}

響應失敗JSON示例|||红罂粟 剧情:

未輸入appId

{
    "code": 400,
    "status": "error",
    "message": "appId is required.",
    "data": ""
}

appId不正確

{
    "code": 400,
    "status": "error",
    "message": "application not found.",
    "data": ""
}

時間戳錯誤

{
    "code": 400,
    "status": "error",
    "message": "invalid timestamp.",
    "data": ""
}

簽名錯誤

{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}

頻道號格式錯誤

{
  "code": 400, 
  "status": "error", 
  "message": "param is not digit: dsadasd", 
  "data": ""
}

字段說明

參數名 說明
code 響應代碼-|2628彩票网页版,成功為200-2m彩票2m永久免费彩图,失敗為400_-永胜国际怎么样,簽名錯誤為401_|-神州行大众卡,異常錯誤500
status 成功為success-|qq帅网名,失敗為error
message 錯誤時為錯誤提示消息
data 成功響應時為問卷和題目id
data.questionnaireId 問卷id
data.questionIds[] 題目的id數組

Java請求示例

import com.live.util.EncryptionUtils;
import org.apache.http.HttpEntity;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

import java.io.IOException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Demo {

    private static RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(15000).setConnectTimeout(15000)
            .setConnectionRequestTimeout(15000).build();

    public static void main(String[] args) {

        String url = "https://api.hemihome.com/live/v3/channel/questionnaire/add-edit-questionnaire";
        int channelId = 206204;
        String appId = "f018j7iirt";
        String key = "96651acd43e04cc8a94a1cfa60cec909";
        Map<String, String> map = new HashMap<>();
        long timestamp = System.currentTimeMillis();
        map.put("appId", appId);
        map.put("timestamp", String.valueOf(timestamp));
        map.put("channelId", String.valueOf(channelId));

        String sign = getSign(map, key);
        map.put("sign", sign);
        String body = "{\"questionnaireTitle\":\"問卷標題\",\"questions\":[{\"questionId\":null,\"name\":\"題目名稱\"," +
                "\"type\":\"R\",\"answer\":\"A\",\"scoreEnabled\":\"Y\",\"score\":10,\"required\":\"Y\"," +
                "\"options\":[\"選項1\",\"選項2\",\"選項3\"]}],\"questionnaireId\":null}";
        String content = sendHttpPost(url, map, body);
        System.out.println(content);

    }

    /**
     * 發送 post請求
     * @param httpUrl 地址
     * @param maps 參數
     */
    public static String sendHttpPost(String httpUrl, Map<String, String> maps, String body) {
        StringBuilder url = new StringBuilder();
        url.append(httpUrl).append("?");
        for (Map.Entry<String, String> map : maps.entrySet()) {
            url.append(map.getKey()).append("=").append(map.getValue()).append("&");
        }
        String urlStr = url.toString().substring(0, url.length() - 1);
        // 創建httpPost
        HttpPost httpPost = new HttpPost(urlStr);
        try {
            StringEntity entity = new StringEntity(body, Charset.forName("UTF-8"));
            httpPost.setEntity(entity);
        } catch (Exception e) {
            // ...
        }
        return sendHttpPost(httpPost);
    }

    /**
     * 發送Post請求
     * @param httpPost
     * @return
     */
    private static String sendHttpPost(HttpPost httpPost) {
        CloseableHttpClient httpClient = null;
        CloseableHttpResponse response = null;
        HttpEntity entity;
        String responseContent = null;
        try {
            // 創建默認的httpClient實例.
            httpClient = HttpClients.createDefault();
            httpPost.setConfig(requestConfig);
            // 執行請求
            response = httpClient.execute(httpPost);
            entity = response.getEntity();
            responseContent = EntityUtils.toString(entity, "UTF-8");
        } catch (Exception e) {
            // ...
        } finally {
            try {
                // 關閉連接,釋放資源
                if (response != null) {
                    response.close();
                }
                if (null != httpPost) {
                    httpPost.releaseConnection();
                }
                if (httpClient != null) {
                    httpClient.close();
                }
            } catch (IOException e) {
                // ...
            }
        }
        return responseContent;
    }

    /**
     * 根據map裏的參數構建加密串
     * @param map
     * @param secretKey
     * @return
     */
    protected static String getSign(Map<String, String> map, String secretKey) {
        Map<String, String> params = paraFilter(map);
        // 處理參數-_-职工娱乐活动,計算MD5哈希值
        String concatedStr = concatParams(params);
        String plain = secretKey + concatedStr + secretKey;
        String encrypted = EncryptionUtils.md5Hex(plain);

        // 32位大寫MD5值
        return encrypted.toUpperCase();
    }

    /**
     * 對params根據key來排序並且以key1=value1&key2=value2的形式拚接起來
     * @param params
     * @return
     */
    private static String concatParams(Map<String, String> params) {
        List<String> keys = new ArrayList<>(params.keySet());
        Collections.sort(keys);

        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < keys.size(); i++) {
            String key = keys.get(i);
            String value = params.get(key);

            sb.append(key).append(value);
        }

        return sb.toString();
    }

    /**
     * 除去數組中的空值和簽名參數
     * @param sArray 簽名參數組
     * @return 去掉空值與簽名參數後的新簽名參數組
     */
    private static Map<String, String> paraFilter(Map<String, String> sArray) {

        Map<String, String> result = new HashMap<>();

        if (sArray == null || sArray.size() <= 0) {
            return result;
        }

        for (String key : sArray.keySet()) {
            String value = sArray.get(key);
            if (value == null || value.equals("") || key.equalsIgnoreCase("sign")
                    || key.equalsIgnoreCase("sign_type")) {
                continue;
            }
            result.put(key, value);
        }

        return result;
    }

}

php請求示例

<?php
//引用config.php
include 'config.php';

$params = array(
    'appId' => $appId,
    'timestamp' => $timestamp,
    'channelId' => 206204
);

//生成sign
$sign = getSign($params); //詳細查看config.php文件的getSign方法
$params['sign'] = $sign;

$url = "https://api.hemihome.com/live/v3/channel/questionnaire/add-edit-questionnaire?".http_build_query($params);
$json = '{
  "questionnaireTitle": "問卷標題", 
  "questions": [
    {
      "questionId": null, 
      "name": "題目名稱", 
      "type": "R", 
      "answer": "A", 
      "scoreEnabled": "Y", 
      "score": 10, 
      "required": "Y", 
      "options": [
        "選項1", 
        "選項2", 
        "選項3"
      ]
    }
  ], 
  "questionnaireId": null
}';

function post($url, $post_data = '', $timeout = 5){
    $ch = curl_init();
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_POST, 1);
    if($post_data != ''){
       curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    }

    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Content-Length: ' . strlen($post_data)));
    $file_contents = curl_exec($ch);
    curl_close($ch);
    return $file_contents;
}

echo post($url,$json);
?>

簽名規則(config.php文件代碼查看)

http://dev.hemihome.com/2018/liveproduct/l-api/rule/sign/

以上內容是否對您有幫助-_曼联正品球衣?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

查詢頻道的回放開關狀態

接口URL

https://api.hemihome.com/live/v3/channel/playback/get-enabled

接口說明

1|-|镶嵌栏开启装置、接口用於獲取頻道的回放開關
2-|搜同白袜子、接口支持https

支持格式

JSON

請求方式

GET

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取|云顶注册送25,在直播係統登記的appId
timestamp long 13位當前時間戳
sign string 簽名值
channelId int 頻道號--038彩票软件是正规的吗,不傳該參數為獲取全局設置

響應成功JSON示例才子骂小花:

{
  "code": 200, 
  "status": "success", 
  "message": "", 
  "data": "Y"
}

響應失敗JSON示例-_空间彩色留言代码:

未輸入appId

{
    "code": 400,
    "status": "error",
    "message": "appId is required.",
    "data": ""
}

appId不正確

{
    "code": 400,
    "status": "error",
    "message": "application not found.",
    "data": ""
}

時間戳錯誤

{
    "code": 400,
    "status": "error",
    "message": "invalid timestamp.",
    "data": ""
}

簽名錯誤

{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}

頻道號格式錯誤

{
  "code": 400, 
  "status": "error", 
  "message": "param is not digit: dsadasd", 
  "data": ""
}

字段說明

參數名 說明
code 響應代碼|_-中国梦想秀圆梦专场,成功為200-106福利彩票安卓,失敗為400_|快乐女声报名,簽名錯誤為401|-锅炉控制箱,異常錯誤500
status 成功為success_-宜宾大恒影院,失敗為error
message 錯誤時為錯誤提示消息
data 成功響應時為回放開關__花儿乐队解散演唱会,Y(開啟)_|江苏盐城技师学院、N(關閉)

php請求示例

<?php
//引用config.php
include '/srv/http/config.php';
$channelId = '要查詢的頻道號';
$params = array(
  'appId' => $appId,
  'channelId' => $channelId,
  'timestamp' => $timestamp
);

//生成sign
$sign = getSign($params); //詳細查看config.php文件的getSign方法
$params['sign'] = $sign;

$url = "http://api.hemihome.com/live/v3/channel/playback/get-enabled?".http_build_query($params);

$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_URL, $url);
$res = curl_exec($curl);
curl_close($curl);

echo $res;
?>

簽名規則(config.php文件代碼查看)

http://dev.hemihome.com/2018/liveproduct/l-api/rule/sign/

以上內容是否對您有幫助-沈绛红?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

問卷結果查詢API

接口URL

https://api.hemihome.com/live/v3/channel/questionnaire/answer-records

接口說明

1|-奥特曼最新电影、接口用於查詢直播問卷的答題結果及統計
2|__乐清公立寄宿学校、接口支持https

支持格式

JSON

請求方式

GET

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取__盈博彩票是正规公司么,在直播係統登記的appId
timestamp long 當前13位毫秒級時間戳_秦国赵弋,3分鍾內有效
sign string 簽名|_-仲博最新版下载,為32位大寫的MD5值
channelId int 頻道號
startDate string 開始時間-_xiannuhu,格式-_-狼行天下三轮车:2018-12-10
endDate string 結束時間_哈乐士,格式|_|雪见图片:2018-12-10

響應成功JSON示例_-_广场娱乐项目:

{
"code": 200,
"status": "success",
"message": "",
"data": [
{
"questionnaireId": "f7g2gtgtsd",
"questionnaireTitle": "ttt",
"questionStats": {
"questions": [
{
"questionId": "f7g2gtgtt9",
"score": 10,
"totalScore": 10,
"total": 2,
"correctCount": 1,
"d": 0,
"e": 0,
"f": 0,
"h": 0,
"i": 0,
"j": 0,
"c": 0,
"a": 1,
"b": 1,
"g": 0
},
{
"questionId": "f7g2gtgtyg",
"score": 10,
"totalScore": 10,
"total": 2,
"correctCount": 1,
"d": 0,
"e": 0,
"f": 0,
"h": 0,
"i": 0,
"j": 0,
"c": 0,
"a": 1,
"b": 1,
"g": 0
}
],
"total": 2
},
"users": [
{
"viewerId": "1544406042082",
"nickname": "廣州觀眾/98347",
"totalScore": 20,
"answers": [
{
"questionId": "f7g2gtgtt9",
"questionName": "a",
"answer": "A",
"score": 10,
"type": "R"
},
{
"questionId": "f7g2gtgtyg",
"questionName": "b",
"answer": "A",
"score": 10,
"type": "R"
}
]
},
{
"viewerId": "oL0En04rCbHNSNdey_rFMAkLT-Ps",
"nickname": "ilyq69",
"totalScore": 0,
"answers": [
{
"questionId": "f7g2gtgtt9",
"questionName": "a",
"answer": "B",
"score": 0,
"type": "R"
},
{
"questionId": "f7g2gtgtyg",
"questionName": "b",
"answer": "B",
"score": 0,
"type": "R"
}
]
}
]
}
]
}

響應失敗JSON示例--_2018生肖歇后语1一153:

未輸入appId

{
    "code": 400,
    "status": "error",
    "message": "appId is required.",
    "data": ""
}

appId不正確

{
    "code": 400,
    "status": "error",
    "message": "application not found.",
    "data": ""
}

時間戳錯誤

{
    "code": 400,
    "status": "error",
    "message": "invalid timestamp.",
    "data": ""
}

簽名錯誤

{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}

頻道號格式錯誤

{
  "code": 400, 
  "status": "error", 
  "message": "param is not digit: dsadasd", 
  "data": ""
}

字段說明

參數名 說明
code 響應代碼_-盈彩彩票苹果下载,成功為200||-鹿氏断食法,失敗為400|||2628彩票登录网站,簽名錯誤為401|云顶娱乐彩票如何注册,異常錯誤500(http狀態碼也跟code相同)
status 成功為success__|诸葛亮哭周瑜歇后语,失敗為error
message 錯誤時為錯誤提示消息
data 成功時||永盛彩彩票网靠谱吗,返回用戶答題結果及各個題目的統計信息--|易旺彩票提现最多多少,是個數組
questionnaireId 問卷ID_-美生美时,string
questionnaireTitle 問卷名稱|云霄门,string
questionStats 問卷下各個問題的答題統計
questionStats.total 題目的答題人數|-2012年江苏高考数学试卷,int
questionStats.questions 題目的答題統計信息-|_卓易彩票暂停服务,數組[]
questionStats.questions[].questionId 題目ID,string
questionStats.questions[].questionName 題目名稱,string
questionStats.questions[].score 題目分數,int
questionStats.questions[].totalScore 題目的總得分,int
questionStats.questions[].correctCount 題目的答對人數,int
questionStats.questions[].a-g 選擇項a到g分別的答題人數,int
users 觀看端提交答題的信息
users[].viewerId 提交問卷的用戶ID||-青岛教育人事网,string
users[].nickname 提交問卷的用戶昵稱___印度电视剧新娘第四部,string
users[].totalScore 提交問卷的用戶的總得分_|超级psd502,int
users[].answers[] 用戶每道題目的答題情況_-_青岛黄岛论坛,數組 []
users[].answers[].questionId 題目ID_亿客隆彩票网站,string
users[].answers[].questionName 題目名稱--梦幻西游安定坊,string
users[].answers[].answer 提交的題目答案||哈尔滨群力新区房价,string
users[].answers[].score 用戶答題的得分_|气雾剂之家,string
users[].answers[].type 題目的類型|-宋家王朝 喜多郎,string-_远图国际彩票是什么,R 單選題 ,C 多項題 ,Q 問答題

php請求示例

<?php
//引用config.php
include 'config.php';

$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'channelId' => 195770,
  'startDate' => '2018-12-08',
  'endDate' => '2018-12-10'  
);

//生成sign
$sign = getSign($params); //詳細查看config.php文件的getSign方法
$params['sign'] = $sign;

$url = "http://api.hemihome.com/live/v3/channel/questionnaire/answer-record?".http_build_query($params);

$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, 1);
$res = curl_exec($curl);
curl_close($curl);

echo $res;
?>

簽名規則(config.php文件代碼查看)

http://dev.hemihome.com/2018/liveproduct/l-api/rule/sign/

以上內容是否對您有幫助武打电影全集?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

修改菜單排序

接口URL

http://api.hemihome.com/live/v3/channel/menu/update-rank

接口說明

1|锦绣华都业主论坛、作用-东风之眠邵长老在哪:修改直播頻道的菜單的順序
2_村村通卫星、接口支持https協議

支持格式

JSON

請求方式

POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取|-swaymond,在直播係統登記的appId
timestamp string 當前時間的秒級時間戳(13位)
sign string 簽名|道光二十五酒价格,為32位大寫的MD5值
channelId int 頻道號
menuIds string 頻道菜單ID列表---亿客隆彩票怎么坑人,必須是完整的列表(不能多也不能少)_-注册送彩金的彩票平台,表示按該順序排列菜單

操作成功響應示例

{
    "code": 200,
    "status": "success"
    "message": "",
    "data": "success"
}

操作失敗響應示例

簽名錯誤

{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}

缺少參數 menuIds

{
    "code": 400,
    "status": "error"
    "message": "param should not be empty: menuIds",
    "data": ""
}

菜單ID列表錯誤(缺少菜單ID_脸上长钩子,或者有多餘的__北水手机网、錯誤的菜單ID)

{
    "code": 400,
    "status": "error"
    "message": "illegal menu id: menuIds",
    "data": ""
}

響應字段說明

名稱 類型 說明
code string 響應代碼-_mz16男科在线,成功為200--|钻石夜总会主持人,失敗為400||怀柔人力资源招聘网,簽名錯誤為401__移动彩票平台,異常錯誤500
status string 成功為success|_|许宗衡简历,失敗為error
message string 錯誤時為錯誤提示消息

php請求示例

<?php
//引用config.php
include 'config.php';

$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'channelId' => '123456',
  'menuIds' => '123,456'
);

//生成sign
$sign = getSign($params); //詳細查看config.php文件的getSign方法

$params["sign"] = $sign;
$url="http://api.hemihome.com/live/v3/channel/menu/update-rank?".http_build_query($params);

function post($url, $post_data = '', $timeout = 5){
   $ch = curl_init();
   curl_setopt ($ch, CURLOPT_URL, $url);
   curl_setopt ($ch, CURLOPT_POST, 1);
   if($post_data != ''){
      curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
   }

   curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
   curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
   curl_setopt($ch, CURLOPT_HEADER, false);
   curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Content-Length: ' . strlen($post_data)));
   $file_contents = curl_exec($ch);
   curl_close($ch);
   return $file_contents;
}

echo post($url);
?>

java請求示例

package com.live;

import java.io.IOException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.http.HttpEntity;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

import com.live.util.EncryptionUtils;

public class Demo {


    private static RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(15000).setConnectTimeout(15000)
            .setConnectionRequestTimeout(15000).build();

    public static void main(String[] args) {

        String url = "http://api.hemihome.com/live/v3/channel/menu/update-rank";
        String appId = "appId";
        String key = "secretKey";
        Map<String, String> map = new HashMap<>();
        map.put("appId", appId);
        map.put("timestamp", String.valueOf(System.currentTimeMillis()));
        map.put("channelId", "123456");
        map.put("menuIds", "123,456");

        String sign = getSign(map, key);
        map.put("sign", sign);

        String body = "";
        String content = sendHttpPost(url, map, body);
        System.out.println(content);

    }

    /**
     * 發送 post請求
     * @param httpUrl 地址
     * @param maps 參數
     */
    public static String sendHttpPost(String httpUrl, Map<String, String> maps, String body) {
        StringBuilder url = new StringBuilder();
        url.append(httpUrl).append("?");
        for (Map.Entry<String, String> map : maps.entrySet()) {
            url.append(map.getKey()).append("=").append(map.getValue()).append("&");
        }
        String urlStr = url.toString().substring(0, url.length() - 1);

        System.out.println(urlStr);
        // 創建httpPost
        HttpPost httpPost = new HttpPost(urlStr);
        try {
            StringEntity entity = new StringEntity(body, Charset.forName("UTF-8"));
            httpPost.setEntity(entity);
        } catch (Exception e) {
            // ...
        }
        return sendHttpPost(httpPost);
    }

    /**
     * 發送Post請求
     * @param httpPost
     * @return
     */
    private static String sendHttpPost(HttpPost httpPost) {
        CloseableHttpClient httpClient = null;
        CloseableHttpResponse response = null;
        HttpEntity entity;
        String responseContent = null;
        try {
            // 創建默認的httpClient實例.
            httpClient = HttpClients.createDefault();
            httpPost.setConfig(requestConfig);
            // 執行請求
            response = httpClient.execute(httpPost);
            entity = response.getEntity();
            responseContent = EntityUtils.toString(entity, "UTF-8");
        } catch (Exception e) {
            // ...
        } finally {
            try {
                // 關閉連接,釋放資源
                if (response != null) {
                    response.close();
                }
                if (null != httpPost) {
                    httpPost.releaseConnection();
                }
                if (httpClient != null) {
                    httpClient.close();
                }
            } catch (IOException e) {
                // ...
            }
        }
        return responseContent;
    }

    /**
     * 根據map裏的參數構建加密串
     * @param map
     * @param secretKey
     * @return
     */
    protected static String getSign(Map<String, String> map, String secretKey) {
        Map<String, String> params = paraFilter(map);
        // 處理參數_--春暖花开cc 亚洲,計算MD5哈希值
        String concatedStr = concatParams(params);
        String plain = secretKey + concatedStr + secretKey;
        String encrypted = EncryptionUtils.md5Hex(plain);

        // 32位大寫MD5值
        return encrypted.toUpperCase();
    }

    /**
     * 對params根據key來排序並且以key1=value1&key2=value2的形式拚接起來
     * @param params
     * @return
     */
    private static String concatParams(Map<String, String> params) {
        List<String> keys = new ArrayList<>(params.keySet());
        Collections.sort(keys);

        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < keys.size(); i++) {
            String key = keys.get(i);
            String value = params.get(key);

            sb.append(key).append(value);
        }

        return sb.toString();
    }

    /**
     * 除去數組中的空值和簽名參數
     * @param sArray 簽名參數組
     * @return 去掉空值與簽名參數後的新簽名參數組
     */
    private static Map<String, String> paraFilter(Map<String, String> sArray) {

        Map<String, String> result = new HashMap<>();

        if (sArray == null || sArray.size() <= 0) {
            return result;
        }

        for (String key : sArray.keySet()) {
            String value = sArray.get(key);
            if (value == null || value.equals("") || key.equalsIgnoreCase("sign")
                    || key.equalsIgnoreCase("sign_type")) {
                continue;
            }
            result.put(key, value);
        }

        return result;
    }
}

簽名規則(config.php文件代碼查看)

http://dev.hemihome.com/2018/liveproduct/l-api/rule/sign/

以上內容是否對您有幫助-_as3培训?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

刪除指定菜單

接口URL

https://api.hemihome.com/live/v3/channel/menu/delete

接口說明

1|||108娱乐骗局带的人、接口用於刪除指定的頻道菜單_重生之庶女继妻,支持批量
2-_1213金鼎彩票、接口支持https

支持格式

JSON

請求方式

GET

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取--01彩票客服,在直播係統登記的appId
timestamp long 13位當前時間戳
sign string 簽名值
menuIds string 菜單id_|-裙地垫卫生巾,指定多個以英文逗號,分隔

響應成功JSON示例|封丘县政府:

{
  "code": 200, 
  "status": "success", 
  "message": "", 
  "data": 1
}

響應失敗JSON示例|重庆万盛黑山论坛:

未輸入appId

{
    "code": 400,
    "status": "error",
    "message": "appId is required.",
    "data": ""
}

appId不正確

{
    "code": 400,
    "status": "error",
    "message": "application not found.",
    "data": ""
}

時間戳錯誤

{
    "code": 400,
    "status": "error",
    "message": "invalid timestamp.",
    "data": ""
}

簽名錯誤

{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}

menuId分割後為空

{
  "code": 400, 
  "status": "error", 
  "message": "param length is incorrect: menuIds", 
  "data": ""
}

菜單不存在

{
  "code": 400, 
  "status": "error", 
  "message": "illegal menu id: test", 
  "data": ""
}

菜單類型不能刪除

{
  "code": 400, 
  "status": "error", 
  "message": "can't delete special menu type", 
  "data": ""
}

字段說明

參數名 說明
code 響應代碼--亿人娱乐登录csyi,成功為200-|烈女蒋究,失敗為400__-永盛国际手机彩票,簽名錯誤為401___陈诚传,異常錯誤500
status 成功為success__-相逢是首歌简谱,失敗為error
message 錯誤時為錯誤提示消息
data 成功響應時為本次成功刪除的個數

php請求示例

<?php
//引用config.php
include '/srv/http/config.php';

$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'menuIds' => "9991391d9d,ea4375fcfb"
);

//生成sign
$sign = getSign($params); //詳細查看config.php文件的getSign方法
$params['sign'] = $sign;

$url = "http://api.hemihome.com/live/v3/channel/menu/delete?".http_build_query($params);

$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_URL, $url);
$res = curl_exec($curl);
curl_close($curl);

echo $res;
?>

簽名規則(config.php文件代碼查看)

http://dev.hemihome.com/2018/liveproduct/l-api/rule/sign/

以上內容是否對您有幫助___中兴彩票下载?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

直播回放列表排序

接口URL

https://api.hemihome.com/live/v3/channel/playback/sort

接口說明

1_-|金秀贤带你看星星、接口用於排序回放列表_-西洋集团在朝鲜投资的噩梦。
2-|许家印私人飞机、通用參數通過普通url參數傳遞(channelId, timestamp, appId, sign)-_众亿彩票注册,排序參數的json通過請求體的方式傳遞
3__|诺基亚3208c游戏、接口支持https-|沼泽猎手10。

支持格式

JSON

請求方式

POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取__野兽与乡巴佬下载,在直播係統登記的appId
timestamp long 13位當前時間戳
sign string 簽名值
channelId int 頻道號
videoIds string數組 完整回放視頻ID列表,存放在請求體中,請求視頻ID數量必須和回放列表數量一致_360彩票官网走势,且不能少或者缺或者多

響應成功JSON示例_-庆聊:

{
  "code": 200, 
  "status": "success", 
  "message": "", 
  "data": ""
}

響應失敗JSON示例||视频编辑专家6 3:

未輸入appId

{
    "code": 400,
    "status": "error",
    "message": "appId is required.",
    "data": ""
}

appId不正確

{
    "code": 400,
    "status": "error",
    "message": "application not found.",
    "data": ""
}

時間戳錯誤

{
    "code": 400,
    "status": "error",
    "message": "invalid timestamp.",
    "data": ""
}

簽名錯誤

{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}

頻道號格式錯誤

{
  "code": 400, 
  "status": "error", 
  "message": "param is not digit: dsadasd", 
  "data": ""
}

請求體未傳遞videoIds錯誤

{
  "code": 400, 
  "status": "error",
  "message": "param validate error",
  "data": ""
}

數據庫查詢不到回放列表的視頻錯誤

{
  "code": 400,
  "status": "error",
  "message": "playback video list is empty",
  "data": ""
}

回放視頻ID錯誤(請求視頻ID數量必須和回放列表數量一致_塔罗牌占卜大师 tlpnana,且不能少或者缺或者多)

{
  "code": 400,
  "status": "error",
  "message": "playback videoId error",
  "data": ""
}

字段說明

參數名 說明
code 響應代碼|139彩票网官网手机版,成功為200||中国大陆身份证生成器,失敗為400-_讯累看看,簽名錯誤為401_-|2017香港金像奖直播,異常錯誤500
status 成功為success-_果酱汉堡店变态版,失敗為error
message 錯誤時為錯誤提示消息
data 修改成功過時為true

php請求示例

<?php
//引用config.php
include 'config.php';

$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'channelId' => "209796"
);

//生成sign
$sign = getSign($params); //詳細查看config.php文件的getSign方法

$json = '{
    "videoIds": ["dsdadrerwf", "dadadaderr"]
}';

$params["sign"] = $sign;
$url="http://api.hemihome.com/live/live/v3/channel/playback/sort?".http_build_query($params);

function post($url, $post_data = '', $timeout = 5){
   $ch = curl_init();
   curl_setopt ($ch, CURLOPT_URL, $url);
   curl_setopt ($ch, CURLOPT_POST, 1);
   if($post_data != ''){
      curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
   }

   curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
   curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
   curl_setopt($ch, CURLOPT_HEADER, false);
   curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Content-Length: ' . strlen($post_data)));
   $file_contents = curl_exec($ch);
   curl_close($ch);
   return $file_contents;
}

echo post($url,$json);
?>

簽名規則(config.php文件代碼查看)

http://dev.hemihome.com/2018/liveproduct/l-api/rule/sign/

以上內容是否對您有幫助--双世宠妃全集免费观看?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

修改功能開關狀態

接口URL

https://api.hemihome.com/live/v3/channel/switch/update

接口說明

1|-158彩票人工计划、接口用於修改功能開關設置-_www sonyericsson com,可修改全局開關設置或頻道開關設置
2-_|花丸幼稚园gif、接口支持https

支持格式

JSON

請求方式

GET

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取|_板城中学,在直播係統登記的appId
timestamp long 13位當前時間戳
sign string 簽名值
channelId int 頻道號|_0199游戏中心大厅,不傳該參數為獲取全局設置
type string 開關類型
enabled string 開關值_-众盈娱乐违法,Y或N

開關類型

type 描述
isClosePreview 是否關閉係統觀看頁-|-什么叫波推,Y時表示關閉
mobileWatch 是否開啟移動端係統觀看頁
mobileAudio 是否開啟移動端音視頻切換
autoPlay 是否開啟播放器自動播放功能
booking 是否開啟預約功能
redPack 是否開啟紅包功能
shareBtnEnabled 是否開啟分享功能
chat 是否開啟聊天室
closeChaterList 是否關閉在線列表-|-happytogetherfx,Y時表示關閉
consultingMenu 是否開啟谘詢提問
closeDanmu 是否關閉彈幕功能|--调查表作文,Y時表示關閉
praise 是否開啟點讚語功能
welcome 是否開啟歡迎語功能
viewerSendImgEnabled 是否開啟觀眾發送圖片

注|-_苏西 埃米斯:isClosePreview當enabled值為Y時-金桥一景,表示的是關閉係統觀看頁;closeDanmu當enabled值為Y時_-_阿呀,表示的是關閉彈幕;closeChaterList當enabled值為Y時|__中央领导人名单,表示的是關閉在線列表

響應成功JSON示例-_快乐女生报名:

{
  "code": 200, 
  "status": "success", 
  "message": "", 
  "data": true
}

響應失敗JSON示例___黄山天狗望月:

未輸入appId

{
    "code": 400,
    "status": "error",
    "message": "appId is required.",
    "data": ""
}

appId不正確

{
    "code": 400,
    "status": "error",
    "message": "application not found.",
    "data": ""
}

時間戳錯誤

{
    "code": 400,
    "status": "error",
    "message": "invalid timestamp.",
    "data": ""
}

簽名錯誤

{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}

頻道號格式錯誤

{
  "code": 400, 
  "status": "error", 
  "message": "param is not digit: dsadasd", 
  "data": ""
}

字段說明

參數名 說明
code 響應代碼|--skinselect,成功為200_北京男性科建国医院,失敗為400_-苟在松,簽名錯誤為401_湖南中青旅行社,異常錯誤500
status 成功為success--_四川工人日报电子版,失敗為error
message 錯誤時為錯誤提示消息
data 修改成功過時為true

php請求示例

<?php
//引用config.php
include '/srv/http/config.php';

$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'channelId' => '206204',
  'type' => 'viewerSendImgEnabled',
  'enabled' => 'N'
);

//生成sign
$sign = getSign($params); //詳細查看config.php文件的getSign方法
$params['sign'] = $sign;

$url = "http://api.hemihome.com/live/v3/channel/switch/update?".http_build_query($params);

$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_URL, $url);
$res = curl_exec($curl);
curl_close($curl);

echo $res;
?>

簽名規則(config.php文件代碼查看)

http://dev.hemihome.com/2018/liveproduct/l-api/rule/sign/

以上內容是否對您有幫助-_|注册送38元彩票主页?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

查詢功能開關狀態接口

接口URL

https://api.hemihome.com/live/v3/channel/switch/get

接口說明

1_三棱锥性质、接口用於獲取開關設置-_118彩票赢了提现不了,可獲取全局開關設置或頻道開關設置
2-青浦人才、接口支持https

支持格式

JSON

請求方式

GET

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取_助赢软件,在直播係統登記的appId
timestamp long 13位當前時間戳
sign string 簽名值
channelId int 頻道號||小型直升机发动机,不傳該參數為獲取全局設置

響應成功JSON示例_-bl文h:

{
  "code": 200, 
  "status": "success", 
  "message": "", 
  "data": [
    {
      "type": "isClosePreview", 
      "enabled": "N"
    }, 
    {
      "type": "mobileWatch", 
      "enabled": "Y"
    }, 
    {
      "type": "mobileAudio", 
      "enabled": "Y"
    }, 
    {
      "type": "autoPlay", 
      "enabled": "Y"
    }, 
    {
      "type": "booking", 
      "enabled": "Y"
    }, 
    {
      "type": "redPack", 
      "enabled": "Y"
    }, 
    {
      "type": "shareBtnEnabled", 
      "enabled": "Y"
    }, 
    {
      "type": "chat", 
      "enabled": "Y"
    }, 
    {
      "type": "closeChaterList", 
      "enabled": "N"
    }, 
    {
      "type": "consultingMenu", 
      "enabled": "Y"
    }, 
    {
      "type": "closeDanmu", 
      "enabled": "N"
    }, 
    {
      "type": "praise", 
      "enabled": "Y"
    }, 
    {
      "type": "welcome", 
      "enabled": "Y"
    }, 
    {
      "type": "chatPlayBack", 
      "enabled": "Y"
    }, 
    {
      "type": "viewerSendImgEnabled", 
      "enabled": "Y"
    }
  ]
}

響應失敗JSON示例__-nokia5320软件下载:

未輸入appId

{
    "code": 400,
    "status": "error",
    "message": "appId is required.",
    "data": ""
}

appId不正確

{
    "code": 400,
    "status": "error",
    "message": "application not found.",
    "data": ""
}

時間戳錯誤

{
    "code": 400,
    "status": "error",
    "message": "invalid timestamp.",
    "data": ""
}

簽名錯誤

{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}

頻道號格式錯誤

{
  "code": 400, 
  "status": "error", 
  "message": "param is not digit: dsadasd", 
  "data": ""
}

字段說明

參數名 說明
code 響應代碼_-|北镇青网,成功為200|-中考百日誓师誓词,失敗為400_||两根齐入啊受不了了,簽名錯誤為401||网易云音乐网页版,異常錯誤500
status 成功為success_--北京58同城二手车,失敗為error
message 錯誤時為錯誤提示消息
data 成功響應時為當前開關設置項
type 開關類型
enabled 是否已打開開關

注__广州市花都区人事局:isClosePreview當enabled值為Y時|2019香港赛马比赛,表示的是關閉係統觀看頁;closeDanmu當enabled值為Y時-_-新密五个人火了照片,表示的是關閉彈幕;closeChaterList當enabled值為Y時--wow致命一击,表示的是關閉在線列表

php請求示例

<?php
//引用config.php
include '/srv/http/config.php';

$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp
);

//生成sign
$sign = getSign($params); //詳細查看config.php文件的getSign方法
$params['sign'] = $sign;

$url = "http://api.hemihome.com/live/v3/channel/switch/get?".http_build_query($params);

$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_URL, $url);
$res = curl_exec($curl);
curl_close($curl);

echo $res;
?>

簽名規則(config.php文件代碼查看)

http://dev.hemihome.com/2018/liveproduct/l-api/rule/sign/

以上內容是否對您有幫助||白山馆监狱?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...