獲取頻道廣告列表

接口URL

http://api.hemihome.com/live/v3/channel/advert/list

接口說明

1||-移动手机怎么开通黄钻、提供獲取頻道輪播廣告列表信息-|安理会成员国,頻道廣告為空時___万兽之国(h),獲取全局廣告
2_--柏原崇 佟丽娅、支持https

支持格式

JSON

請求方式

GET

請求參數

參數名 必選 類型 說明
appId string 賬號應用下的appId
timestamp string 當前時間的秒級時間戳(13位)
sign string 簽名-药酒是哪个朝代之后出现的,為32位大寫的MD5值
channelId int 頻道號

操作成功響應示例

{
    "code": 200,
    "status": "success",
    "message": "",
    "data": [
        {
            "text": "",
            "img": "//liveimages.videocc.net/uploaded/images/2019/09/ffmgstpk58.png",
            "href": ""
        },
        {
            "text": "123445",
            "img": "",
            "href": ""
        }
    ]
}

操作失敗響應示例

簽名錯誤

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

缺少參數 channelId

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

響應字段說明

名稱 類型 說明
code string 響應代碼_|订舱委托,成功為200__广东电大成绩查询平台,失敗為400|--广州莲香楼,簽名錯誤為403|__制作银行卡,異常錯誤500
status string 成功為success|-qq空间许愿红米f码,失敗為error
message string 錯誤時為錯誤提示消息
data object[] 成功響應數據
text string 文本廣告內容
img string 圖片廣告鏈接
href string 跳轉鏈接

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
$url = "https://api.hemihome.com/live/v3/channel/advert/list?appId=".$appId."&sign=".$sign."&timestamp=".$timestamp."&channelId=".$channelId;
//輸出接口請求結果
echo file_get_contents($url);

?>

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

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

以上內容是否對您有幫助取暖歌词?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

獲取授權和連麥的token

接口URL

http://api.hemihome.com/live/v3/channel/common/get-token

接口說明

1_|-万科地产校园招聘、接口用於獲取授權和連麥的token
2__榆林市人力资源和社会保障网、接口支持https

支持格式

JSON

請求方式

POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取_|兰州商学院长青学院教务,在直播係統登記的appId
timestamp long 13位當前時間戳
sign string 簽名值
channelId int 頻道Id

響應成功JSON示例__永胜彩票骗局:

{
    "code": 200,
    "status": "success",
    "message": "",
    "data": {
"mediaChannelKey": "e2355436235ba12d4c56493b575afed38f9f061d044f54d93c30f01463ffea852a7119c6195c6abf51b4682bc596bf5962eddc6cbf82784a1e5309ac52220ef7e66e4e7eb69a4e80081056972d5a9cb3bb723a0cb090702eef99369d479482b3bad99e5ec50eae5607b82c58da59aac3eada29fe6d753ef358d064ee308e406b3091f5256a77251001f99b6815651f18982da983b58c79d9caedd5ccec3f20ecd3dde7ba370f3c0ca0aa8c3ef088148523019f06e224d030b871da390c4a1a1c646e26684895d544dbba47751c535d07ea765fcf0cdfe8fe3de1538e4fe69eecadfd4a8b431aa4b00bc5dbccdb996ea3b7f962da2ecc21b6b14ba70c33601c53c3aa8d8e4857c111fa076e47e3a6eafc9601b87c079361f2d0f3cb4b31df2ff088ccb9428abe324ecb9e07e2fb8f48e40ab2ef3e119cfd93b15259bfa390938485a8fcd2e200dadeefe15a0516b7f61736cbe5bf48564d100e28ff64f979ebf42eadd3a0f3d58565d1ab619884d78c29",
"token": "71b961e6b2a68cde9559966b2f46d4e0"
}
}

響應字段說明

參數名 說明
code 狀態碼,成功為200|-|掌上足球竞彩版,簽名失敗為403-家常红烧肉,參數錯誤為400--118彩票1007,服務端錯誤為500
status 成功為success,錯誤時為error
message 成功為""-|-众彩彩票导师,錯誤時為錯誤描述信息
data.token 鏈接接口需要的token值
data.mediaChannelKey 連麥需要的key

響應失敗JSON示例|_|小顺车行:

參數錯誤

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

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

php請求示例

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

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

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

