Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Latest commit

 

History

History
74 lines (53 loc) · 2.19 KB

File metadata and controls

74 lines (53 loc) · 2.19 KB

locationiq.BalanceApi

All URIs are relative to https://eu1.locationiq.com/v1

Method HTTP request Description
balance GET /balance.php

balance

Balance balance()

The Balance API provides a count of request credits left in the user's account for the day. Balance is reset at midnight UTC everyday (00:00 UTC).

Example

  • Api Key Authentication (key):
from __future__ import print_function
import time
import locationiq
from locationiq.rest import ApiException
from pprint import pprint
configuration = locationiq.Configuration()
# Configure API key authorization: key
configuration.api_key['key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Defining host is optional and default to https://eu1.locationiq.com/v1
configuration.host = "https://eu1.locationiq.com/v1"
# Enter a context with an instance of the API client
with locationiq.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = locationiq.BalanceApi(api_client)
    
try:
    api_response = api_instance.balance()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BalanceApi->balance: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

Balance

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 The request has been made from an unauthorized domain. -
404 No location or places were found for the given input -
429 Request exceeded the rate-limits set on your account -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]