打賞-發送打賞消息

接口URL

http://api.hemihome.com/live/v3/channel/chat/send-reward-msg

接口說明

  1. 用於發送打賞消息
  2. 請求成功後|_345彩票,服務器會向聊天室的用戶廣播打賞消息-_许宗衡简历,詳見直播聊天室API接口
  3. 接口支持https

支持格式

JSON

請求方式

POST

請求參數

參數名 必選 類型 說明
channelId int 頻道ID
appId string 賬號的應用ID--揭刘汉留下多少遗产,在後台的“開發設置”獲取
timestamp long 13位毫秒級時間戳
sign string 簽名|-|山东高考人数,為32位大寫的MD5值
nickname string 打賞者昵稱
avatar string 打賞者頭像
viewerId string 打賞者ID
donateType string 打賞類型-_鲍继荣,取值|优彩网靠谱吗:cash 現金打賞-|约彩彩票什么时候开始,good 道具打賞
content string 打賞內容-|_兔宝宝名字大全:禮物打賞為禮物名稱|_欧莱雅祛疤产品价格,現金打賞為金額
goodImage string 禮物打賞時為禮物圖片_||重庆新闻联播主持人,現金打賞時為空
sessionId string 直播場次ID

響應成功JSON示例|_赞吧问道:

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

響應失敗JSON示例震波女quake:

未輸入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: 輸入的錯誤頻道號",
  "data": ""
}

道具打賞時未提交道具圖片

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

發送失敗

{
    "code": 400,
    "status": "error",
    "message": "send message failure",
    "data": ""
}

字段說明

參數名 說明
code 響應代碼|--英华学校吧,成功為200|__重庆靓车会,失敗為400_-|陈丽华简历,簽名錯誤為403_|_盈彩娱乐骗局,異常錯誤500
status 成功為success-铁路安全保护条例,失敗為error
message 錯誤時為錯誤提示消息
data 暫無作用

請求示例

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

$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'channelId' => "108888",
  'nickname' => "wenen",
  'avatar' => "https://livestatic.videocc.net/uploaded/images/webapp/avatar/default-teacher.png",
  'viewerId' => "123",
  'donateType' => "good",
  'content' => "黃鑽",
  'goodImage' => "http://livestatic.videocc.net/uploaded/images/webapp/channel/donate/06-star.png"
);

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


$url="http://api.hemihome.com/live/v3/channel/chat/send-reward-msg";

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/x-www-form-urlencoded'));
   $file_contents = curl_exec($ch);
   curl_close($ch);
   return $file_contents;
}

$params["sign"] = $sign;
echo post($url,http_build_query($params));
?>

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

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

以上內容是否對您有幫助-||邪恶少年eb的小站?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

抽獎-提交中獎者信息

接口URL

http://api.hemihome.com/live/v3/channel/chat/add-receive-info

接口說明

1_-帅同文学、用於提交中獎者填寫的信息
2||118彩票官方网、隻能成功保存一次觀眾中獎信息
3_-168彩票IOS、中獎信息需在7天內提交保存_-注册送彩金彩票cp,否則會失效
4__-365彩票、接口支持https

支持格式

JSON

請求方式

POST

請求參數

參數名 必選 類型 說明
channelId string 頻道ID
appId string 賬號的應用ID-_淘一站,在後台的“開發設置”獲取
timestamp long 13位毫秒級時間戳
sign string 簽名|-35彩票注册,為32位大寫的MD5值
lotteryId string 抽獎場次ID
winnerCode string 中獎碼
viewerId string 中獎者ID
name string 中獎者姓名
telephone string 中獎者手機號碼

響應成功JSON示例_-兔宝宝名字大全:

{
    "code": 200,
    "status": "success",
    "message": "保存成功",
    "data": ""
}

響應失敗JSON示例-_|160彩票春秋网站:

手機號碼格式錯誤

{
    "code": 400,
    "status": "fail",
    "message": "手機號碼格式錯誤",
    "data": ""
}

重複提交(已經成功提交過中獎信息後則不能再次請求)

{
    "code": 400,
    "status": "fail",
    "message": "請勿重複提交",
    "data": ""
}

中獎碼不存在

{
    "code": 400,
    "status": "fail",
    "message": "中獎碼不存在",
    "data": ""
}

抽獎場次ID錯誤

{
    "code": 400,
    "status": "fail",
    "message": "illegal lottery id: 錯誤的ID",
    "data": ""
}

有參數未提交

{
  "code": 400,
  "status": "error",
  "message": "param should not be empty:未提交的參數名",
  "data": ""
}

字段說明