$url = "http://api.hemihome.com/live/v3/channel/common/get-token?".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/basic/get

接口說明

1-_038彩票讨论群、接口用於獲取頻道的詳細設置信息
2-|上海蹦极事故、接口支持https

支持格式

JSON

請求方式

GET

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取|_20l8跑狗新图,在直播係統登記的appId
timestamp long 13位當前時間戳
sign string 簽名值
channelId int 頻道號

響應成功JSON示例-消防概念股:

{
    "code": 200,
    "status": "success",
    "message": "",
    "data": {
        "channelId": 108888,
        "name": "test111",
        "channelPasswd": "1234",
        "publisher": "主持人",
        "startTime": 0,
        "pageView": 111,
        "likes": 66,
        "coverImg": "//livestatic.videocc.net/uploaded/images/2019/05/fcowsdnzx8.png",
        "splashImg": "//livestatic.videocc.net/uploaded/images/2019/05/fcowsdrak0.png",
        "splashEnabled": "Y",
        "desc": "你好,這個是直播介紹11111",
        "consultingMenuEnabled": "N",
        "maxViewerRestrict": "N",
        "maxViewer": 123,
        "watchStatus": "playback",
        "watchStatusText": "回放中",
        "userCategory": {
            "categoryId": 155224,
            "categoryName": "新建分類測試",
            "userId": "edvf2fpec9",
            "rank": 3
        },
        "authSettings": [
            {
                "channelId": 108888,
                "rank": 1,
                "userId": "edvf2fpec9",
                "globalSettingEnabled": "N",
                "enabled": "Y",
                "authType": "code",
                "authTips": "歡迎觀看本直播",
                "payAuthTips": "歡迎觀看本次直播",
                "codeAuthTips": "歡迎觀看本次直播",
                "infoAuthTips": "歡迎觀看本次直播",
                "authCode": "1",
                "qcodeTips": "掃碼關注XXX||_至尊彩app,獲得觀看碼掃碼關注XXX",
                "qcodeImg": "",
                "price": 999999.00,
                "watchEndTime": null,
                "validTimePeriod": null,
                "customKey": "c130221c6b",
                "customUri": null,
                "externalKey": "94c7e79aff",
                "externalUri": null,
                "externalRedirectUri": null,
                "directKey": null,
                "trialWatchEnabled": "Y",
                "trialWatchTime": 1,
                "trialWatchEndTime": null
            },
            {
                "channelId": 108888,
                "rank": 2,
                "userId": "edvf2fpec9",
                "globalSettingEnabled": "N",
                "enabled": "Y",
                "authType": "pay",
                "authTips": "歡迎觀看本次直播",
                "payAuthTips": "歡迎觀看本直播",
                "codeAuthTips": "驗證碼是1",
                "infoAuthTips": null,
                "authCode": "1",
                "qcodeTips": "",
                "qcodeImg": "",
                "price": 1.00,
                "watchEndTime": null,
                "validTimePeriod": null,
                "customKey": "17040194f4",
                "customUri": null,
                "externalKey": "693d8a540c",
                "externalUri": null,
                "externalRedirectUri": null,
                "directKey": null,
                "trialWatchEnabled": "N",
                "trialWatchTime": 1,
                "trialWatchEndTime": null
            }
        ]
    }
}

響應字段說明

參數名 類型 說明
code int 狀態狀態碼__轰9,請求成功時為200
status string 狀態值
message string 請求失敗時返回的錯誤值
data ChannelDetailSettingModel 請求失敗時為空|_斗战神入定修炼,請求成功時為頻道的詳細設置信息

ChannelDetailSettingModel字段說明

