Refresh Button / Auto Update GOOGLE SPREADSHEET

后端 未结 4 570
终归单人心
终归单人心 2021-01-19 11:51

I hope you can help me. I have been trying to get this working for quite some time.

I am taking the API from a website import it into google spreadsheets VIA importj

4条回答
  •  醉酒成梦
    2021-01-19 12:25

    Im not really a javascript person, but I might have a little code that might help start you off. (Sorry if it does not help). What I use in my site is this (I changed it a little bit to incorporate your url).

    $( document ).ready(function($) {
      setInterval(function(){
        $('.sell').load('http://api.796.com/v3/futures/ticker.html?type=weekly');
      }, 5000);
    });
    

    This just grabs the JSON every 5 seconds, so be sure you parse the JSON and display the data you need. Hope this helps! :)

提交回复
热议问题