Params | Data type | Descriptions |
latitude required longitude required date required | float float string | latitude , eg: 19.23232 longitude, eg: 72.23234 date, eg: "12-5-1993" // "mm-dd-yyyy" |
{
"status": true,
"timezone": 5.5,
"timezone_in_ms": 19800000,
"date": "1992-12-01T00:00:00.000Z"
}
var api = 'timezone_with_dst';
var userId = '<Your User Id>';
var apiKey = '<Your Api Key>';
var language = '<Your Language>' // By default it is set to en
var data = {
latitude: 19.23232,
longitude: 72.23234,
date: "01-06-2000",
};
var request = $.ajax({
url: "https://json.astrologyapi.com/v1/"+api,
method: "POST",
dataType:'json',
headers: {
"authorization": "Basic " + btoa(userId+":"+apiKey),
"Content-Type":'application/json',
"Accept-Language": language
},
data:JSON.stringify(data)
});
request.then( function(resp){
console.log(resp);
}, function(err){
console.log(err);
});