參數名 類型 說明
channelId int 頻道號
name string 頻道名稱
channelPasswd string 頻道密碼
publisher string 主持人名稱
startTime long 直播開始時間_-众盈网彩票安全吗,關閉時為0|__诺基亚6120c软件,開啟時為13位毫秒級時間戳
pageView int 頁麵累計觀看數
likes int 觀看頁點讚數
coverImg string 頻道圖標url
splashImg string 頻道引導圖url
splashEnabled string(取值為Y/N) 引導頁開關
desc string 直播介紹
consultingMenuEnabled string(取值為Y/N) 谘詢提問開關
maxViewerRestrict string(取值為Y/N) 限製最大在線觀看人數開關
maxViewer int 最大在線觀看人數
watchStatus string 頻道的觀看頁狀態__|拍拍网充话费,取值為_-新疆武警: 頻道狀態,取值||-得胜236:live(直播中)_--真人cs枪械专卖、end(直播結束)-__腾讯qq人工服务电话、playback(回放中)--广告词语、waiting(等待直播)
watchStatusDesc string 觀看頁狀態描述_|众乐彩票网站,直播中|_22彩票ios,回放中|实名注册身份证号码,已結束_-厦门工商红盾网,未開始
userCategory object 頻道所屬分類的信息
userCategory.categoryId int 分類ID
userCategory.categoryName string 分類名稱
userCategory.rank int 分類的排序值
authSettings List 直播觀看條件列表

關於ChannelAuthSetting 的參數說明請參考該接口的成功返回結果_-_1吨水等于多少升:查詢直播頻道觀看條件

響應失敗JSON示例|-成都男子街头杀妻:

參數錯誤

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

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

php請求示例

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

$channelId="183950";

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

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

$url = "http://api.hemihome.com/live/v3/channel/basic/get?appId=".$appId."&channelId=".$channelId."&timestamp=".$timestamp."&sign=".$sign;

echo file_get_contents($url);

?>

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

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

以上內容是否對您有幫助||_堵车电影?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

創建並初始化頻道

接口URL

http://api.hemihome.com/live/v3/channel/basic/create

接口說明

1_-中兴彩票代理、接口用於創建頻道並進行相關設置
2|--360彩票网官网导航、接口支持https

支持格式

JSON

請求方式

POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取-_-福鼎在线,在直播係統登記的appId
timestamp long 13位當前時間戳
sign string 簽名值
basicSetting json 基礎設置
authSettings json 觀看條件設置

注|-仙剑5破解:這裏的appId,timestamp,sign必須通過url傳參__现任国家领导人名单,json數據通過請求體傳參-|178国际娱乐,如:
http://api.hemihome.com/live/v3/channel/basic/create?appId={{appId}}&timestamp={{timestamp}}&sign={{sign}}

請求體json示例

{
    "basicSetting": {
        "name": "測試", 
        "channelPasswd": "10086", 
        "maxViewer": 20, 
        "startTime": 1557888134000
    }, 
    "authSettings": [
        {
            "rank": 1, 
            "enabled": "Y", 
            "authType": "external", 
            "externalKey": "L0EjokKI4O", 
            "externalUri": "http://demo.hemihome.com/chenwb/live-validate.php"
        }
    ]
}

basicSetting詳細說明

參數名 必選 類型 說明
name string 頻道名稱
channelPasswd string 頻道密碼,長度不能超過16位
autoPlay int 是否自動播放-|_2分钟快3是什么彩票,0/1|_336时时彩平台下载,默認1
playerColor string 播放器控製欄顏色_||亿彩邀请码199倍,默認|--佳佳宠儿:#666666
scene string 直播場景||-易彩集团是真的么:
alone 活動拍攝
ppt 三分屏
topclass 大班課
categoryId int 新建頻道的所屬分類_|海峡两岸主持人,如果不提交|_请你圆润的离开番外,則為默認分類(分類ID可通過“獲取直播分類”接口得到)
maxViewer int 最大同時在線人數
startTime long 直播開始時間-|_陆贞身世,13位時間戳
desc string 直播介紹的內容
publisher string 主持人

authSettings詳細說明

詳細的數據參數-_如东实验小学万红,參考 更新觀看條件 的請求參數部分

響應成功JSON示例--长安街英菲尼迪:

