API bindings for the Lilt REST API.
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 |
Comment create_comment(document_id, segment_id, body)
Create a new comment
Create a new comment for the specified Segment ID.
configuration = lilt.Configuration( host = “https://lilt.com/2” )
configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )
configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )
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) ```
configuration = lilt.Configuration( host = “https://lilt.com/2” )
configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )
configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )
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) ```
Name | Type | Description | Notes |
---|---|---|---|
document_id | int | A unique document identifier. | |
segment_id | int | A unique segment identifier. | |
body | CommentBody | The comment being created |
| 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]
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
configuration = lilt.Configuration( host = “https://lilt.com/2” )
configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )
configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )
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) ```
configuration = lilt.Configuration( host = “https://lilt.com/2” )
configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )
configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )
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) ```
Name | Type | Description | Notes |
---|---|---|---|
comment_id | int | A unique Comment identifier. |
| 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]
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
configuration = lilt.Configuration( host = “https://lilt.com/2” )
configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )
configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )
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) ```
configuration = lilt.Configuration( host = “https://lilt.com/2” )
configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )
configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )
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) ```
Name | Type | Description | Notes |
---|---|---|---|
document_id | int | A unique document identifier. |
| 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]
Comment update_comment(comment_id, document_id, body)
Update an existing comment
Update an existing comment.
configuration = lilt.Configuration( host = “https://lilt.com/2” )
configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )
configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )
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) ```
configuration = lilt.Configuration( host = “https://lilt.com/2” )
configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )
configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )
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) ```
Name | Type | Description | Notes |
---|---|---|---|
comment_id | int | A unique comment identifier. | |
document_id | int | A unique document identifier. | |
body | CommentBody | The comment being updated. |
| 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]