TsubuyakiSoup.as 認証できない不具合。こんな感じにすると直るよ。API1.1 未対応。
TsubuyakiSoup.as 認証できない不具合。こんな感じにすると直るよ。API1.1 未対応。
#deffunc RESTAPI var p1, var p2, int p3, str p4, array p5
// ~略~
repeat notemax
noteget API_BufStr, cnt
API_BufStr = getpath(API_BufStr, 16)
API_buf = instr(API_BufStr, 0, getpath("Status: ", 16)) //ステータスコード
if (API_Buf != -1) : API_statcode = int(strmid(API_BufStr, API_buf+8, 3))
API_buf = instr(API_BufStr, 0, getpath("Content-Length: ", 16)) //長さ
if (API_Buf != -1) : API_p1Length = int(strmid(API_BufStr, -1, strlen(API_BufStr)-API_buf+16))
API_buf = instr(API_BufStr, 0, getpath("X-RateLimit-Limit: ", 16)) //60分間にAPIを実行できる回数
if (API_Buf != -1) : TS_RateLimit(0) = int(strmid(API_BufStr, -1, strlen(API_BufStr)-(API_buf+19)))
API_buf = instr(API_BufStr, 0, getpath("X-RateLimit-Remaining: ", 16)) //APIを実行できる残り回数
if (API_Buf != -1) : TS_RateLimit(1) = int(strmid(API_BufStr, -1, strlen(API_BufStr)-(API_buf+23)))
API_buf = instr(API_BufStr, 0, getpath("X-RateLimit-Reset: ", 16)) //リセットする時間
if (API_Buf != -1) : TS_RateLimit(2) = int(strmid(API_BufStr, -1, strlen(API_BufStr)-(API_buf+19)))
loop
// ~略~