{
    "code": 200, 
    "status": "success", 
    "message": "", 
    "data": {
        "channelId": 323158, 
        "userId": "b0f7041324", 
        "name": "測試", 
        "publisher": null, 
        "description": "", 
        "url": "rtmp://push-c1.videocc.net/recordf/b0f704132420190515115309303", 
        "stream": "b0f704132420190515115309303", 
        "logoImage": "", 
        "logoOpacity": 1, 
        "logoPosition": "tr", 
        "logoHref": "", 
        "coverImage": "", 
        "coverHref": "", 
        "waitImage": "", 
        "waitHref": "", 
        "cutoffImage": "", 
        "cutoffHref": "", 
        "advertType": "NONE", 
        "advertDuration": 0, 
        "advertWidth": 0, 
        "advertHeight": 0, 
        "advertImage": "", 
        "advertHref": "", 
        "advertFlvVid": "", 
        "advertFlvUrl": "", 
        "playerColor": "#FFFFFF", 
        "autoPlay": false, 
        "warmUpFlv": "", 
        "passwdRestrict": false, 
        "passwdEncrypted": "", 
        "isOnlyAudio": "N", 
        "isLowLatency": "N", 
        "m3u8Url": "http://pull-c1.videocc.net/recordf/b0f704132420190515115309303.m3u8?auth_key=1557892389-0-0-d1cab3b24dc910dc22e3ab60915f682b", 
        "m3u8Url1": "", 
        "m3u8Url2": "", 
        "m3u8Url3": "", 
        "channelLogoImage": null, 
        "scene": "topclass", 
        "currentTimeMillis": 1557892389591
    }
}

響應字段說明

參數名 類型 說明
status string 狀態值
result object 響應的結果
channelId string 直播頻道ID
userId string 直播用戶ID
name string 直播頻道名稱
description string 直播頻道描述
url string 直播推流地址
stream string 直播流名稱
logoImage string 播放器logo
logoOpacity float Logo不透明度|_倩女幽魂伏魔牌,1表示完全不透明
logoPosition string Logo位置
logoHref string Logo的跳轉鏈接
coverImage string 播放前顯示的封麵圖
coverHref string 封麵圖的跳轉鏈接
waitImage string 等待推流時的顯示圖片
waitHref string 等待推流時顯示圖片的跳轉鏈接
cutoffImage string 切斷流時的顯示圖片
cutoffHref string 切斷流時顯示圖片的跳轉鏈接
advertType string 廣告類型
advertDuration string 廣告時長
advertWidth string 廣告區域寬度
advertHeight string 廣告區域高度
advertImage string 圖片廣告
advertHref string 廣告的跳轉鏈接
advertFlvVid string 視頻廣告ID
advertFlvUrl string 視頻廣告鏈接
playerColor string 播放器控製欄顏色
autoPlay boolean 自動播放
warmUpFlv string 一開始的暖場視頻
passwdRestrict boolean 觀看密碼限製-黄油笔,需要輸入觀看密碼才能播放流
passwdEncrypted string 觀看密碼加密後的密文
isOnlyAudio string 僅推音頻流
isLowLatency string 低延遲
m3u8Url string 直播拉流(播放)m3u8地址
m3u8Url1 string 直播拉流(播放)m3u8地址1
m3u8Url2 string 直播拉流(播放)m3u8地址2
m3u8Url3 string 直播拉流(播放)m3u8地址3
currentTimeMillis timestamp 服務器返回的時間戳(毫秒)

響應失敗JSON示例_-脸部美容手法视频:

參數錯誤

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

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

Json格式錯誤或字段類型不對

{
    "code": 400,
    "status": "error",
    "message": "json format error",
    "data": 400
}

字段說明

參數名 說明
code 狀態碼,成功為200-_金田一耕助稻垣吾郎,簽名失敗為403__|赢咖娱乐是骗局吗,參數錯誤為400-|艾克里桑怎么融合,服務端錯誤為500
status 成功為success,錯誤時為error
message 成功為""-骨碎补总黄酮,錯誤時為錯誤描述信息
data 成功時為true|_殷世航一个月赚多少钱,錯誤時為""

php請求示例

<?php
//引用config.php
include '/srv/http/live/config.php';
$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp
);

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

$json = '{"basicSetting":{"name":"測試","channelPasswd":"10086","maxViewer":20},"authSettings":[{"rank":1,"enabled":"Y","authType":"external","externalKey":"L0EjokKI4O","externalUri":"http://demo.hemihome.com/chenwb/live-validate.php"}]}';

$params["sign"] = $sign;
$url="http://api.hemihome.com/live/v3/channel/basic/create?".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);
?>

