You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
206 lines
6.6 KiB
206 lines
6.6 KiB
2 years ago
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||
|
pageEncoding="UTF-8"%>
|
||
|
<%@ page import="com.lp.cfg.ProConfig"%>
|
||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<%@ include file="/WEB-INF/oss/iot/common/variable.jsp"%>
|
||
|
<%@ include file="/WEB-INF/oss/iot/common/variable_js.jsp"%>
|
||
|
<%@ include file="/WEB-INF/oss/iot/common/resource_lib.jsp"%>
|
||
|
<link type="text/css" href="<%=basePath%>/css/oss/iot/interface.css?<%=v%>" rel="stylesheet"/>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div>
|
||
|
<%@include file="moudle/header.jsp" %>
|
||
|
<span class="active hide">6</span>
|
||
|
<!-- 下方部位 -->
|
||
|
<div style="background: #fafafa;padding-top: 70px;min-height: 600px; ">
|
||
|
<div class="clearfloat" style="margin: 0 20px;">
|
||
|
<div class="float-left border-leftright" >
|
||
|
<div class="developer_left_title">
|
||
|
<a href="javacript:void(0);" class="developer_left_a">
|
||
|
<span class="developer_left_span_a" style="color: rgb(51, 51, 51);">
|
||
|
开发者中心
|
||
|
</span>
|
||
|
<span class="developer_left_span_b">
|
||
|
Developer Center
|
||
|
</span>
|
||
|
</a>
|
||
|
</div>
|
||
|
<div class="developer_left_con_body">
|
||
|
<div class="developer_left_con">
|
||
|
<ul>
|
||
|
<div class="developer_left_con_div">
|
||
|
<li class="developer_left_con_li developer_left_con_li_a">
|
||
|
<span class="developer_left_con_span">快速开始</span>
|
||
|
</li>
|
||
|
<div class="developer_left_none developer_left_none_off" >
|
||
|
<ul>
|
||
|
<!-- <li> -->
|
||
|
<!-- <a href="">简单介绍</a> -->
|
||
|
<!-- </li> -->
|
||
|
<li>
|
||
|
<a onclick="show('help2');" href="javascript:void(0);">API接入方法</a>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="developer_left_con">
|
||
|
<ul>
|
||
|
<div class="developer_left_con_div">
|
||
|
<li class="developer_left_con_li developer_left_con_li_a">
|
||
|
<span class="developer_left_con_span">API开放接口</span>
|
||
|
</li>
|
||
|
<div class="developer_left_none developer_left_none_off" >
|
||
|
<ul>
|
||
|
<li>
|
||
|
<a onclick="show('help1');" href="javascript:void(0);">设备接口</a>
|
||
|
</li>
|
||
|
<!-- <li> -->
|
||
|
<!-- <a href="">用户接口</a> -->
|
||
|
<!-- </li> -->
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="float-left width-66 help hide help1">
|
||
|
<div class="content-title">
|
||
|
<div>
|
||
|
<span class="developer_right_span">API开放接口</span>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="content-body">
|
||
|
<h2><b>设备接口</b></h2>
|
||
|
<p style="color:#666;line-height: 32px;font-size: 16px;">
|
||
|
设备包括了网络设备和传感器设备,一个网络设备支持多个传感器设备。</p>
|
||
|
<div class="api-content">
|
||
|
<h4 class="bg-title title">设备状态</h4>
|
||
|
<p class="bg-content">对该URL的一个HTTP GET请求将为您返回该设备的状态</p>
|
||
|
<p class="bg-title">URL</p>
|
||
|
<p class="bg-content">http://api.yeelink.net/v1.0/device/<device_id>/sensors</p>
|
||
|
<p class="bg-title">数据格式</p>
|
||
|
<p class="bg-content">JSON</p>
|
||
|
<p class="bg-title">请求参数</p>
|
||
|
<pre>
|
||
|
{
|
||
|
"deviceName": "设备名称",
|
||
|
"remark": "备注",
|
||
|
"userId": "1",
|
||
|
"defaultTime": "记录时间间隔",
|
||
|
"agreement": "协议",
|
||
|
"faultDelay": "掉线延时",
|
||
|
"isShare": "是否公开",
|
||
|
"userKey": "94040a9b-b3cb-4489-ad85-27ce619edb7b"
|
||
|
}
|
||
|
</pre>
|
||
|
<p class="bg-title">返回值</p>
|
||
|
<pre>
|
||
|
{
|
||
|
"deviceName": "设备名称",
|
||
|
"remark": "备注",
|
||
|
"userId": "1",
|
||
|
"defaultTime": "记录时间间隔",
|
||
|
"agreement": "协议",
|
||
|
"faultDelay": "掉线延时",
|
||
|
"isShare": "是否公开",
|
||
|
"userKey": "94040a9b-b3cb-4489-ad85-27ce619edb7b"
|
||
|
}
|
||
|
</pre>
|
||
|
</div>
|
||
|
|
||
|
<div class="api-content mt-20">
|
||
|
<h4 class="bg-title title">设备控制</h4>
|
||
|
<p class="bg-content">对该URL的一个HTTP GET请求将为您返回该设备的状态</p>
|
||
|
<p class="bg-title">URL</p>
|
||
|
<p class="bg-content">http://api.yeelink.net/v1.0/device/<device_id>/sensors</p>
|
||
|
<p class="bg-title">数据格式</p>
|
||
|
<p class="bg-content">JSON</p>
|
||
|
<p class="bg-title">请求参数</p>
|
||
|
<pre>
|
||
|
{
|
||
|
"deviceName": "设备名称",
|
||
|
"remark": "备注",
|
||
|
"userId": "1",
|
||
|
"defaultTime": "记录时间间隔",
|
||
|
"agreement": "协议",
|
||
|
"faultDelay": "掉线延时",
|
||
|
"isShare": "是否公开",
|
||
|
"userKey": "94040a9b-b3cb-4489-ad85-27ce619edb7b"
|
||
|
}
|
||
|
</pre>
|
||
|
<p class="bg-title">返回值</p>
|
||
|
<pre>
|
||
|
{
|
||
|
"deviceName": "设备名称",
|
||
|
"remark": "备注",
|
||
|
"userId": "1",
|
||
|
"defaultTime": "记录时间间隔",
|
||
|
"agreement": "协议",
|
||
|
"faultDelay": "掉线延时",
|
||
|
"isShare": "是否公开",
|
||
|
"userKey": "94040a9b-b3cb-4489-ad85-27ce619edb7b"
|
||
|
}
|
||
|
</pre>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="float-left width-66 help help2" >
|
||
|
<div class="content-title">
|
||
|
<div>
|
||
|
<span class="developer_right_span">API接入方法</span>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="content-body">
|
||
|
通用物联网系统OPEN ESAY IOT是一个开放并且专注于物联网服务的系统平台,除了丰富的传感器接入,
|
||
|
系统通过HTTP接口方式对外提供API服务。
|
||
|
成功接入到系统需要下面几个步骤。
|
||
|
<p class="bg-title">用户注册</p>
|
||
|
<p class="bg-content">在物联网系统平台中注册用户</p>
|
||
|
<img src="<%=basePath%>/image/oss/iot/help/register_help.png">
|
||
|
|
||
|
<p class="bg-title">获取API-KEY</p>
|
||
|
<p class="bg-content">点击个人信息获取API-key</p>
|
||
|
<img src="<%=basePath%>/image/oss/iot/help/person_help.png">
|
||
|
<img class="mt-10" src="<%=basePath%>/image/oss/iot/help/api_key_help.png">
|
||
|
|
||
|
<p class="bg-title">接口调用</p>
|
||
|
<p class="bg-content">API-KEY调用系统接口的示例</p>
|
||
|
|
||
|
<p class="mt-10" class="bg-content">JAVA HTTP CLIENT 调用</p>
|
||
|
<img src="<%=basePath%>/image/oss/iot/help/java_help.png">
|
||
|
|
||
|
<p class="mt-10" class="bg-content">JS Ajax 调用</p>
|
||
|
<img src="<%=basePath%>/image/oss/iot/help/js_help.png">
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
<script type="text/javascript">
|
||
|
$(function(){
|
||
|
$(".developer_left_con_li.developer_left_con_li_a").click(function(){
|
||
|
if( $(this).next().is(":hidden")){
|
||
|
$(this).next().show();
|
||
|
}else{
|
||
|
$(this).next().hide();
|
||
|
}
|
||
|
})
|
||
|
|
||
|
$(".border-leftright").css("height",$(window).height()-70 );
|
||
|
})
|
||
|
function show(obj){
|
||
|
$(".help").hide();
|
||
|
$("."+obj).show();
|
||
|
}
|
||
|
</script>
|
||
|
</html>
|