Skip to content

Latest commit

 

History

History
316 lines (214 loc) · 8.42 KB

File metadata and controls

316 lines (214 loc) · 8.42 KB

tinq.Projects

Official Tinq.ai python SDK For help and support please check: https://docs.tinq.ai/sdks/python

All URIs are relative to https://tinq.ai/api/v2

Method HTTP request Description
create_project POST /projects Create Project
get_all_projects GET /projects/ Get All Projects
get_project GET /projects/{project} Get Project
update_project PUT /projects/{project} Update Project

create_project

create_project(body=body)

Create Project

Example

  • Bearer Authentication (bearerAuth):
import tinq
from tinq.rest import ApiException
from pprint import pprint

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

# 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 Bearer authorization: bearerAuth
configuration = tinq.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with tinq.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tinq.Projects(api_client)
    body = None # object |  (optional)

    try:
        # Create Project
        api_instance.create_project(body=body)
    except Exception as e:
        print("Exception when calling Projects->create_project: %s\n" % e)

Parameters

Name Type Description Notes
body object [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -

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

get_all_projects

get_all_projects(order=order, column_sort=column_sort, name=name)

Get All Projects

Get all your projects

Example

  • Bearer Authentication (bearerAuth):
import tinq
from tinq.rest import ApiException
from pprint import pprint

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

# 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 Bearer authorization: bearerAuth
configuration = tinq.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with tinq.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tinq.Projects(api_client)
    order = 'DESC' # str |  (optional)
    column_sort = 'created_at' # str |  (optional)
    name = 'name_example' # str |  (optional)

    try:
        # Get All Projects
        api_instance.get_all_projects(order=order, column_sort=column_sort, name=name)
    except Exception as e:
        print("Exception when calling Projects->get_all_projects: %s\n" % e)

Parameters

Name Type Description Notes
order str [optional]
column_sort str [optional]
name str [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -

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

get_project

get_project(project)

Get Project

Get a specific project given its identifier

Example

  • Bearer Authentication (bearerAuth):
import tinq
from tinq.rest import ApiException
from pprint import pprint

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

# 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 Bearer authorization: bearerAuth
configuration = tinq.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with tinq.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tinq.Projects(api_client)
    project = 'project_example' # str | 

    try:
        # Get Project
        api_instance.get_project(project)
    except Exception as e:
        print("Exception when calling Projects->get_project: %s\n" % e)

Parameters

Name Type Description Notes
project str

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -

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

update_project

update_project(project, body=body)

Update Project

Example

  • Bearer Authentication (bearerAuth):
import tinq
from tinq.rest import ApiException
from pprint import pprint

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

# 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 Bearer authorization: bearerAuth
configuration = tinq.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with tinq.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tinq.Projects(api_client)
    project = 'project_example' # str | 
    body = None # object |  (optional)

    try:
        # Update Project
        api_instance.update_project(project, body=body)
    except Exception as e:
        print("Exception when calling Projects->update_project: %s\n" % e)

Parameters

Name Type Description Notes
project str
body object [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -

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