lilt-python

API bindings for the Lilt REST API.

View the Project on GitHub lilt/lilt-python

lilt.CommentsApi

All URIs are relative to https://lilt.com/2

Method HTTP request Description
create_comment POST /comments Create a new comment
delete_comment DELETE /comments Delete a Comment
get_document_comments GET /comments Retrieve a document's comments by segment
update_comment PUT /comments Update an existing comment

create_comment

Comment create_comment(document_id, segment_id, body)

Create a new comment

Create a new comment for the specified Segment ID.

Example

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 = lilt.Configuration( host = “https://lilt.com/2”, 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’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.CommentsApi(api_client) document_id = 56 # int | A unique document identifier. segment_id = 56 # int | A unique segment identifier. body = lilt.CommentBody() # CommentBody | The comment being created

try:
    # Create a new comment
    api_response = api_instance.create_comment(document_id, segment_id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommentsApi->create_comment: %s\n" % e) ```

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 = lilt.Configuration( host = “https://lilt.com/2”, 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’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.CommentsApi(api_client) document_id = 56 # int | A unique document identifier. segment_id = 56 # int | A unique segment identifier. body = lilt.CommentBody() # CommentBody | The comment being created

try:
    # Create a new comment
    api_response = api_instance.create_comment(document_id, segment_id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommentsApi->create_comment: %s\n" % e) ```

Parameters

Name Type Description Notes
document_id int A unique document identifier.  
segment_id int A unique segment identifier.  
body CommentBody The comment being created  

Return type

Comment

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 201 | A Comment object. | - | 0 | Unexpected error | - |

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

delete_comment

CommentDeleteResponse delete_comment(comment_id)

Delete a Comment

Delete a Comment. Example CURL command: curl -X DELETE https://lilt.com/2/comments?key=API_KEY&comment_id=123

Example

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 = lilt.Configuration( host = “https://lilt.com/2”, 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’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.CommentsApi(api_client) comment_id = 56 # int | A unique Comment identifier.

try:
    # Delete a Comment
    api_response = api_instance.delete_comment(comment_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommentsApi->delete_comment: %s\n" % e) ```

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 = lilt.Configuration( host = “https://lilt.com/2”, 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’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.CommentsApi(api_client) comment_id = 56 # int | A unique Comment identifier.

try:
    # Delete a Comment
    api_response = api_instance.delete_comment(comment_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommentsApi->delete_comment: %s\n" % e) ```

Parameters

Name Type Description Notes
comment_id int A unique Comment identifier.  

Return type

CommentDeleteResponse

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 204 | A status object. | - | 0 | Unexpected error | - |

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

get_document_comments

DocumentComments get_document_comments(document_id)

Retrieve a document’s comments by segment

Retrieves all comments associated with a specified document, grouped by their Segment’s ID. To retrieve a document’s comments, specify the document_id request parameter. Example CURL command: curl -X GET https://lilt.com/2/comments?key=API_KEY&document_id=123

Example

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 = lilt.Configuration( host = “https://lilt.com/2”, 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’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.CommentsApi(api_client) document_id = 56 # int | A unique document identifier.

try:
    # Retrieve a document's comments by segment
    api_response = api_instance.get_document_comments(document_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommentsApi->get_document_comments: %s\n" % e) ```

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 = lilt.Configuration( host = “https://lilt.com/2”, 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’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.CommentsApi(api_client) document_id = 56 # int | A unique document identifier.

try:
    # Retrieve a document's comments by segment
    api_response = api_instance.get_document_comments(document_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommentsApi->get_document_comments: %s\n" % e) ```

Parameters

Name Type Description Notes
document_id int A unique document identifier.  

Return type

DocumentComments

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | An object containing lists of comments identified by the id of the segment to which they belong. | - | 403 | User does not have permission for provided document. | - | 410 | Comment deleted. | - | 0 | Unexpected error. | - |

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

update_comment

Comment update_comment(comment_id, document_id, body)

Update an existing comment

Update an existing comment.

Example

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 = lilt.Configuration( host = “https://lilt.com/2”, 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’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.CommentsApi(api_client) comment_id = 56 # int | A unique comment identifier. document_id = 56 # int | A unique document identifier. body = lilt.CommentBody() # CommentBody | The comment being updated.

try:
    # Update an existing comment
    api_response = api_instance.update_comment(comment_id, document_id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommentsApi->update_comment: %s\n" % e) ```

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 = lilt.Configuration( host = “https://lilt.com/2”, 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’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.CommentsApi(api_client) comment_id = 56 # int | A unique comment identifier. document_id = 56 # int | A unique document identifier. body = lilt.CommentBody() # CommentBody | The comment being updated.

try:
    # Update an existing comment
    api_response = api_instance.update_comment(comment_id, document_id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommentsApi->update_comment: %s\n" % e) ```

Parameters

Name Type Description Notes
comment_id int A unique comment identifier.  
document_id int A unique document identifier.  
body CommentBody The comment being updated.  

Return type

Comment

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 201 | A Comment object. | - | 0 | Unexpected error | - |

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