Java請求示例

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/basic/create";
        String appId = "appId";
        String key = "appSecret";
        Map<String, String> map = new HashMap<>();
        String timestamp = Long.toString(System.currentTimeMillis());
        map.put("appId", appId);
        map.put("timestamp", timestamp);

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

        String body = "{\"basicSetting\":{\"name\":\"測試\",\"channelPasswd\":\"10086\",\"maxViewer\":20," +
                "\"startTime\":\"1\"},\"authSettings\":[{\"rank\":1,\"enabled\":\"Y\",\"authType\":\"external\"," +
                "\"externalKey\":\"L0EjokKI4O\",\"externalUri\":\"http://demo.hemihome.com/chenwb/live-validate.php\"}]}";
        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);
        // 處理參數___至尊彩大发快3网址,計算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/

以上內容是否對您有幫助|_通辽刘大鹏?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

(子)頻道授權登錄接口

接口URL

https://live.hemihome.com/teacher/auth-login

接口說明

1|_-上海老板手机号码、接口用於獲取token後授權登錄
2_-托儿费、接口支持https

支持格式

JSON

請求方式

GET

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
channelId string 頻道號或子頻道號
token string 通過頻道token子頻道token設置的token串_诺基亚套件,10秒內且一次驗證有效
redirect string 完成授權後重定向地址-|-苦行僧歌词,使用url編碼|-靖州红网,如導播台統計分析

響應成功示例-_|高效渗透剂:

有填寫了redirect-__终结洪荒演义,並且驗證成功則會重定向到相應的網頁-青海明胶股票,否則默認重定向到相應的後台-|_234彩票登陆,驗證失敗則會重定向到頻道登錄頁

請求示例

https://live.hemihome.com/teacher/auth-login?channelId=195770&token=testtoken&redirect=http%3a%2f%2flive.hemihome.com%2fnewGuide.html%3fchannel%3d195770
以上內容是否對您有幫助|_长垣车祸?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

批量刪除頻道

接口URL

http://api.hemihome.com/live/v3/channel/basic/batch-delete

接口說明

1_|_金玉满堂袖唐、作用__感应仙女:批量刪除直播頻道
2|-瑞士鹿喜微断食纤体、接口支持https協議

支持格式

JSON

請求方式

POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取-上海老板手机号码,在直播係統登記的appId
timestamp string 當前時間的秒級時間戳(13位)
sign string 簽名|--娱乐天地点检app安全吗,為32位大寫的MD5值
channelIds json 頻道ID列表-_|甜妞追逃夫,每次最多刪除100個頻道-赢彩彩票因为有你, 必須放在請求體中

請求體示例

{
    "channelIds": [123001, 123002, 123003]
}

操作成功響應示例

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

操作失敗響應示例

留意-华东葡萄酒庄园,如果響應失敗-_118彩票代理,則表示全部頻道都失敗_||18大全称,不會有部份成功|傲盾代理、部份失敗的結果

簽名錯誤

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

請求體json格式錯誤

{
    "code": 400,
    "status": "error"
    "message": "json format error",
    "data": ""
}

channelIds 列表中的頻道ID數超過上限(100個)

{
    "code": 400,
    "status": "error"
    "message": "channel batch count over limit",
    "data": ""
}

channelIds 列表中有錯誤的頻道ID(會輸出第一個錯誤的頻道ID)

{
    "code": 400,
    "status": "error"
    "message": "channel not found: 123456",
    "data": ""
}

響應字段說明

名稱 類型 說明
code string 響應代碼|1号娱乐app网址,成功為200-_168开奖网历史,失敗為400__诺基亚6120ci主题下载,簽名錯誤為401--诺基亚103,異常錯誤500
status string 成功為success|-_苦行僧歌词,失敗為error
message string 錯誤時為錯誤提示消息
data boolean 成功時為true

php請求示例

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

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

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

$json = '{
    "channelIds": [123001, 123002, 123003]
}';

$params["sign"] = $sign;
$url="http://api.hemihome.com/live/v3/channel/basic/batch-delete?".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);
?>

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/basic/batch-delete";
        String appId = "appId";
        String key = "secretKey";
        Map<String, String> map = new HashMap<>();
        map.put("appId", appId);
        map.put("timestamp", String.valueOf(System.currentTimeMillis()));

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

        String body = "{\"channelIds\":[123001, 123002, 123003]}";
        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);
        // 處理參數_|_苟在松,計算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/

以上內容是否對您有幫助|_重庆李俊案?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

批量創建頻道

接口URL

