Skip to content

A TypeScript-based API client for interacting with the Usemotion API

Notifications You must be signed in to change notification settings

gitchrisqueen/usemotion-api-client

Repository files navigation

usemotion_api_client

Rate Limit Information

The Motion API is currently rate limited to 12 requests per minute per user. In the event a user exceeds this rate limit 3 times in a singe 24 hour period, their API access will be disabled and will require that they contact support to have it re-enabled.

Note on Date Formats

All dates that the Motion API works with are in the format of ISO 8601. Motion will always return dates in UTC.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/gitchrisqueen/usemotion-api-client.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/gitchrisqueen/usemotion-api-client.git)

Then import the package:

import usemotion_api_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import usemotion_api_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import time
import usemotion_api_client
from usemotion_api_client.rest import ApiException
from pprint import pprint

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

# 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: Motion_API_Key
configuration.api_key['Motion_API_Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Motion_API_Key'] = 'Bearer'


# Enter a context with an instance of the API client
with usemotion_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = usemotion_api_client.CommentsApi(api_client)
    task_id = 'task_id_example' # str | 
    cursor = 'cursor_example' # str | Use if a previous request returned a cursor. Will page through results (optional)

    try:
        # List Comments
        api_response = api_instance.comments_controller_get_comments(task_id, cursor=cursor)
        print("The response of CommentsApi->comments_controller_get_comments:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CommentsApi->comments_controller_get_comments: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.usemotion.com/v1

Class Method HTTP request Description
CommentsApi comments_controller_get_comments GET /comments List Comments
CommentsApi comments_controller_post_comment POST /comments Create Comment
ProjectsApi projects_controller_get GET /projects List Projects
ProjectsApi projects_controller_get_single_project GET /projects/{projectId} Retrieve Project
ProjectsApi projects_controller_post POST /projects Create Project
RecurringTasksApi recurring_tasks_controller_delete_task DELETE /recurring-tasks/{taskId} Delete a Recurring Task
RecurringTasksApi recurring_tasks_controller_list_recurring_tasks GET /recurring-tasks List Recurring Tasks
RecurringTasksApi recurring_tasks_controller_post_recurring_task POST /recurring-tasks Create a Recurring Task
SchedulesApi schedules_controller_get_my_schedules GET /schedules Get schedules
TasksApi tasks_controller_delete_assignee DELETE /tasks/{taskId}/assignee Unassign a task
TasksApi tasks_controller_delete_task DELETE /tasks/{taskId} Delete a Task
TasksApi tasks_controller_get GET /tasks List Tasks
TasksApi tasks_controller_get_by_id GET /tasks/{taskId} Retrieve a Task
TasksApi tasks_controller_move_task PATCH /tasks/{taskId}/move Move Workspace
TasksApi tasks_controller_post POST /tasks Create Task
TasksApi tasks_controller_update_task PATCH /tasks/{taskId} Update a Task
UsersApi users_controller_get GET /users List users
UsersApi users_controller_get_me GET /users/me Get My User
WorkspacesApi statuses_controller_get GET /statuses List statuses for a workspace
WorkspacesApi workspaces_controller_get GET /workspaces List workspaces

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

Motion_API_Key

  • Type: API key
  • API key parameter name: X-API-Key
  • Location: HTTP header

Author

[email protected]

About

A TypeScript-based API client for interacting with the Usemotion API

Resources

Stars

Watchers

Forks

Packages

No packages published