Skip to content

Latest commit

 

History

History
86 lines (57 loc) · 2.57 KB

File metadata and controls

86 lines (57 loc) · 2.57 KB

rankvectors.UserApi

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

Method HTTP request Description
get_user_info GET /api/user/me Get authenticated user information

get_user_info

GetUserInfo200Response get_user_info()

Get authenticated user information

Get information about the authenticated user including credit balance and project count

Example

  • Api Key Authentication (ApiKeyAuth):
import rankvectors
from rankvectors.models.get_user_info200_response import GetUserInfo200Response
from rankvectors.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.rankvectors.com
# See configuration.py for a list of all supported configuration parameters.
configuration = rankvectors.Configuration(
    host = "https://api.rankvectors.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 rankvectors.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = rankvectors.UserApi(api_client)

    try:
        # Get authenticated user information
        api_response = api_instance.get_user_info()
        print("The response of UserApi->get_user_info:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UserApi->get_user_info: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

GetUserInfo200Response

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 User information -
401 Unauthorized - missing or invalid API key -
500 Internal server error -

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