http://api.hemihome.com/live/v3/channel/basic/batch-create

接口說明

1|_|暗夜玫瑰sp、作用_|永胜国际快彩:批量創建直播頻道
2||111彩票安卓109、接口支持https協議

支持格式

JSON

請求方式

POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取_嘉酒视窗,在直播係統登記的appId
timestamp string 當前時間的秒級時間戳(13位)
sign string 簽名-|烈女蒋究,為32位大寫的MD5值
channels json 頻道列表||淘宝店标尺寸,每次最多創建100個頻道|_笑刑大唐txt下载, 必須放在請求體中

請求體示例

{
    "channels": [
        {
            "name": "abc",
            "channelPasswd": "xyz"
        },
        {
            "name": "def",
            "channelPasswd": "xyz",
            "autoPlay": 0,
            "playerColor": "#454545",
            "scene": "ppt",
            "categoryId": 123
        }
    ]
}

請求體字段說明

參數名 必選 類型 說明
name string 頻道名稱
channelPasswd string 頻道密碼
courseId string 課程號
autoPlay int 是否自動播放_|-淘宝网上开店的步骤,0/1|_易彩快3,默認1
注意___亿博彩票手机端,如果該值為空_|致命弯道5 豆瓣,則該頻道會使用全局的“功能開關設置”_|雅格奴。
如果非空|_武汉文具批发市场,則會使用頻道的“功能開關設置”-_青岛台东洗头房。
playerColor string 播放器控製欄顏色||丧尸围城视频,默認|--陈村天星影院:#666666
scene string 直播場景|||约彩彩票怎么注册不了:
alone 活動拍攝
ppt 三分屏
topclass 大班課
categoryId int 新建頻道的所屬分類||_众博彩票,如果不提交|-电视棒密码,則為默認分類(分類ID可通過“獲取直播分類”接口得到)

操作成功響應示例

{
    "code": 200,
    "status": "success"
    "message": "",
    "data": {
        "channels": [
            {
                "channelId": 123456,
                "userId": "e6b23c6f51",
                "name": "abc",
                "publisher": null,
                "description": "",
                "url": "rtmp://push2.videocc.net/recordfe/e6b23c6f5120180813142756453",
                "stream": "e6b23c6f5120180813142756453",
                "logoImage": "",
                "logoOpacity": 1.0,
                "logoPosition": "",
                "logoHref": "",
                "coverImage": "",
                "coverHref": "",
                "waitImage": "",
                "waitHref": "",
                "cutoffImage": "",
                "cutoffHref": "",
                "advertType": "IMAGE",
                "advertDuration": 5,
                "advertWidth": 0,
                "advertHeight": 0,
                "advertImage": "",
                "advertHref": "",
                "advertFlvVid": "",
                "advertFlvUrl": "",
                "playerColor": "#666666",
                "autoPlay": true,
                "warmUpFlv": "",
                "passwdRestrict": false,
                "passwdEncrypted": "",
                "isOnlyAudio": "N",
                "isLowLatency": "N",
                "m3u8Url": "http://pullh.videocc.net/recordfe/e6b23c6f5120180813142756453/playlist.m3u8",
                "m3u8Url1": "",
                "m3u8Url2": "",
                "m3u8Url3": "",
                "currentTimeMillis": 1534141677347
            }
        ]
    }
}

操作失敗響應示例

留意_||穿越神墓之何为逆天,如果響應失敗_-|苏州宽带转让,則表示全部頻道都失敗|-csol防沉迷,不會有部份成功_-_众发彩票赚钱吗?、部份失敗的結果

簽名錯誤

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

請求體json格式錯誤

{
    "code": 400,
    "status": "error"
    "message": "json format error",
    "data": ""
}

channels 列表中的頻道數超過上限(100個)

{
    "code": 400,
    "status": "error"
    "message": "channel batch count over limit",
    "data": ""
}

現有頻道數加上新建頻道數的總數-|双城市政府,超過用戶可創建的頻道總數

{
    "code": 400,
    "status": "error"
    "message": "channel count reached the limit",
    "data": ""
}

頻道名稱或者頻道密碼為空

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

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

courseId 長度超過限製(100個字符)

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

自動播放 autoPlay 錯誤(不是1或者0)

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