參數名 說明
code 請求狀態響應碼
status 請求狀態
message 錯誤信息
data 暫無作用

請求示例

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

$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'channelId' => "108888",
  'lotteryId' => "f76did5ldj",
  'viewerId' => "viewerId1231",
  'winnerCode' => "12121212123",
  'name' => "wenwenwen",
  'telephone' => "15625123456"
);

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


$url="http://api.hemihome.com/live/v3/channel/chat/add-receive-info";

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/x-www-form-urlencoded'));
   $file_contents = curl_exec($ch);
   curl_close($ch);
   return $file_contents;
}

$params["sign"] = $sign;
echo post($url,http_build_query($params));
?>

簽名規則(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-|7374小游戏、接口用於編輯或添加問卷信息|-云顶平台,為全量增加或修改
2-_五年陈艾、接口支持https

支持格式

JSON

請求方式

POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取_易中彩票平台,在直播係統登記的appId
timestamp long 當前13位毫秒級時間戳-__郑浩南三级,3分鍾內有效
sign string 簽名__-哈雷摩托报价,為32位大寫的MD5值
channelId string 頻道號
questionnaireId string 問卷id,修改問卷時需要
questionnaireTitle string 問卷標題
questions array 題目數組
questions[].questionId string 題目id||尊彩升级的星彩网APP,修改問卷時需要傳
questions[].name string 題目
questions[].type string 題目類型,R為單選-阜新苏阳不雅视频,C為多選__东莞唐会,Q為問答
questions[].scoreEnabled string 題目是否需要評分_幼儿教师年度工作总结,Y為需要-|-九纵新一团,N為不需要
questions[].answer string 需要評分的選擇題才有答案-_360大乐透专家杀号定胆,填入對應選項序號_|易旺彩票,如|__永城彩票平台:A或AB
questions[].required string 題目是否為必答-13彩票平台,Y為必答||星际2人族大讲堂,N為非必答
questions[].options array 題目為單選題或多選題為必填_|_长虹v60,選項數組下標0-9對應答案A-J
questions[].options[] string 選項描述

注-|_零佣通:這裏的channelId,appId,timestamp,sign必須通過url傳參--主要业绩,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示例-_|城轨网上订票:

{
  "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 響應代碼-|078彩票苹果,成功為200___有好看的僵尸电影吗,失敗為400奄美彩加,簽名錯誤為401|--易富娱乐彩票app,異常錯誤500
status 成功為success-摩托车下乡补贴查询,失敗為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...

問卷結果查詢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 簽名|-168彩票被风控了怎么办,為32位大寫的MD5值
channelId int 頻道號
startDate string 開始時間-_1998分分彩,格式_-魔爪家园:2018-12-10
endDate string 結束時間||-小丑娃娃,格式-_-金贵村:2018-12-10

響應成功JSON示例-_118彩票安装苹果009:

{
"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示例-|赢彩网大发快三邀请码:

未輸入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(http狀態碼也跟code相同)
status 成功為success_-|038彩票是真的不,失敗為error
message 錯誤時為錯誤提示消息
data 成功時_--优博的奶粉好不好,返回用戶答題結果及各個題目的統計信息|-青年文明号创建承诺,是個數組
questionnaireId 問卷ID_--3cp平台上彩下载,string
questionnaireTitle 問卷名稱-|石家庄银泉酒家,string
questionStats 問卷下各個問題的答題統計
questionStats.total 題目的答題人數|||辉县天气2345,int
questionStats.questions 題目的答題統計信息|-|11选5彩票网上购买,數組[]
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 提交問卷的用戶的總得分_-歌手2017第五期,int
users[].answers[] 用戶每道題目的答題情況---青州卫校,數組 []
users[].answers[].questionId 題目ID-_2019年315曝光的净水器,string
users[].answers[].questionName 題目名稱__-青年宫影城,string
users[].answers[].answer 提交的題目答案_happytogetherfx,string
users[].answers[].score 用戶答題的得分_--105彩票真的能获利,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

https://api.hemihome.com/live/v3/channel/checkin/list

接口說明

1_||云顶娱乐合并通知、接口用於分頁查詢頻道號下某一天的簽到記錄
2_|云顶娱乐怎样注册账号、接口支持https

支持格式

JSON

請求方式

GET

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取-_叶彤倩,在直播係統登記的appId
timestamp long 13位當前時間戳
sign string 簽名值
channelId int 頻道號
page int 頁碼-weddingdress歌词,默認為1
pageSize int 每一頁的大小_--skinselect,默認為20
date string 查詢的指定日期众博彩票是黑的,格式為yyyy-MM-dd

響應成功JSON示例|奥斯洁:

{
  "code": 200,
  "status": "success",
  "message": "",
  "data": {
    "pageNumber": 1,
    "totalPages": 1,
    "pageSize": 20,
    "contents": [
      {
        "id": 491,
        "indate": "2018-08-07",
        "userid": "1533622191653",
        "channelId": 100538,
        "time": 1533622526801,
        "timeFormat": "2018-08-07 14:15",
        "nickname": "廣州觀眾/28838"
      },
      {
        "id": 492,
        "indate": "2018-08-07",
        "userid": "1533622191653",
        "channelId": 100538,
        "time": 1533623311065,
        "timeFormat": "2018-08-07 14:28",
        "nickname": "廣州觀眾/28838"
      },
      {
        "id": 493,
        "indate": "2018-08-07",
        "userid": "1533622191653",
        "channelId": 100538,
        "time": 1533636856928,
        "timeFormat": "2018-08-07 18:14",
        "nickname": "廣州觀眾/28838"
      },
      {
        "id": 494,
        "indate": "2018-08-07",
        "userid": "1533607482637",
        "channelId": 100538,
        "time": 1533636856932,
        "timeFormat": "2018-08-07 18:14",
        "nickname": "chromexr"
      },
      {
        "id": 495,
        "indate": "2018-08-07",
        "userid": "1533625048644",
        "channelId": 100538,
        "time": 1533636875744,
        "timeFormat": "2018-08-07 18:14",
        "nickname": "ffxiaoru"
      }
    ]
  }
}

響應失敗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": ""
}

channelId為空

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

channelId為非數字

{
  "code": 400, 
  "status": "error", 
  "message": "param is not number: channelId", 
  "data": ""
}

頻道非法

{
  "code": 403, 
  "status": "error", 
  "message": "illegal channel id: 206240", 
  "data": ""
}

字段說明

參數名 說明
code 響應代碼_|_钚电池,成功為200_|nonono歌词,失敗為400_--106彩票注册,簽名錯誤為401-adsl密码终结者2005,異常錯誤500
status 成功為success-248彩票平台下线,失敗為error
message 錯誤時為錯誤提示消息
data 簽到記錄的分頁數據
pageNumber 頁碼
totalPages 總頁數
pageSize 每一頁大小
contents 簽到記錄數據數組
indate 查詢的簽到日期_|-上海通用aveo,yyyy-MM-dd格式
nickname 昵稱
userid 用戶id
channelId 頻道號
time 簽到的具體時間戳
timeFormat 簽到的格式化詳細日期___云顶国际在线赌场,yyyy-MM-dd HH:mm 格式

php請求示例

<?php

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

//接口URL上變量
$appId = "es2vsst178";
$channelId="223350";
$date="2018-08-08";
$pageSize="20";
$page="1";
//接口需要的參數(非sign)賦值
$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'channelId' => $channelId,
  'page' => $page,
  'pageSize' => $pageSize,
  'date' => $date
);

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

//接口請求url
$url = "https://api.hemihome.com/live/v3/channel/checkin/list?appId=".$appId."&sign=".$sign."&timestamp=".$timestamp."&channelId=".$channelId."&page=".$page."&pageSize=".$pageSize."&date=".$date;

//輸出接口請求結果
echo file_get_contents($url);

?>

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

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

以上內容是否對您有幫助-_艾尔之光雷文一转?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

查詢頻道答題卡答題結果

接口URL

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

接口說明

1|-利玛窦是哪国人、接口用於獲取頻道的答題卡答題結果列表
2|_-拉手网团购ktv、接口支持https

支持格式

JSON

請求方式

GET

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取-|09彩票,在直播係統登記的appId
timestamp long 13位當前時間戳
sign string 簽名值
channelId int 頻道號
startDate string 查詢的開始時間
endDate string 查詢的結束時間

ps|2019年万达广场南阳:開始和結束時間為空的默認查最近7天的數據|_tisdeny。

響應成功JSON示例__中国电信iphone4:

{
    "code": 200,
    "status": "success",
    "message": "",
    "data": [
        {
            "questionId": "f31lrsr9vx",
            "questionTitle": "測試1",
            "answer": "B",
            "total": 1,
            "correctCount": 0,
            "options": [
                {
                    "title": ",,",
                    "count": 1,
                    "percent": "100.00%"
                },
                {
                    "title": "..",
                    "count": 0,
                    "percent": "0.00%"
                }
            ],
            "records": [
                {
                    "viewerId": "1531987278863",
                    "nickname": "廣州觀眾/79713",
                    "answer": "A",
                    "corrent": false
                }
            ]
        },
        {
            "questionId": "f31lr45sjl",
            "questionTitle": "測試1",
            "answer": "A",
            "total": 1,
            "correctCount": 1,
            "options": [
                {
                    "title": "nn",
                    "count": 1,
                    "percent": "100.00%"
                },
                {
                    "title": "m,m",
                    "count": 0,
                    "percent": "0.00%"
                }
            ],
            "records": [
                {
                    "viewerId": "1531987278863",
                    "nickname": "廣州觀眾/79713",
                    "answer": "A",
                    "corrent": false
                }
            ]
        }
    ]
}

響應失敗JSON示例--|众乐彩票输了7000多:

未輸入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": ""
}

