Skip to content

Latest commit

 

History

History
227 lines (150 loc) · 6.42 KB

File metadata and controls

227 lines (150 loc) · 6.42 KB

whoisfreaks.AccountApi

All URIs are relative to https://api.whoisfreaks.com

Method HTTP request Description
account_usage GET /v1.0/whoisapi/usage Account Usage
database_file_status GET /v3.4/status Database File Status (Public)
rotate_api_key GET /v1.0/api-key/rotate Rotate API Key

account_usage

AccountUsageResponse account_usage()

Account Usage

Account Usage. Returns the file/snapshot described by this operation.

Example

  • Api Key Authentication (ApiKeyAuth):
import whoisfreaks
from whoisfreaks.models.account_usage_response import AccountUsageResponse
from whoisfreaks.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.whoisfreaks.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whoisfreaks.Configuration(
    host = "https://api.whoisfreaks.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with whoisfreaks.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whoisfreaks.AccountApi(api_client)

    try:
        # Account Usage
        api_response = api_instance.account_usage()
        print("The response of AccountApi->account_usage:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountApi->account_usage: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

AccountUsageResponse

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
4XX Error response (4XX) -

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

database_file_status

DatabaseFileStatus database_file_status()

Database File Status (Public)

No API key required. Returns freshness of all downloadable files.

Example

import whoisfreaks
from whoisfreaks.models.database_file_status import DatabaseFileStatus
from whoisfreaks.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.whoisfreaks.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whoisfreaks.Configuration(
    host = "https://api.whoisfreaks.com"
)


# Enter a context with an instance of the API client
with whoisfreaks.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whoisfreaks.AccountApi(api_client)

    try:
        # Database File Status (Public)
        api_response = api_instance.database_file_status()
        print("The response of AccountApi->database_file_status:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountApi->database_file_status: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

DatabaseFileStatus

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
429 Too many requests -

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

rotate_api_key

str rotate_api_key()

Rotate API Key

Rotate API Key. Returns the file/snapshot described by this operation.

Example

  • Api Key Authentication (ApiKeyAuth):
import whoisfreaks
from whoisfreaks.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.whoisfreaks.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whoisfreaks.Configuration(
    host = "https://api.whoisfreaks.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with whoisfreaks.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whoisfreaks.AccountApi(api_client)

    try:
        # Rotate API Key
        api_response = api_instance.rotate_api_key()
        print("The response of AccountApi->rotate_api_key:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountApi->rotate_api_key: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

str

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 Key rotated -
401 Not allowed -

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