curl https://ws.detectlanguage.com/0.2/user/status \
-H "Authorization: Bearer <YOUR_API_KEY>"
# Result example
{"date":"2018-04-07","requests":1510,"bytes":19843,"plan":"","plan_expires":null,"daily_requests_limit":0,"daily_bytes_limit":0,"status":"ACTIVE"}
detectlanguage.userStatus().then(function(result) {
console.log(JSON.stringify(result));
});
// Result example
{
date: "2015-02-21",
requests: 31,
bytes: 429,
plan: "FREE",
plan_expires: null,
daily_requests_limit: 5000,
daily_bytes_limit: 1048576,
status: "ACTIVE"
}
$result = DetectLanguage::getStatus();
// Result example
stdClass Object
(
[date] => 2013-10-19
[requests] => 1680
[bytes] => 21800
[plan] => FREE
[plan_expires] =>
[daily_requests_limit] => 5000
[daily_bytes_limit] => 1048576
[status] => ACTIVE
)
result = detectlanguage.user_status()
# Result example
{ 'status': 'ACTIVE', 'daily_requests_limit': 5000, 'daily_bytes_limit': 1048576,
'bytes': 3151, 'plan': 'FREE', 'date': '2014-03-29', 'requests': 263,
'plan_expires': None }
result, err := client.UserStatus()
if err != nil {
fmt.Fprintln(os.Stderr, "error getting user status:", err)
os.Exit(1)
return
}
fmt.Fprintln(os.Stdout, "Status:", result.Status)
fmt.Fprintln(os.Stdout, "Requests sent today:", result.Requests)
fmt.Fprintln(os.Stdout, "Bytes sent today:", result.Bytes)
fmt.Fprintln(os.Stdout, "Plan:", result.Plan)
fmt.Fprintln(os.Stdout, "Plan expires:", result.PlanExpires)
fmt.Fprintln(os.Stdout, "Daily requests limit:", result.DailyRequestsLimit)
fmt.Fprintln(os.Stdout, "Daily bytes limit:", result.DailyBytesLimit)
fmt.Fprintln(os.Stdout, "Date:", result.Date)
result = DetectLanguage.user_status
# Result example
{"date"=>"2013-11-17", "requests"=>95, "bytes"=>2223, "plan"=>"FREE", "plan_expires"=>nil,
"daily_requests_limit"=>5000, "daily_bytes_limit"=>1048576, "status"=>"ACTIVE"}
UserStatus userStatus = await client.GetUserStatusAsync();