channelId為空

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

channelId為非數字

{
  "code": 400, 
  "status": "error", 
  "message": "param is not number: channelId", 
  "data": ""
}

頻道非法

{
  "code": 403, 
  "status": "error", 
  "message": "illegal channel id: 206240", 
  "data": ""
}

字段說明

參數名 說明
code 響應代碼--038彩票APP,成功為200|_电视台标志,失敗為400|_|城市热线,簽名錯誤為401|-寻找皇女的踪迹,異常錯誤500
status 成功為success|-_掌上彩票为什么不能用,失敗為error
message 錯誤時為錯誤提示消息
data 答題結果列表數據
questionId 答題ID
answer 題目的答案
total 答題人數
options 題目選項信息列表
title 選項標題
count 選擇該選項的人數
percent 選擇該選項的人數百分比
records 答題的用戶列表
viewerId 答題的用戶ID
nickname 答題的用戶昵稱
answer 答題的用戶提交的答案
corrent 答題的用戶提交的答案是否正確__-陈丹丹淘宝店:false不正確___皇帝龙之崛起布局,true正確

php請求示例

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

$channelId="206204";

$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'channelId' => $channelId,
  'startDate' => '2018-07-01',
  'endDate' => '2018-07-18'
);

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

$url = "https://api.hemihome.com/live/v3/channel/question/answer-records?".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);
$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/v2/channels/{channelId}/like

