필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

how to communicate with your channel using plugin?

조회 수: 4 (최근 30일)
Gcobani Mkontwana
Gcobani Mkontwana 2019년 11월 6일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi Team
I have a channel, but i want my channel to be able to communicate with my plugin. I am using jquery to do this with a button that send a request using 'GET' method. Please help as i want to read my channel fieldID, what can i do to improve this from the client side? The back end does indeed read api key and added the extra field 'button_state' under my channel.
<script
src="https://code.jquery.com/jquery-3.3.1.js"integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="crossorigin="anonymous"></script>
<script type="text/javascript">
function OPENDOOR() {
$.ajax({
url:"https://api.thingspeak.com/apps/plugins.json?api_key=M****",
testAPI.PNG
type: 'GET',
success: function(data) {
//called when successful
//console.log(data);
$('#singlebutton').on('click', function (e) {
$('#singlebutton').append(data);
})
}
});
}
</script>

답변 (0개)

이 질문은 마감되었습니다.

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by