Skip to content

Latest commit

 

History

History
146 lines (106 loc) · 4.55 KB

UserApi.md

File metadata and controls

146 lines (106 loc) · 4.55 KB

fattureincloud_python_sdk.UserApi

All URIs are relative to https://api-v2.fattureincloud.it

Method HTTP request Description
get_user_info GET /user/info Get User Info
list_user_companies GET /user/companies List User Companies

get_user_info

GetUserInfoResponse get_user_info()

Get User Info

Gets the current user's info.

Example

  • OAuth Authentication (OAuth2AuthenticationCodeFlow):
from __future__ import print_function
import time
import os
import fattureincloud_python_sdk
from fattureincloud_python_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api-v2.fattureincloud.it
# See configuration.py for a list of all supported configuration parameters.
configuration = fattureincloud_python_sdk.Configuration(
    host = "https://api-v2.fattureincloud.it"
)

# 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.

configuration.access_token = os.environ["ACCESS_TOKEN"]

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

    try:
        # Get User Info
        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

GetUserInfoResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -
401 Unauthorized. -

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

list_user_companies

ListUserCompaniesResponse list_user_companies()

List User Companies

Lists the companies controlled by the current user.

Example

  • OAuth Authentication (OAuth2AuthenticationCodeFlow):
from __future__ import print_function
import time
import os
import fattureincloud_python_sdk
from fattureincloud_python_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api-v2.fattureincloud.it
# See configuration.py for a list of all supported configuration parameters.
configuration = fattureincloud_python_sdk.Configuration(
    host = "https://api-v2.fattureincloud.it"
)

# 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.

configuration.access_token = os.environ["ACCESS_TOKEN"]

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

    try:
        # List User Companies
        api_response = api_instance.list_user_companies()
        print("The response of UserApi->list_user_companies:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UserApi->list_user_companies: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ListUserCompaniesResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 User Companies. -
401 Unauthorized -

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