接口說明

1|_青年宫ktv、用於實現用戶自開發觀看頁點讚效果-|-106官网彩票客服,通過調用接口可以進行點讚-西安地震了吗,默認每次請求都是一次點讚
2-__掌上彩票手机版、接口內部進行了判斷_上海股市大盘,每個觀眾的點讚間隔1s的限製__诺基亚5238刷机,根據提交的觀眾ID來區分
3-陈锡联将军、如果有需求支持同時點多個讚-|免费刷q币软件,可提交非必填參數times__|28彩票有正规的吗,times最大不能超過30_|黑暗之光伴奏。*如果提交次數為n-__蕉岭网,則需n-1秒才能繼續點讚
4|_雷神2好看吗、接口支持https
5||-山海情缘东方神韵、接口URL中的{channelId}為 頻道ID

支持格式

JSON

請求方式

GET  POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取|_-阿杰路,在直播係統登記的appId
timestamp string 當前13位毫秒級時間戳--凯旋王国官网,3分鍾內有效
sign string 簽名-|_年利率是什么意思,32位大寫MD5值
viewerId string 點讚觀眾的ID
times int 點讚的數目|字谜七则,不能超過30_-_杨幂不照雅全图,提交後在times-1秒後才能再點讚

響應成功JSON示例-雳剑电视剧 全集:

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

響應失敗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": ""
}

未提交viewerID

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

點讚間隔小於1s

{
    "code": 400,
    "status": "error",
    "message": "您的操作過快|-我是歌手第10期排名,請稍後再試",
    "data": ""
}

點讚次數times大於30

{
    "code": 400,
    "status": "error",
    "message": "設置的次數過多_|_搞笑试卷,請稍後再試",
    "data": ""
}

字段說明

參數名 說明
code 請求狀態響應碼
status 請求狀態
message 錯誤信息
data 請求成功時為點讚數-|优游平台登录地址,請求錯誤時為空

php請求示例

<?php

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

//接口需要的參數(非sign)賦值
$channelId = "127075";
$times = 16;
$viewerId = '123123';

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

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

//接口請求url
$url = "http://api.hemihome.com/live/v2/channels/$channelId/like?appId=$appId&timestamp=$timestamp&sign=$sign&viewerId=$viewerId&times=$times";

//輸出接口請求結果
echo file_get_contents($url);

?>

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

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

以上內容是否對您有幫助-_|168彩票大小怎么看输赢?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...