播放器顏色 playerColor 錯誤(正確的顏色值例如 #666666)

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

直播場景 scene 錯誤

{
    "code": 400,
    "status": "error"
    "message": "invalid live scene",
    "data": ""
}

頻道分類ID categoryId 錯誤

{
    "code": 400,
    "status": "error"
    "message": "illegal category id: categoryId",
    "data": ""
}

響應字段說明

名稱 類型 說明
code string 響應代碼-_蜡笔小新手机铃声,成功為200--华为5c,失敗為400_-_衡水热线专业聊天室,簽名錯誤為401_--中华益智养生功,異常錯誤500
status string 成功為success|_隔离端子,失敗為error
message string 錯誤時為錯誤提示消息
channelId string 直播頻道ID
userId string 直播用戶ID
name string 直播頻道名稱
description string 直播頻道描述
url string 直播推流地址
stream string 直播流名稱
logoImage string 播放器logo
logoOpacity float Logo不透明度_-雪豹雳剑电视剧全集,1 表示完全不透明-|不思议游戏国语版,0 表示完全透明
logoPosition string logo位置_--本溪张雷:
tl 左上--_105彩票cc苹果版,
tr 右上|深圳艾滋病检测,
bl 左下-_雪人大冒险,
br 右下_|幕末机关说 伊吕波歌。
logoHref string Logo的跳轉鏈接
coverImage string 播放前顯示的封麵圖
coverHref string 封麵圖的跳轉鏈接
waitImage string 等待推流時的顯示圖片
waitHref string 等待推流時顯示圖片的跳轉鏈接
cutoffImage string 切斷流時的顯示圖片
cutoffHref string 切斷流時顯示圖片的跳轉鏈接
advertType string 片頭廣告類型_--金鹏图:
NONE 無廣告||_宏基s220,
IMAGE 圖片|-_鹿喜微七天断食,
FLV 視頻|_-11选五万能9码复式。
advertDuration string 廣告時長(秒)
advertWidth string 廣告區域寬度(像素)
advertHeight string 廣告區域高度(像素)
advertImage string 圖片廣告
advertHref string 廣告的跳轉鏈接
advertFlvVid string 視頻廣告ID
advertFlvUrl string 視頻廣告鏈接
playerColor string 播放器控製欄顏色|||众赢国际是传销吗,例如 #666666
autoPlay boolean 是否自動播放
warmUpFlv string 暖場視頻鏈接
passwdRestrict boolean 觀看密碼限製|-_亿发彩票平台靠谱么,需要輸入觀看密碼才能播放流
passwdEncrypted string 觀看密碼加密後的密文
isOnlyAudio string Y 音頻模式___44444,
N 普通模式|-易彩在线注册。
isLowLatency string 低延遲
m3u8Url string 直播拉流(播放)m3u8地址
m3u8Url1 string 直播拉流(播放)m3u8地址1
m3u8Url2 string 直播拉流(播放)m3u8地址2
m3u8Url3 string 直播拉流(播放)m3u8地址3
currentTimeMillis timestamp 當前時間戳(毫秒)

php請求示例

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

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

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

$json = '{
    "channels": [{
        "name": "abc",
        "channelPasswd": "xyz"
    }]
}';

$params["sign"] = $sign;
$url="http://api.hemihome.com/live/v3/channel/basic/batch-create?".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);
?>

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/basic/batch-create";
        String appId = "appId";
        String key = "secretKey";
        Map<String, String> map = new HashMap<>();
        map.put("appId", appId);
        map.put("timestamp", String.valueOf(System.currentTimeMillis()));

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

        String body = "{\"channels\":[{\"name\": \"abc\", \"channelPasswd\": \"xyz\"}]}";
        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);
        // 處理參數_|_36选7好彩开奖结果,計算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/

以上內容是否對您有幫助_-工程款支付申请表?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

修改頻道詳情

接口URL

http://api.hemihome.com/live/v3/channel/detail/update

接口說明

1||惊爆游戏h、接口用於設置頻道的基本詳情相關設置
2-|诛仙入魔任务流程、接口支持https

支持格式

JSON

請求方式

POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取__新密五个人火了,在直播係統登記的appId
timestamp long 13位當前時間戳
sign string 簽名值
channelId int 頻道號
field string 要更新的字段名稱|_|11选5天津开奖:password 密碼 scene 直播場景 maxViewer 最大同時在線人數
value string 新的字段值|_重庆龙文钢材网,除設置無限製最大觀看人數時可不提交--梁笙和沈言 卫生间,其他情況都為必填

直播場景的取值分別為--广西平南:alone(活動拍攝)|-_欧瑞珂诗,ppt(PPT三分頻直播)_|陈梦园,topclass(大班課直播)-阿凡提返利网,設置前_|陈氏太极拳教程,請確認您的套餐是否包含對應場景

響應成功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": ""
}

頻道Id格式錯誤

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

頻道不存在

{
    "code": 404,
    "status": "error",
    "message": "channel not found.",
    "data": ""
}

頻道Id非法錯誤

{
    "code": 400,
    "status": "error",
    "message": "illegal channel id: %s",
    "data": ""
}

字段說明

參數名 說明
code 狀態碼,成功為200_赢咖登陆,簽名失敗為403-_优彩娱乐正规的吗,參數錯誤為400__-苏州新区人才市场现场招聘,服務端錯誤為500
status 成功為success,錯誤時為error
message 成功為""-|-艘湖,錯誤時為錯誤描述信息
data 成功時為true|-丰奈儿,錯誤時為""

php請求示例

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

$params = array(
  'appId' => "填寫獲取到的appId",
  'timestamp' => "填寫13位時間戳",
  'channelId' => "填寫頻道號",
  'field' => "password",
  'value' => "abcdefg"
);

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


$url="http://api.hemihome.com/live/v3/channel/detail/update";

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...

設置子頻道單點登陸token

接口URL

https://api.hemihome.com/live/v2/channels/{accountId}/set-account-token

接口說明

1|-1216网彩可信吗、設置子頻道單點登陸的token
2_-掌上彩票pro无法联网了、接口支持https協議
3-||3g彩票开奖、接口URL中的{account}為 子頻道ID

支持格式

JSON

請求方式

GET,POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取||-黄山奇石天狗望月图片,在直播係統登記的appId
timestamp string 當前13位毫秒級時間戳||诺基亚2700c软件,3分鍾內有效
token string 唯一的字符串
sign string 簽名-_|叶扬眉,為32位大寫的MD5值

響應成功JSON示例__-青岛教育人事处:

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

響應失敗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 請求狀態響應碼
status 請求狀態
message 錯誤信息
data 成功時候返回|_-2019世界杯竞彩足球,success

php請求示例

<?php

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

//接口需要的參數(非sign)賦值
$accountlId = "001127075";
$token = "skudjjdkkkkk";

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

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

//接口請求url
$url = "https://api.hemihome.com/live/v2/channels/$accountId/set-account-token?appId=$appId&timestamp=$timestamp&token=$token&sign=$sign";

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

?>

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

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

以上內容是否對您有幫助||_西洋集团在朝鲜投资的噩梦?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...

設置頻道單點登陸token

接口URL

https://api.hemihome.com/live/v2/channels/{channelId}/set-token

接口說明

1__玫琳凯督导、設置頻道單點登陸的token
2-超银河大战、接口支持https協議
3_|长春汽车保险、接口URL中的{channelId}為 頻道ID

支持格式

JSON

請求方式

GET,POST

請求數限製

TRUE

請求參數

參數名 必選 類型 說明
appId string 從API設置中獲取||青年宫电影院,在直播係統登記的appId
timestamp string 當前13位毫秒級時間戳|-锦屏记19楼,3分鍾內有效
token string 唯一的字符串
sign string 簽名_小爸爸拍摄地点,為32位大寫的MD5值

響應成功JSON示例-|宜兴土特产:

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

響應失敗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 請求狀態響應碼
status 請求狀態
message 錯誤信息
data 成功時候返回||本亮大叔简介,success

php請求示例

<?php

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

//接口需要的參數(非sign)賦值
$channelId = "127075";
$token = "skudjjdkkkkk";

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

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

//接口請求url
$url = "https://api.hemihome.com/live/v2/channels/$channelId/set-token?appId=$appId&timestamp=$timestamp&token=$token&sign=$sign";

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

?>

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

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

以上內容是否對您有幫助_魅力优品的书?根本沒有幫助文檔較差文檔一般文檔不錯文檔很好
Loading...