İçinde Sorgusu
curl --request POST \
--url https://api.iklim.co/v1/precipitations/within \
--header 'Content-Type: application/json' \
--data '
{
"center": {
"lng": 32.857358,
"lat": 39.93504
},
"radius": 1000,
"backwardInterval": 3600,
"endTimeEpoch": 1646374400000,
"pageNumber": 0,
"pageSize": 10,
"intensityThreshold": "MODERATE"
}
'import requests
url = "https://api.iklim.co/v1/precipitations/within"
payload = {
"center": {
"lng": 32.857358,
"lat": 39.93504
},
"radius": 1000,
"backwardInterval": 3600,
"endTimeEpoch": 1646374400000,
"pageNumber": 0,
"pageSize": 10,
"intensityThreshold": "MODERATE"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
center: {lng: 32.857358, lat: 39.93504},
radius: 1000,
backwardInterval: 3600,
endTimeEpoch: 1646374400000,
pageNumber: 0,
pageSize: 10,
intensityThreshold: 'MODERATE'
})
};
fetch('https://api.iklim.co/v1/precipitations/within', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.iklim.co/v1/precipitations/within",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'center' => [
'lng' => 32.857358,
'lat' => 39.93504
],
'radius' => 1000,
'backwardInterval' => 3600,
'endTimeEpoch' => 1646374400000,
'pageNumber' => 0,
'pageSize' => 10,
'intensityThreshold' => 'MODERATE'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.iklim.co/v1/precipitations/within"
payload := strings.NewReader("{\n \"center\": {\n \"lng\": 32.857358,\n \"lat\": 39.93504\n },\n \"radius\": 1000,\n \"backwardInterval\": 3600,\n \"endTimeEpoch\": 1646374400000,\n \"pageNumber\": 0,\n \"pageSize\": 10,\n \"intensityThreshold\": \"MODERATE\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.iklim.co/v1/precipitations/within")
.header("Content-Type", "application/json")
.body("{\n \"center\": {\n \"lng\": 32.857358,\n \"lat\": 39.93504\n },\n \"radius\": 1000,\n \"backwardInterval\": 3600,\n \"endTimeEpoch\": 1646374400000,\n \"pageNumber\": 0,\n \"pageSize\": 10,\n \"intensityThreshold\": \"MODERATE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.iklim.co/v1/precipitations/within")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"center\": {\n \"lng\": 32.857358,\n \"lat\": 39.93504\n },\n \"radius\": 1000,\n \"backwardInterval\": 3600,\n \"endTimeEpoch\": 1646374400000,\n \"pageNumber\": 0,\n \"pageSize\": 10,\n \"intensityThreshold\": \"MODERATE\"\n}"
response = http.request(request)
puts response.read_body{
"precipitations": [
{
"eventId": "6932e0b4d4a02eb8afdf2951",
"radarTimeStamp": 1646374400000,
"forecast": false,
"intensity": "MODERATE",
"precipType": "RAIN"
}
],
"queryTimestamp": 123,
"totalRecords": 123,
"pageNumber": 0,
"pageSize": 10
}İçinde Sorgusu
Belirtilen dairesel alan ve zaman aralığındaki yağış verilerini getirir.
POST
/
v1
/
precipitations
/
within
İçinde Sorgusu
curl --request POST \
--url https://api.iklim.co/v1/precipitations/within \
--header 'Content-Type: application/json' \
--data '
{
"center": {
"lng": 32.857358,
"lat": 39.93504
},
"radius": 1000,
"backwardInterval": 3600,
"endTimeEpoch": 1646374400000,
"pageNumber": 0,
"pageSize": 10,
"intensityThreshold": "MODERATE"
}
'import requests
url = "https://api.iklim.co/v1/precipitations/within"
payload = {
"center": {
"lng": 32.857358,
"lat": 39.93504
},
"radius": 1000,
"backwardInterval": 3600,
"endTimeEpoch": 1646374400000,
"pageNumber": 0,
"pageSize": 10,
"intensityThreshold": "MODERATE"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
center: {lng: 32.857358, lat: 39.93504},
radius: 1000,
backwardInterval: 3600,
endTimeEpoch: 1646374400000,
pageNumber: 0,
pageSize: 10,
intensityThreshold: 'MODERATE'
})
};
fetch('https://api.iklim.co/v1/precipitations/within', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.iklim.co/v1/precipitations/within",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'center' => [
'lng' => 32.857358,
'lat' => 39.93504
],
'radius' => 1000,
'backwardInterval' => 3600,
'endTimeEpoch' => 1646374400000,
'pageNumber' => 0,
'pageSize' => 10,
'intensityThreshold' => 'MODERATE'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.iklim.co/v1/precipitations/within"
payload := strings.NewReader("{\n \"center\": {\n \"lng\": 32.857358,\n \"lat\": 39.93504\n },\n \"radius\": 1000,\n \"backwardInterval\": 3600,\n \"endTimeEpoch\": 1646374400000,\n \"pageNumber\": 0,\n \"pageSize\": 10,\n \"intensityThreshold\": \"MODERATE\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.iklim.co/v1/precipitations/within")
.header("Content-Type", "application/json")
.body("{\n \"center\": {\n \"lng\": 32.857358,\n \"lat\": 39.93504\n },\n \"radius\": 1000,\n \"backwardInterval\": 3600,\n \"endTimeEpoch\": 1646374400000,\n \"pageNumber\": 0,\n \"pageSize\": 10,\n \"intensityThreshold\": \"MODERATE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.iklim.co/v1/precipitations/within")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"center\": {\n \"lng\": 32.857358,\n \"lat\": 39.93504\n },\n \"radius\": 1000,\n \"backwardInterval\": 3600,\n \"endTimeEpoch\": 1646374400000,\n \"pageNumber\": 0,\n \"pageSize\": 10,\n \"intensityThreshold\": \"MODERATE\"\n}"
response = http.request(request)
puts response.read_body{
"precipitations": [
{
"eventId": "6932e0b4d4a02eb8afdf2951",
"radarTimeStamp": 1646374400000,
"forecast": false,
"intensity": "MODERATE",
"precipType": "RAIN"
}
],
"queryTimestamp": 123,
"totalRecords": 123,
"pageNumber": 0,
"pageSize": 10
}Gövde
application/json
Sorgu bitiş zamanı (Epoch milisaniye). Kayıtlar son 30 güne ait, 10 dakikada bir alınan radar gözlemleri ile tahmin kayıtlarıdır; tahmin kayıtlarını (forecast: true) da almak için bitiş zamanı yapılandırılan tahmin ufkuna kadar geleceğe ayarlanabilir.
Gerekli aralık:
x >= 0Örnek:
1646374400000
Yanıt
Yağış kayıtları listesi başarıyla getirildi.