Skip to content

Instantly share code, notes, and snippets.

View TwitterWebService.gs
'use strict';
function getInstance(consumer_key, consumer_secret) {
return new TwitterWebService_(consumer_key, consumer_secret);
}
var TwitterWebService_ = function (consumer_key, consumer_secret) {
this.consumer_key = consumer_key;
this.consumer_secret = consumer_secret;
}
@M-Igashi
M-Igashi / cc_show_balance.gs
Last active Aug 6, 2021
API request sample for coincheck
View cc_show_balance.gs
var access = "YOUR-ACCESS-KEY-HERE"; //あなたのアクセスキーを入力
var secret = "YOUR-ACCESS-SECRET-HERE"; //あなたのアクセスシークレットを入力
var date = new Date();
var nonce = Math.floor((date.getTime()/1000)).toString(); //Unix時間をテキスト化
var url = "https://coincheck.com/api/accounts/balance"; //リクエストURL
//var body = {}; //postリクエストの場合はパラメタをJSON形式で記述
//var payload = JSON.stringify(body); //bodyをpayload化
var message = nonce+url; //postリクエストの場合はこの後ろに +payload を追加
@M-Igashi
M-Igashi / bf_show_balance.gs
Last active Apr 29, 2017
API request sample for bitFlyer
View bf_show_balance.gs
var access = "xxxxxxxxxxxxxxxxx"; //あなたのアクセスキーを入力
var secret = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYY"; //あなたのアクセスシークレットを入力
var endpoint = "https://api.bitflyer.jp"
var date = new Date();
var nonce = Math.floor((date.getTime()/1000)).toString(); //Unix時間をテキスト化
var method = "GET" //GETかPOSTかを大文字で指定
var path = "/v1/me/getbalance"; //リクエストPath
var url = endpoint + path;
//var body = {}; //postリクエストの場合はパラメタをJSON形式で記述
View delete_old_tweet.gs
function Delete_Old_Tweets() {
var destroy_count = 0;
var tweets = fetchTweets(0);
var stoptweets = 0;
var run_date = new Date();
var tweet_date = new Date();
var tweet_age = 0;
while (tweets.length>1) {