📺
İzleyici botu sorgu örneği
Api keyin siparis verme apisi örneği
PHP
JAVASCRİPT
PYTHON
JAVA
C#/.NET
CURL
<?php
$url = "http://api.twitchbotu.com/V1/";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$headers = array(
"Content-Type: application/x-www-form-urlencoded",
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$data = "key=APİ_KEY&event=izleyici-botu&ids=İDS_KEY";
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
//for debug only!
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$resp = curl_exec($curl);
curl_close($curl);
var_dump($resp);
?>
var url = "http://api.twitchbotu.com/V1/";
var xhr = new XMLHttpRequest();
xhr.open("POST", url);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
console.log(xhr.status);
console.log(xhr.responseText);
}};
var data = "key=APİ_KEY&event=izleyici-botu&ids=İDS_KEY";
xhr.send(data);
import requests
from requests.structures import CaseInsensitiveDict
url = "http://api.twitchbotu.com/V1/"
headers = CaseInsensitiveDict()
headers["Content-Type"] = "application/x-www-form-urlencoded"
data = "key=APİ_KEY&event=izleyici-botu&ids=İDS_KEY"
resp = requests.post(url, headers=headers, data=data)
print(resp.status_code)
URL url = new URL("http://api.twitchbotu.com/V1/");
HttpURLConnection http = (HttpURLConnection)url.openConnection();
http.setRequestMethod("POST");
http.setDoOutput(true);
http.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
String data = "key=APİ_KEY&event=izleyici-botu&ids=İDS_KEY";
byte[] out = data.getBytes(StandardCharsets.UTF_8);
OutputStream stream = http.getOutputStream();
stream.write(out);
System.out.println(http.getResponseCode() + " " + http.getResponseMessage());
http.disconnect();
var url = "http://api.twitchbotu.com/V1/";
var httpRequest = (HttpWebRequest)WebRequest.Create(url);
httpRequest.Method = "POST";
httpRequest.ContentType = "application/x-www-form-urlencoded";
var data = "key=APİ_KEY&event=izleyici-botu&ids=İDS_KEY";
using (var streamWriter = new StreamWriter(httpRequest.GetRequestStream()))
{
streamWriter.Write(data);
}
var httpResponse = (HttpWebResponse)httpRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
Console.WriteLine(httpResponse.StatusCode);
#!/bin/bash
curl -X POST http://api.twitchbotu.com/V1/ -H "Content-Type: application/x-www-form-urlencoded" -d "key=APİ_KEY&event=izleyici-botu&ids=İDS_KEY"
Last modified 11mo ago