diff --git a/.dockerignore b/.dockerignore
deleted file mode 100644
index 196a84ec..00000000
--- a/.dockerignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.git
-*.pyc
-__pycache__
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
deleted file mode 100644
index a7a2389d..00000000
--- a/.github/workflows/build.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-name: Build
-
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
-
-defaults:
- run:
- shell: bash
-
-jobs:
- test:
- name: pytest
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- os: [ubuntu-latest]
- python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
- steps:
- - uses: actions/checkout@v3
- - name: Set up Python
- uses: actions/setup-python@v3
- with:
- python-version: ${{ matrix.python-version }}
- - run: pip install -r requirements.txt
- - run: pytest
-
\ No newline at end of file
diff --git a/.github/workflows/publish-to-github-releases.yml b/.github/workflows/publish-to-github-releases.yml
deleted file mode 100644
index 5e4f6450..00000000
--- a/.github/workflows/publish-to-github-releases.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-name: Publish to GitHub Releases
-
-on:
- push:
- tags:
- - "v*.*.*"
-
-jobs:
- build-n-publish-to-github:
- name: Build and publish to GitHub Releases
- runs-on: ubuntu-latest
- steps:
- - name: Publish to GitHub Releases
- uses: softprops/action-gh-release@v1
- with:
- # Use the newest commit message as the release description
- body: ${{ github.event.head_commit.message }}
diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml
deleted file mode 100644
index c6aa1548..00000000
--- a/.github/workflows/publish-to-pypi.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
-
-on:
- release:
- types: [published]
- push:
- tags:
- - "v*.*.*"
-
-jobs:
- build-n-publish-to-pypi:
- name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Set up Python 3.7
- uses: actions/setup-python@v3
- with:
- python-version: 3.7
- - name: Install pypa/build
- run: >-
- python -m
- pip install
- build
- --user
- - name: Build a binary wheel and a source tarball
- run: >-
- python -m
- build
- --sdist
- --wheel
- --outdir dist/
- .
- - name: Publish distribution 📦 to Test PyPI
- uses: pypa/gh-action-pypi-publish@master
- with:
- password: ${{ secrets.TEST_PYPI_API_TOKEN }}
- repository_url: https://test.pypi.org/legacy/
- - name: Publish distribution 📦 to PyPI
- uses: pypa/gh-action-pypi-publish@master
- with:
- password: ${{ secrets.PYPI_API_TOKEN }}
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index c4fa9d5f..cf18b79f 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -1,57 +1,59 @@
-name: Bump Version and Publish
+name: Generate client library + Publish 📦 to PyPI + Publish to GitHub Releases
on:
workflow_dispatch:
inputs:
- bumpVersion:
- description: Choose a version number to bump
+ version:
required: true
- type: choice
- options:
- - patch
- - minor
- - major
jobs:
- bump-semantic-versioning:
- name: Bump the semantic versioning for the package
+ generate-python-library:
+ name: Generate python client library
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- - name: Set up Python 3.7
- uses: actions/setup-python@v4
+ - uses: actions/setup-java@v3
with:
- python-version: 3.7
- - name: Run deploy script
+ distribution: "temurin"
+ java-version: "17"
+ - name: Setup environment variables
run: |
- git config user.name github-actions
- git config user.email github-actions@github.com
- python deploy.py ${{ inputs.bumpVersion }}
- publish-to-github:
- needs: bump-semantic-versioning
- name: Publish to GitHub Releases
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- ref: master
- - name: Get version tag
- id: tag
- run: echo "version=v$(cat VERSION)" >> $GITHUB_OUTPUT
- - name: Print version tag
- run: echo ${{ steps.tag.outputs.version }}
- - name: Publish to GitHub Releases
- uses: softprops/action-gh-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ echo "generator_version=3.0.46" >> "$GITHUB_ENV"
+ echo "generator_name=swagger-codegen-cli.jar" >> "$GITHUB_ENV"
+ echo "jar_asana=codegen/swagger/target/AsanaClientCodegen-swagger-codegen-1.0.0.jar" >> "$GITHUB_ENV"
+ echo "actual_lang=com.asana.codegen.PythonClientCodegenGenerator" >> "$GITHUB_ENV"
+ echo "name=asana" >> "$GITHUB_ENV"
+ - name: Download generator
+ run: |
+ wget -q -O $generator_name https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/${{ env.generator_version }}/swagger-codegen-cli-${{ env.generator_version }}.jar
+ - name: Build custom code
+ run: |
+ pushd codegen/swagger >/dev/null
+ mvn package
+ popd >/dev/null
+ - name: Generate library
+ run: >-
+ java -cp "${{ env.jar_asana }}:${{ env.generator_name }}"
+ io.swagger.codegen.v3.cli.SwaggerCodegen
+ generate
+ --input-spec https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_sdk_oas.yaml
+ --template-dir "codegen/templates"
+ --lang "${{ env.actual_lang }}"
+ -DpackageName=${{ env.name }}
+ --additional-properties "packageVersion=${{ inputs.version }},projectName=${{ env.name }},packageName=${{ env.name }}"
+ - name: Clean up generator
+ run: rm -rf codegen/swagger/target ${{ env.generator_name }}
+ - name: Push changes to master branch
+ uses: EndBug/add-and-commit@v9
with:
- tag_name: ${{ steps.tag.outputs.version }}
- # Use the newest commit message as the release description
- body: ${{ github.event.head_commit.message }}
+ message: 'Updated Python SDK: v${{ inputs.version }}'
+ committer_name: GitHub Actions
+ committer_email: actions@github.com
+ tag: 'v${{ inputs.version }} --force'
+ tag_push: '--force'
build-n-publish-to-pypi:
- needs: [bump-semantic-versioning, publish-to-github]
- name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
+ needs: generate-python-library
+ name: Build and publish Python 🐍 distributions 📦 to TestPyPI and PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -82,6 +84,21 @@ jobs:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
- uses: pypa/gh-action-pypi-publish@master
+ uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
+ publish-to-github:
+ needs: build-n-publish-to-pypi
+ name: Publish to GitHub Releases
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ ref: master
+ - name: Publish to GitHub Releases
+ uses: softprops/action-gh-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: ${{ inputs.version }}
diff --git a/.gitignore b/.gitignore
index f6d87f8d..447b9425 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,67 @@
-.idea
-/build
-/dist
-/*.egg-info
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
-__pycache__
-*.pyc
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
.cache
+nosetests.xml
+coverage.xml
+*,cover
+.hypothesis/
+venv/
+.python-version
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+#Ipython Notebook
+.ipynb_checkpoints
+
+.travis.yml
+git_push.sh
diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore
deleted file mode 100644
index b0c534d4..00000000
--- a/.swagger-codegen-ignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Swagger Codegen Ignore
-
-test/*
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 345ea0f7..00000000
--- a/Dockerfile
+++ /dev/null
@@ -1,20 +0,0 @@
-FROM python:3
-
-WORKDIR /app
-
-ADD requirements.txt /app/requirements.txt
-
-RUN pip install -r requirements.txt
-
-ADD asana /app/asana
-ADD examples /app/examples
-ADD tests /app/tests
-ADD setup.py /app/setup.py
-ADD README.md /app/README.md
-
-RUN find . -name '*.pyc' -delete
-
-RUN python --version
-RUN python -m pytest
-
-RUN python setup.py bdist_egg
diff --git a/README.md b/README.md
deleted file mode 100644
index e1b215b7..00000000
--- a/README.md
+++ /dev/null
@@ -1,183 +0,0 @@
-# asana [![Build][github-actions-image]][github-actions-url] [![PyPi Version][pypi-image]][pypi-url]
-
-> **Warning**
-> Python client library version `>4.X.X` is currently in BETA and subject to change. Please use v3.2.X for stable / production environments `pip install asana` or `pip install asana==3.2.2`. If you have feedback on the new version, please your feedback [here](https://form.asana.com/?k=C4sELCq6hAUsoWEY0kJwAA&d=15793206719).
-
-> You can try out our new python beta by installing version [v4.0.11](https://github.com/Asana/python-asana/tree/v4.0.11) (`pip install asana==4.0.11`)
-
-Python client library for Asana.
-
-Authentication
---------------
-
-### Personal Access Token
-
-Create a client using your Asana Personal Access Token:
-
- client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
-
-### OAuth 2
-
-Asana supports OAuth 2. `asana` handles some of the details of the OAuth flow for you.
-
-Create a client using your OAuth Client ID and secret:
-
- client = asana.Client.oauth(
- client_id='ASANA_CLIENT_ID',
- client_secret='ASANA_CLIENT_SECRET',
- redirect_uri='https://yourapp.com/auth/asana/callback'
- )
-
-Redirect the user to the authorization URL obtained from the client's `session` object:
-
- (url, state) = client.session.authorization_url()
-
-When the user is redirected back to your callback, check the `state` URL parameter matches, then pass the `code` parameter to obtain a bearer token:
-
- if request.params['state'] == state:
- token = client.session.fetch_token(code=request.params['code'])
- # ...
- else:
- # error! possible CSRF attack
-
-Note: if you're writing a non-browser-based application (e.x. a command line tool) you can use the special redirect URI `urn:ietf:wg:oauth:2.0:oob` to prompt the user to copy and paste the code into the application.
-
-Usage
------
-
-The client's methods are divided into several resources: `attachments`, `events`, `jobs`, `portfolios`, `portfolio_memberships`, `projects`, `project_memberships`, `stories`, `tags`, `tasks`, `teams`, `users`, `user_task_lists`, and `workspaces`.
-
-Methods that return a single object return that object directly:
-
- me = client.users.get_user('me')
- print(f'Hello {me['name']}')
-
- workspace_id = me['workspaces'][0]['gid']
- project = client.projects.create_in_workspace(workspace_id, { 'name': 'new project' })
- print(f'Created project with id: {project['gid']}')
-
-Methods that return multiple items (e.x. `get_tasks`, `get_projects`, `get_portfolios`, etc.) return a page iterator by default. See the "Collections" section.
-
-#### See [the gen folder](asana/resources/gen) for methods available for each resource.
-
-Options
--------
-
-Various options can be set globally on the `Client.DEFAULTS` object, per-client on `client.options`, or per-request as additional named arguments. For example:
-
- # global:
- asana.Client.DEFAULT_OPTIONS['page_size'] = 100
-
- # per-client:
- client.options['page_size'] = 100
-
- # per-request:
- client.tasks.get_tasks({ 'project': 1234 }, page_size=100)
-
-### Available options
-
-* `base_url` (default: "https://app.asana.com/api/1.0"): API endpoint base URL to connect to
-* `max_retries` (default: 5): number to times to retry if API rate limit is reached or a server error occures. Rate limit retries delay until the rate limit expires, server errors exponentially backoff starting with a 1 second delay.
-* `full_payload` (default: False): return the entire JSON response instead of the 'data' propery (default for collection methods and `events.get`)
-* `fields` and `expand`: see [API documentation](https://asana.com/developers/documentation/getting-started/input-output-options)
-
-Collections (methods returning an array as its 'data' property):
-
-* `iterator_type` (default: "items"): specifies which type of iterator (or not) to return. Valid values are "items" and `None`.
-* `item_limit` (default: None): limits the number of items of a collection to return.
-* `page_size` (default: 50): limits the number of items per page to fetch at a time.
-* `offset`: offset token returned by previous calls to the same method (in `response['next_page']['offset']`)
-
-Events:
-
-* `poll_interval` (default: 5): polling interval for getting new events via `events.get_next` and `events.get_iterator`
-* `sync`: sync token returned by previous calls to `events.get` (in `response['sync']`)
-
-### Asana Change Warnings
-
-You will receive warning logs if performing requests that may be affected by a deprecation. The warning contains a link that explains the deprecation.
-
-If you receive one of these warnings, you should:
-* Read about the deprecation.
-* Resolve sections of your code that would be affected by the deprecation.
-* Add the deprecation flag to your "asana-enable" header.
-
-You can place it on the client for all requests, or place it on a single request.
-
- client.headers={'asana-enable': 'string_ids'}
- or
- me = client.users.get_user('me', headers={'asana-enable': 'string_ids'})
-
-If you would rather suppress these warnings, you can set
-
- client.LOG_ASANA_CHANGE_WARNINGS = False
-
-Collections
------------
-
-### Items Iterator
-
-By default, methods that return a collection of objects return an item iterator:
-
- workspaces = client.workspaces.get_workspaces(item_limit=1)
- print(next(workspaces))
- print(next(workspaces)) # raises StopIteration if there are no more items
-
-Or:
-
- for workspace in client.workspaces.get_workspaces()
- print(workspace)
-
-### Raw API
-
-You can also use the raw API to fetch a page at a time:
-
- offset = None
- while True:
- page = client.workspaces.get_workspaces(offset=offset, iterator_type=None, full_payload=True)
- print(page['data'])
- if 'next_page' in page and page['next_page']:
- offset = page['next_page']['offset']
- else:
- break
-
-Contributing
-------------
-
-Feel free to fork and submit pull requests for the code! Please follow the
-existing code as an example of style and make sure that all your code passes
-lint and tests.
-
-### Code generation
-
-The specific Asana resource classes under `gen` (`_Tag`, `_Workspace`, `_Task`, etc) are
-generated code, hence they shouldn't be modified by hand.
-
-### Deployment
-
-**Repo Owners Only.** Take the following steps to issue a new release of the library.
-
-#### Automatic Deployment
-
-Run `deploy.py [major|minor|patch]`. See `deploy.py -h` for additional info.
-
-#### Manual Deployment
-
- 1. Merge in the desired changes into the `master` branch and commit them.
- 2. Clone the repo, work on master.
- 3. Edit package version in `asana/__init__.py` and `./VERSION` to indicate the [semantic version](http://semver.org/) change.
- 4. Commit the change
- 5. Tag the commit with `v` plus the same version number you set in the file.
- `git tag v1.2.3`
- 6. Push changes to origin, including tags:
- `git push origin master --tags`
-
-GitHub Actions will automatically build and deploy the tagged release to [PyPI](https://pypi.org/).
-
-[github-actions-url]: https://github.com/Asana/python-asana/actions
-[github-actions-image]: https://github.com/Asana/python-asana/workflows/Build/badge.svg
-
-[pypi-url]: https://pypi.python.org/pypi/asana/
-[pypi-image]: https://img.shields.io/pypi/v/asana.svg?style=flat-square
-
-[asana-docs]: https://developers.asana.com/docs
diff --git a/TESTING b/TESTING
deleted file mode 100644
index d1917e59..00000000
--- a/TESTING
+++ /dev/null
@@ -1,4 +0,0 @@
-Unit tests
-----------
-
- py.test tests
diff --git a/VERSION b/VERSION
deleted file mode 100644
index acf9bf09..00000000
--- a/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-3.2.2
\ No newline at end of file
diff --git a/asana/__init__.py b/asana/__init__.py
deleted file mode 100644
index 863b9d31..00000000
--- a/asana/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-__title__ = 'asana'
-__license__ = 'MIT'
-__copyright__ = 'Copyright 2016 Asana, Inc.'
-
-from asana.version import __version__
-from .client import Client
diff --git a/asana/client.py b/asana/client.py
deleted file mode 100644
index f72b1727..00000000
--- a/asana/client.py
+++ /dev/null
@@ -1,367 +0,0 @@
-from types import ModuleType
-import json
-import platform
-import time
-import string
-import warnings
-
-import requests
-
-from . import error, resources, session, __version__
-from .page_iterator import CollectionPageIterator
-import urllib.parse as urlparse
-
-# Create a dict of resource classes
-RESOURCE_CLASSES = {}
-for name, module in resources.__dict__.items():
- classified_name = string.capwords(name, '_').replace('_', '')
- if classified_name == "BatchApi":
- classified_name = "BatchAPI"
- if classified_name == "AuditLogApi":
- classified_name = "AuditLogAPI"
- if isinstance(module, ModuleType) and classified_name in module.__dict__:
- RESOURCE_CLASSES[name] = module.__dict__[classified_name]
-
-# Create a mapping of status codes to classes
-STATUS_MAP = {}
-for name, Klass in error.__dict__.items():
- if isinstance(Klass, type) and issubclass(Klass, error.AsanaError):
- STATUS_MAP[Klass().status] = Klass
-
-
-class Client(object):
- """Asana client class"""
-
- DEFAULT_OPTIONS = {
- 'base_url': 'https://app.asana.com/api/1.0',
- 'item_limit': None,
- 'page_size': 50,
- 'poll_interval': 5,
- 'max_retries': 5,
- 'full_payload': False,
- 'iterator_type': 'items'
- }
-
- RETRY_DELAY = 1.0
- RETRY_BACKOFF = 2.0
-
- CLIENT_OPTIONS = set(DEFAULT_OPTIONS.keys())
- QUERY_OPTIONS = {'limit', 'offset', 'sync'}
- REQUEST_OPTIONS = {'headers', 'params', 'data', 'files', 'verify',
- 'timeout'}
- API_OPTIONS = {'pretty', 'fields', 'expand', 'client_name'}
-
- LOG_ASANA_CHANGE_WARNINGS = True
-
- ALL_OPTIONS = (
- CLIENT_OPTIONS | QUERY_OPTIONS | REQUEST_OPTIONS | API_OPTIONS)
-
- def __init__(self, session=None, auth=None, **options):
- """A :class:`Client` object for interacting with Asana's API.
-
- A Client object with session, optional auth handler, and options.
-
- """
- self.session = session or requests.Session()
- self.auth = auth
- self.headers = options.pop('headers', {})
- # merge the provided options (if any) with the global DEFAULTS
- self.options = _merge(self.DEFAULT_OPTIONS, options)
- # intializes each resource, injecting this client object into the
- # constructor
- for name, Klass in RESOURCE_CLASSES.items():
- setattr(self, name, Klass(self))
-
- def request(self, method, path, **options):
- """Dispatches a request to the Asana HTTP API"""
- options = self._merge_options(options)
- url = options['base_url'] + path
- retry_count = 0
- request_options = self._parse_request_options(options)
- self._add_version_header(request_options)
- while True:
- try:
- try:
- response = getattr(self.session, method)(
- url, auth=self.auth, **request_options)
- except requests.exceptions.Timeout:
- raise error.RetryableAsanaError()
-
- self._log_asana_change_header(request_options['headers'], response.headers)
- if response.status_code in STATUS_MAP:
- raise STATUS_MAP[response.status_code](response)
- elif 500 <= response.status_code < 600:
- # Any unhandled 500 is a server error.
- raise error.ServerError(response)
- else:
- if options['full_payload']:
- return response.json()
- else:
- return response.json()['data']
- except error.RetryableAsanaError as e:
- if retry_count < options['max_retries']:
- self._handle_retryable_error(e, retry_count)
- retry_count += 1
- else:
- raise e
-
- def _log_asana_change_header(self, req_headers, res_headers):
- if self.LOG_ASANA_CHANGE_WARNINGS:
- change_header_key = None
-
- for key in res_headers:
- if key.lower() == 'asana-change':
- change_header_key = key
-
- if change_header_key is not None:
- accounted_for_flags = []
-
- # Grab the request's asana-enable flags
- for reqHeader in req_headers:
- if reqHeader.lower() == 'asana-enable':
- for flag in req_headers[reqHeader].split(','):
- accounted_for_flags.append(flag)
- elif reqHeader.lower() == 'asana-disable':
- for flag in req_headers[reqHeader].split(','):
- accounted_for_flags.append(flag)
-
- changes = res_headers[change_header_key].split(',')
-
- for unsplit_change in changes:
- change = unsplit_change.split(';')
-
- name = None
- info = None
- affected = None
-
- for unsplit_field in change:
- field = unsplit_field.split('=')
-
- field[0] = field[0].strip()
- if field[0].strip() == 'name':
- name = field[1].strip()
- elif field[0].strip() == 'info':
- info = field[1].strip()
- elif field[0].strip() == 'affected':
- affected = field[1].strip()
-
- # Only show the error if the flag was not in the request's asana-enable header
- if (name not in accounted_for_flags) & (affected == 'true'):
- message = 'This request is affected by the "' + name + \
- '" deprecation. Please visit this url for more info: ' + info + \
- '\n' + 'Adding "' + name + '" to your "Asana-Enable" or ' + \
- '"Asana-Disable" header will opt in/out to this deprecation ' + \
- 'and suppress this warning.'
-
- warnings.warn(message)
-
-
- def _handle_retryable_error(self, e, retry_count):
- """Sleep based on the type of :class:`RetryableAsanaError`"""
- if isinstance(e, error.RateLimitEnforcedError):
- time.sleep(e.retry_after)
- else:
- time.sleep(self.RETRY_DELAY * (self.RETRY_BACKOFF ** retry_count))
-
- def get(self, path, query, **options):
- """Parses GET request options and dispatches a request."""
- api_options = self._parse_api_options(options, query_string=True)
- query_options = self._parse_query_options(options)
- parameter_options = self._parse_parameter_options(options)
-
- # options in the query takes precendence
- query = _merge(query_options, api_options, parameter_options, query)
- return self.request('get', path, params=query, **options)
-
- def get_collection(self, path, query, **options):
- """Get a collection from a collection endpoint.
-
- Parses GET request options for a collection endpoint and dispatches a
- request.
-
- """
- options = self._merge_options(options)
- if options['iterator_type'] == 'items':
- return CollectionPageIterator(self, path, query, options).items()
- if options['iterator_type'] is None:
- return self.get(path, query, **options)
- raise Exception('Unknown value for "iterator_type" option: {}'.format(
- str(options['iterator_type'])))
-
- def post(self, path, data, **options):
- """Parses POST request options and dispatches a request."""
- parameter_options = self._parse_parameter_options(options)
- body = {
- # values in the data body takes precendence
- 'data': _merge(parameter_options, data),
- 'options': self._parse_api_options(options)
- }
- headers = _merge(
- {'content-type': 'application/json'},
- options.pop('headers', {})
- )
- return self.request('post', path, data=body, headers=headers, **options)
-
- def put(self, path, data, **options):
- """Parses PUT request options and dispatches a request."""
- parameter_options = self._parse_parameter_options(options)
- body = {
- # values in the data body takes precendence
- 'data': _merge(parameter_options, data),
- 'options': self._parse_api_options(options)
- }
- headers = _merge(
- {'content-type': 'application/json'},
- options.pop('headers', {})
- )
- return self.request('put', path, data=body, headers=headers, **options)
-
- def delete(self, path, data, **options):
- """Dispatches a DELETE request."""
- return self.request('delete', path, **options)
-
- def _merge_options(self, *objects):
- """Merge option objects with the client's object.
-
- Merges one or more options objects with client's options and returns a
- new options object.
-
- """
- return _merge(self.options, *objects)
-
- def _parse_query_options(self, options):
- """Select query string options out of the provided options object"""
- return self._select_options(options, self.QUERY_OPTIONS)
-
- def _parse_parameter_options(self, options):
- """Select all unknown options.
-
- Select all unknown options (not query string, API, or request
- options)
-
- """
- return self._select_options(options, self.ALL_OPTIONS, invert=True)
-
- def _parse_api_options(self, options, query_string=False):
- """Select API options out of the provided options object.
-
- Selects API string options out of the provided options object and
- formats for either request body (default) or query string.
-
- """
- api_options = self._select_options(options, self.API_OPTIONS)
- if query_string:
- # Prefix all options with "opt_"
- query_api_options = {}
- for key in api_options:
- # Transform list/tuples into comma separated list
- if isinstance(api_options[key], (list, tuple)):
- query_api_options[
- 'opt_' + key] = ','.join(api_options[key])
- else:
- query_api_options[
- 'opt_' + key] = api_options[key]
- return query_api_options
- else:
- return api_options
-
- def _parse_request_options(self, options):
- """Select request options out of the provided options object.
-
-
- Select and formats options to be passed to the 'requests' library's
- request methods.
-
- """
- request_options = self._select_options(options, self.REQUEST_OPTIONS)
- if 'params' in request_options:
- params = request_options['params']
- for key in params:
- if isinstance(params[key], bool):
- params[key] = json.dumps(params[key])
- if 'data' in request_options:
- # remove empty 'options':
- if 'options' in request_options['data'] and (
- len(request_options['data']['options']) == 0):
- del request_options['data']['options']
- # serialize 'data' to JSON, requests doesn't do this automatically:
- request_options['data'] = json.dumps(request_options['data'])
-
- headers = self.headers.copy()
- headers.update(request_options.get('headers', {}))
- request_options['headers'] = headers
- return request_options
-
- def _select_options(self, options, keys, invert=False):
- """Select the provided keys out of an options object.
-
-
- Selects the provided keys (or everything except the provided keys) out
- of an options object.
-
- """
- options = self._merge_options(options)
- result = {}
- for key in options:
- if (invert and key not in keys) or (not invert and key in keys):
- result[key] = options[key]
- return result
-
- def _add_version_header(self, options):
- """Add the client lib version header to the request."""
- headers = options.setdefault('headers', {})
- headers['X-Asana-Client-Lib'] = self._version_header()
-
- _cached_version_header = None
-
- def _version_header(self):
- """Generate the client version header to send on each request."""
- if not self._cached_version_header:
- self._cached_version_header = urlparse.urlencode(
- self._version_values())
- return self._cached_version_header
-
- def _version_values(self):
- """Generate the values to go in the client version header."""
- return {
- 'language': 'Python',
- 'version': __version__,
- 'language_version': platform.python_version(),
- 'os': platform.system(),
- 'os_version': platform.release()
- }
-
- @classmethod
- def basic_auth(Klass, apiKey):
- """DEPRECATED: this is only present for backwards-compatibility.
-
- This will be removed in the future; for new apps, prefer the
- `access_token` method.
-
- Construct an Asana Client using a Personal Access Token as if it
- were an old (removed) Asana API Key.
- """
- return Klass(auth=requests.auth.HTTPBasicAuth(apiKey, ''))
-
- @classmethod
- def access_token(Klass, accessToken):
- """Construct an Asana Client with a Personal Access Token"""
- return Klass(
- session.AsanaOAuth2Session(token={'access_token': accessToken}))
-
- @classmethod
- def oauth(Klass, **kwargs):
- """Construct an Asana Client with Oauth credentials.
-
- Construct an Asana Client with OAuth credentials ('client_id' and
- 'client_secret' or 'token').
-
- """
- return Klass(session.AsanaOAuth2Session(**kwargs))
-
-
-def _merge(*objects):
- """Merge one or more objects into a new object"""
- result = {}
- [result.update(obj) for obj in objects]
- return result
diff --git a/asana/error.py b/asana/error.py
deleted file mode 100644
index 71902f80..00000000
--- a/asana/error.py
+++ /dev/null
@@ -1,105 +0,0 @@
-class AsanaError(Exception):
- """Base Asana error class"""
- def __init__(self, message=None, status=None, response=None):
- try:
- messages = [
- error['message'] for error in response.json()['errors']]
- message = message + ': ' + '; '.join(messages)
- except Exception:
- pass
-
- super(AsanaError, self).__init__(message)
-
- self.status = status
- self.response = response
- self.message = message
-
-
-class InvalidRequestError(AsanaError):
- def __init__(self, response=None):
- super(InvalidRequestError, self).__init__(
- message='Invalid Request',
- status=400,
- response=response
- )
-
-
-class NoAuthorizationError(AsanaError):
- def __init__(self, response=None):
- super(NoAuthorizationError, self).__init__(
- message='No Authorization',
- status=401,
- response=response
- )
-
-
-class PremiumOnlyError(AsanaError):
- def __init__(self, response=None):
- super(PremiumOnlyError, self).__init__(
- message='Payment Required',
- status=402,
- response=response
- )
-
-
-class ForbiddenError(AsanaError):
- def __init__(self, response=None):
- super(ForbiddenError, self).__init__(
- message='Forbidden',
- status=403,
- response=response
- )
-
-
-class NotFoundError(AsanaError):
- def __init__(self, response=None):
- super(NotFoundError, self).__init__(
- message='Not Found',
- status=404,
- response=response
- )
-
-
-class InvalidTokenError(AsanaError):
- def __init__(self, response=None):
- super(InvalidTokenError, self).__init__(
- message='Sync token invalid or too old',
- status=412,
- response=response
- )
- self.sync = response is not None and response.json()['sync']
-
-
-class RetryableAsanaError(AsanaError):
- """Base class for retryable errors.
-
- Base class for errors which should trigger a retry (if configured to do
- so).
-
- """
- def __init__(self, message=None, status=None, response=None):
- super(RetryableAsanaError, self).__init__(
- message=message, status=status, response=response)
-
-
-class RateLimitEnforcedError(RetryableAsanaError):
- def __init__(self, response=None):
- super(RateLimitEnforcedError, self).__init__(
- message='Rate Limit Enforced',
- status=429,
- response=response
- )
- self.retry_after = (
- response is not None and float(response.headers['Retry-After']))
-
-
-class ServerError(RetryableAsanaError):
- def __init__(self, response=None):
- status = 500
- if response:
- status = response.status
- super(ServerError, self).__init__(
- message='Server Error',
- status=status,
- response=response
- )
diff --git a/asana/page_iterator.py b/asana/page_iterator.py
deleted file mode 100644
index 313c1d33..00000000
--- a/asana/page_iterator.py
+++ /dev/null
@@ -1,134 +0,0 @@
-
-from .error import InvalidTokenError
-import time
-
-class PageIterator(object):
- """Generic page iterator class, used for collections and events"""
-
- def __init__(self, client, path, query, options):
- self.client = client
- self.path = path
- self.query = query
- self.options = client._merge_options(options, { 'full_payload': True })
-
- self.item_limit = float('inf') if self.options.get('item_limit', None) == None else self.options['item_limit']
- self.page_size = self.options['page_size']
- self.count = 0
-
- self.continuation = False
-
- def __getattr__(self, name):
- """Getter for the custom named 'continuation' object."""
- if name == self.CONTINUATION_KEY:
- return self.continuation
- raise AttributeError("%r object has no attribute %r" % (self.__class__, attr))
-
- def __iter__(self):
- """Iterator interface, self is an iterator"""
- return self
-
- def __next__(self):
- """Iterator interface, returns the next 'page'"""
-
- # Compute the limit from the page size, and remaining item limit
- self.options['limit'] = min(self.page_size, self.item_limit - self.count)
- # If there is no continuation value or computed limit is 0, we're done
- if self.continuation == None or self.options['limit'] == 0:
- raise StopIteration
- # First call to __next__
- elif self.continuation == False:
- result = self.get_initial()
- # Subsequent calls to __next__
- else:
- result = self.get_next()
- # Extract the continuation from the response
- self.continuation = result.get(self.CONTINUATION_KEY, None)
- # Get the data, update the count, return the data
- data = result.get('data', None)
- if data != None:
- self.count += len(data)
- return data
-
- def next(self):
- """Alias for __next__"""
- return self.__next__()
-
- def items(self):
- """Returns an iterator for each item in each page"""
- for page in self:
- for item in page:
- yield item
-
-
-class CollectionPageIterator(PageIterator):
- """Iterator that returns one page of a collection at a time"""
-
- CONTINUATION_KEY = 'next_page'
-
- def get_initial(self):
- return self.client.get(self.path, self.query, **self.options)
-
- def get_next(self):
- self.options['offset'] = self.continuation['offset']
- return self.client.get(self.path, self.query, **self.options)
-
-
-class EventsPageIterator(PageIterator):
- """Iterator that returns the next page of events, polls until a non-empty page is returned"""
-
- CONTINUATION_KEY = 'sync'
-
- def get_initial(self):
- # If no sync token was provided, make a request to get one
- if 'sync' not in self.query:
- try:
- self.client.events.get(self.query, **self.options)
- except InvalidTokenError as e:
- # InvalidTokenError is expected to be thrown since we didn't provide a sync token
- self.continuation = e.sync
- else:
- self.continuation = self.query['sync']
- return self.get_next()
-
- def get_next(self):
- self.query['sync'] = self.continuation
- return self.client.events.get(self.query, **self.options)
-
- def __next__(self):
- # Override __next__ to continue polling until a non-empty page of events is returned
- while True:
- results = super(EventsPageIterator, self).__next__()
- if len(results) > 0:
- return results
- else:
- time.sleep(self.options['poll_interval'])
-
-
-class AuditLogAPIIterator(CollectionPageIterator):
- """Iterator that returns the next page of audit_log_api"""
-
- def __next__(self):
- """Override __next__ to stop when there is no more data"""
-
- # Compute the limit from the page size, and remaining item limit
- self.options['limit'] = min(
- self.page_size, self.item_limit - self.count)
- # If there is no continuation value or computed limit is 0, we're done
- if self.continuation == None or self.options['limit'] == 0:
- raise StopIteration
- # First call to __next__
- elif self.continuation == False:
- result = self.get_initial()
- # Subsequent calls to __next__
- else:
- result = self.get_next()
- # Extract the continuation from the response
- self.continuation = result.get(self.CONTINUATION_KEY, None)
- # Get the data
- data = result.get('data', None)
- # If there is no more data we're done. Otherwise, we update the count and return the data
- if not data:
- raise StopIteration
- else:
- self.count += len(data)
- return data
diff --git a/asana/resources/__init__.py b/asana/resources/__init__.py
deleted file mode 100644
index 58f3953f..00000000
--- a/asana/resources/__init__.py
+++ /dev/null
@@ -1,35 +0,0 @@
-from . import (
- attachments,
- audit_log_api,
- batch_api,
- custom_field_settings,
- custom_fields,
- events,
- goal_relationships,
- goals,
- jobs,
- memberships,
- message,
- organization_exports,
- portfolios,
- portfolio_memberships,
- project_briefs,
- project_memberships,
- project_statuses,
- project_templates,
- projects,
- sections,
- status_updates,
- stories,
- tags,
- tasks,
- teams,
- time_periods,
- team_memberships,
- typeahead,
- users,
- user_task_lists,
- webhooks,
- workspace_memberships,
- workspaces
-)
diff --git a/asana/resources/attachments.py b/asana/resources/attachments.py
deleted file mode 100644
index 9d44ddde..00000000
--- a/asana/resources/attachments.py
+++ /dev/null
@@ -1,36 +0,0 @@
-
-from .gen.attachments import _Attachments
-
-class Attachments(_Attachments):
- """Attachments resource"""
-
- def create_attachment_for_task(self, task_id, file_content, file_name, file_content_type=None, **options):
- """Upload an attachment for a task. Accepts a file object or string, file name, and optional file Content-Type"""
- path = '/tasks/%s/attachments' % (task_id)
- return self.client.request('post', path, files=[('file', (file_name, file_content, file_content_type))], **options)
-
- def create_on_task(self, task_id, file_content, file_name, file_content_type=None, **options):
- path = '/tasks/%s/attachments' % (task_id)
- return self.client.request('post', path, files=[('file', (file_name, file_content, file_content_type))], **options)
-
- def find_by_id(self, attachment, params={}, **options):
- """Returns the full record for a single attachment.
-
- Parameters
- ----------
- attachment : {Gid} Globally unique identifier for the attachment.
- [params] : {Object} Parameters for the request
- """
- path = "/attachments/%s" % (attachment)
- return self.client.get(path, params, **options)
-
- def find_by_task(self, task, params={}, **options):
- """Returns the compact records for all attachments on the task.
-
- Parameters
- ----------
- task : {Gid} Globally unique identifier for the task.
- [params] : {Object} Parameters for the request
- """
- path = "/tasks/%s/attachments" % (task)
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/audit_log_api.py b/asana/resources/audit_log_api.py
deleted file mode 100644
index 43c3e30f..00000000
--- a/asana/resources/audit_log_api.py
+++ /dev/null
@@ -1,19 +0,0 @@
-
-from .gen.audit_log_api import _AuditLogAPI
-from ..page_iterator import AuditLogAPIIterator
-
-
-class AuditLogAPI(_AuditLogAPI):
- """AuditLogAPI resource"""
-
- def get_audit_log_events(self, workspace_gid, params={}, **options):
- """Override get_audit_log_events to handle non-empty next_page parameter"""
- path = "/workspaces/{workspace_gid}/audit_log_events".replace(
- "{workspace_gid}", workspace_gid)
- options = self.client._merge_options(options)
- if options['iterator_type'] == 'items':
- return AuditLogAPIIterator(self.client, path, params, options).items()
- if options['iterator_type'] is None:
- return self.client.get(path, params, **options)
- raise Exception('Unknown value for "iterator_type" option: {}'.format(
- str(options['iterator_type'])))
diff --git a/asana/resources/batch_api.py b/asana/resources/batch_api.py
deleted file mode 100644
index c9f1954a..00000000
--- a/asana/resources/batch_api.py
+++ /dev/null
@@ -1,6 +0,0 @@
-
-from .gen.batch_api import _BatchAPI
-
-class BatchAPI(_BatchAPI):
- """BatchAPI resource"""
- pass
diff --git a/asana/resources/custom_field_settings.py b/asana/resources/custom_field_settings.py
deleted file mode 100644
index e524ba29..00000000
--- a/asana/resources/custom_field_settings.py
+++ /dev/null
@@ -1,26 +0,0 @@
-
-from .gen.custom_field_settings import _CustomFieldSettings
-
-class CustomFieldSettings(_CustomFieldSettings):
- """Custom Field Settings resource"""
- def find_by_project(self, project, params={}, **options):
- """Returns a list of all of the custom fields settings on a project.
-
- Parameters
- ----------
- project : {Gid} The ID of the project for which to list custom field settings
- [params] : {Object} Parameters for the request
- """
- path = "/projects/%s/custom_field_settings" % (project)
- return self.client.get_collection(path, params, **options)
-
- def find_by_portfolio(self, portfolio, params={}, **options):
- """Returns a list of all of the custom fields settings on a portfolio.
-
- Parameters
- ----------
- portfolio : {Gid} The ID of the portfolio for which to list custom field settings
- [params] : {Object} Parameters for the request
- """
- path = "/portfolios/%s/custom_field_settings" % (portfolio)
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/custom_fields.py b/asana/resources/custom_fields.py
deleted file mode 100644
index 45008c36..00000000
--- a/asana/resources/custom_fields.py
+++ /dev/null
@@ -1,140 +0,0 @@
-
-from .gen.custom_fields import _CustomFields
-
-class CustomFields(_CustomFields):
- """Custom Fields resource"""
- def add_enum_option(self, custom_field, params={}, **options):
- self.create_enum_option(custom_field, params, **options)
-
- def reorder_enum_option(self, custom_field, params={}, **options):
- self.insert_enum_option(custom_field, params, **options)
-
- def create(self, params={}, **options):
- """Creates a new custom field in a workspace. Every custom field is required to be created in a specific workspace, and this workspace cannot be changed once set.
-
- A custom field's `name` must be unique within a workspace and not conflict with names of existing task properties such as 'Due Date' or 'Assignee'. A custom field's `type` must be one of 'text', 'enum', or 'number'.
-
- Returns the full record of the newly created custom field.
-
- Parameters
- ----------
- [data] : {Object} Data for the request
- - workspace : {Gid} The workspace to create a custom field in.
- - resource_subtype : {String} The type of the custom field. Must be one of the given values.
- - [type] : {String} **Deprecated: New integrations should prefer the `resource_subtype` parameter.**
- - name : {String} The name of the custom field.
- - [description] : {String} The description of the custom field.
- - [precision] : {Integer} The number of decimal places for the numerical values. Required if the custom field is of type 'number'.
- - [enum_options] : {String} The discrete values the custom field can assume. Required if the custom field is of type 'enum'.
- """
- return self.client.post("/custom_fields", params, **options)
-
- def find_by_id(self, custom_field, params={}, **options):
- """Returns the complete definition of a custom field's metadata.
-
- Parameters
- ----------
- custom_field : {Gid} Globally unique identifier for the custom field.
- [params] : {Object} Parameters for the request
- """
- path = "/custom_fields/%s" % (custom_field)
- return self.client.get(path, params, **options)
-
- def find_by_workspace(self, workspace, params={}, **options):
- """Returns a list of the compact representation of all of the custom fields in a workspace.
-
- Parameters
- ----------
- workspace : {Gid} The workspace or organization to find custom field definitions in.
- [params] : {Object} Parameters for the request
- """
- path = "/workspaces/%s/custom_fields" % (workspace)
- return self.client.get_collection(path, params, **options)
-
- def update(self, custom_field, params={}, **options):
- """A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged
-
- When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field.
-
- An enum custom field's `enum_options` cannot be updated with this endpoint. Instead see "Work With Enum Options" for information on how to update `enum_options`.
-
- Locked custom fields can only be updated by the user who locked the field.
-
- Returns the complete updated custom field record.
-
- Parameters
- ----------
- custom_field : {Gid} Globally unique identifier for the custom field.
- [data] : {Object} Data for the request
- """
- path = "/custom_fields/%s" % (custom_field)
- return self.client.put(path, params, **options)
-
- def delete(self, custom_field, params={}, **options):
- """A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field.
-
- Locked custom fields can only be deleted by the user who locked the field.
-
- Returns an empty data record.
-
- Parameters
- ----------
- custom_field : {Gid} Globally unique identifier for the custom field.
- """
- path = "/custom_fields/%s" % (custom_field)
- return self.client.delete(path, params, **options)
-
- def create_enum_option(self, custom_field, params={}, **options):
- """Creates an enum option and adds it to this custom field's list of enum options. A custom field can have at most 50 enum options (including disabled options). By default new enum options are inserted at the end of a custom field's list.
-
- Locked custom fields can only have enum options added by the user who locked the field.
-
- Returns the full record of the newly created enum option.
-
- Parameters
- ----------
- custom_field : {Gid} Globally unique identifier for the custom field.
- [data] : {Object} Data for the request
- - name : {String} The name of the enum option.
- - [color] : {String} The color of the enum option. Defaults to 'none'.
- - [insert_before] : {Gid} An existing enum option within this custom field before which the new enum option should be inserted. Cannot be provided together with after_enum_option.
- - [insert_after] : {Gid} An existing enum option within this custom field after which the new enum option should be inserted. Cannot be provided together with before_enum_option.
- """
- path = "/custom_fields/%s/enum_options" % (custom_field)
- return self.client.post(path, params, **options)
-
- def update_enum_option(self, enum_option, params={}, **options):
- """Updates an existing enum option. Enum custom fields require at least one enabled enum option.
-
- Locked custom fields can only be updated by the user who locked the field.
-
- Returns the full record of the updated enum option.
-
- Parameters
- ----------
- enum_option : {Gid} Globally unique identifier for the enum option.
- [data] : {Object} Data for the request
- - name : {String} The name of the enum option.
- - [color] : {String} The color of the enum option. Defaults to 'none'.
- - [enabled] : {Boolean} Whether or not the enum option is a selectable value for the custom field.
- """
- path = "/enum_options/%s" % (enum_option)
- return self.client.put(path, params, **options)
-
- def insert_enum_option(self, custom_field, params={}, **options):
- """Moves a particular enum option to be either before or after another specified enum option in the custom field.
-
- Locked custom fields can only be reordered by the user who locked the field.
-
- Parameters
- ----------
- custom_field : {Gid} Globally unique identifier for the custom field.
- [data] : {Object} Data for the request
- - enum_option : {Gid} The ID of the enum option to relocate.
- - name : {String} The name of the enum option.
- - [color] : {String} The color of the enum option. Defaults to 'none'.
- - [before_enum_option] : {Gid} An existing enum option within this custom field before which the new enum option should be inserted. Cannot be provided together with after_enum_option.
- - [after_enum_option] : {Gid} An existing enum option within this custom field after which the new enum option should be inserted. Cannot be provided together with before_enum_option.
- """
- path = "/custom_fields/%s/enum_options/insert" % (custom_field)
- return self.client.post(path, params, **options)
diff --git a/asana/resources/events.py b/asana/resources/events.py
deleted file mode 100644
index dc1643ac..00000000
--- a/asana/resources/events.py
+++ /dev/null
@@ -1,22 +0,0 @@
-
-from .gen.events import _Events
-from ..error import InvalidTokenError
-from ..page_iterator import EventsPageIterator
-
-class Events(_Events):
- """Events resource"""
-
- def get(self, params, **options):
- """Dispatches a GET request to /events of the API to get a set of recent changes to a resource."""
- options = self.client._merge_options({ 'full_payload': True })
- return self.client.get('/events', params, **options)
-
- def get_next(self, query, **options):
- """Returns a tuple containing the next page of events and a sync token for the given query (and optional 'sync' token)"""
- iterator = EventsPageIterator(self.client, '/events', query, options)
- result = next(iterator)
- return (result, iterator.sync)
-
- def get_iterator(self, query, **options):
- """Returns an event iterator for the given query (and optional 'sync' token)"""
- return EventsPageIterator(self.client, '/events', query, options).items()
diff --git a/asana/resources/gen/__init__.py b/asana/resources/gen/__init__.py
deleted file mode 100644
index 2786f20b..00000000
--- a/asana/resources/gen/__init__.py
+++ /dev/null
@@ -1,32 +0,0 @@
-from . import (
- attachments,
- audit_log_api,
- batch_api,
- custom_field_settings,
- custom_fields,
- events,
- goals,
- jobs,
- organization_exports,
- portfolios,
- portfolio_memberships,
- project_briefs,
- project_memberships,
- project_statuses,
- project_templates,
- projects,
- sections,
- status_updates,
- stories,
- tags,
- tasks,
- team_memberships,
- teams,
- time_periods,
- typeahead,
- users,
- user_task_lists,
- webhooks,
- workspace_memberships,
- workspaces
-)
diff --git a/asana/resources/gen/attachments.py b/asana/resources/gen/attachments.py
deleted file mode 100644
index cb5f2998..00000000
--- a/asana/resources/gen/attachments.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# coding=utf-8
-class _Attachments:
-
- def __init__(self, client=None):
- self.client = client
-
- def delete_attachment(self, attachment_gid, params=None, **options):
- """Delete an attachment
- :param str attachment_gid: (required) Globally unique identifier for the attachment.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/attachments/{attachment_gid}".replace("{attachment_gid}", attachment_gid)
- return self.client.delete(path, params, **options)
-
- def get_attachment(self, attachment_gid, params=None, **options):
- """Get an attachment
- :param str attachment_gid: (required) Globally unique identifier for the attachment.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/attachments/{attachment_gid}".replace("{attachment_gid}", attachment_gid)
- return self.client.get(path, params, **options)
-
- def get_attachments_for_object(self, params=None, **options):
- """Get attachments from an object
- :param Object params: Parameters for the request
- - parent {str}: (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a `project`, `project_brief`, or `task`.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/attachments"
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/audit_log_api.py b/asana/resources/gen/audit_log_api.py
deleted file mode 100644
index 36c81cc3..00000000
--- a/asana/resources/gen/audit_log_api.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# coding=utf-8
-class _AuditLogAPI:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_audit_log_events(self, workspace_gid, params=None, **options):
- """Get audit log events
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- - start_at {datetime}: Filter to events created after this time (inclusive).
- - end_at {datetime}: Filter to events created before this time (exclusive).
- - event_type {str}: Filter to events of this type. Refer to the [supported audit log events](/docs/audit-log-events#supported-audit-log-events) for a full list of values.
- - actor_type {str}: Filter to events with an actor of this type. This only needs to be included if querying for actor types without an ID. If `actor_gid` is included, this should be excluded.
- - actor_gid {str}: Filter to events triggered by the actor with this ID.
- - resource_gid {str}: Filter to events with this resource ID.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/audit_log_events".replace("{workspace_gid}", workspace_gid)
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/batch_api.py b/asana/resources/gen/batch_api.py
deleted file mode 100644
index 3652b3d3..00000000
--- a/asana/resources/gen/batch_api.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# coding=utf-8
-class _BatchAPI:
-
- def __init__(self, client=None):
- self.client = client
-
- def create_batch_request(self, params=None, **options):
- """Submit parallel requests
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/batch"
- return self.client.post(path, params, **options)
diff --git a/asana/resources/gen/custom_field_settings.py b/asana/resources/gen/custom_field_settings.py
deleted file mode 100644
index 563a68c3..00000000
--- a/asana/resources/gen/custom_field_settings.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# coding=utf-8
-class _CustomFieldSettings:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_custom_field_settings_for_portfolio(self, portfolio_gid, params=None, **options):
- """Get a portfolio's custom fields
- :param str portfolio_gid: (required) Globally unique identifier for the portfolio.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios/{portfolio_gid}/custom_field_settings".replace("{portfolio_gid}", portfolio_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_custom_field_settings_for_project(self, project_gid, params=None, **options):
- """Get a project's custom fields
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/custom_field_settings".replace("{project_gid}", project_gid)
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/custom_fields.py b/asana/resources/gen/custom_fields.py
deleted file mode 100644
index ba1a673e..00000000
--- a/asana/resources/gen/custom_fields.py
+++ /dev/null
@@ -1,122 +0,0 @@
-# coding=utf-8
-class _CustomFields:
-
- def __init__(self, client=None):
- self.client = client
-
- def create_custom_field(self, params=None, **options):
- """Create a custom field
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/custom_fields"
- return self.client.post(path, params, **options)
-
- def create_enum_option_for_custom_field(self, custom_field_gid, params=None, **options):
- """Create an enum option
- :param str custom_field_gid: (required) Globally unique identifier for the custom field.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/custom_fields/{custom_field_gid}/enum_options".replace("{custom_field_gid}", custom_field_gid)
- return self.client.post(path, params, **options)
-
- def delete_custom_field(self, custom_field_gid, params=None, **options):
- """Delete a custom field
- :param str custom_field_gid: (required) Globally unique identifier for the custom field.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/custom_fields/{custom_field_gid}".replace("{custom_field_gid}", custom_field_gid)
- return self.client.delete(path, params, **options)
-
- def get_custom_field(self, custom_field_gid, params=None, **options):
- """Get a custom field
- :param str custom_field_gid: (required) Globally unique identifier for the custom field.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/custom_fields/{custom_field_gid}".replace("{custom_field_gid}", custom_field_gid)
- return self.client.get(path, params, **options)
-
- def get_custom_fields_for_workspace(self, workspace_gid, params=None, **options):
- """Get a workspace's custom fields
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/custom_fields".replace("{workspace_gid}", workspace_gid)
- return self.client.get_collection(path, params, **options)
-
- def insert_enum_option_for_custom_field(self, custom_field_gid, params=None, **options):
- """Reorder a custom field's enum
- :param str custom_field_gid: (required) Globally unique identifier for the custom field.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/custom_fields/{custom_field_gid}/enum_options/insert".replace("{custom_field_gid}", custom_field_gid)
- return self.client.post(path, params, **options)
-
- def update_custom_field(self, custom_field_gid, params=None, **options):
- """Update a custom field
- :param str custom_field_gid: (required) Globally unique identifier for the custom field.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/custom_fields/{custom_field_gid}".replace("{custom_field_gid}", custom_field_gid)
- return self.client.put(path, params, **options)
-
- def update_enum_option(self, enum_option_gid, params=None, **options):
- """Update an enum option
- :param str enum_option_gid: (required) Globally unique identifier for the enum option.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/enum_options/{enum_option_gid}".replace("{enum_option_gid}", enum_option_gid)
- return self.client.put(path, params, **options)
diff --git a/asana/resources/gen/events.py b/asana/resources/gen/events.py
deleted file mode 100644
index 5ba54075..00000000
--- a/asana/resources/gen/events.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# coding=utf-8
-class _Events:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_events(self, params=None, **options):
- """Get events on a resource
- :param Object params: Parameters for the request
- - resource {str}: (required) A resource ID to subscribe to. The resource can be a task or project.
- - sync {str}: A sync token received from the last request, or none on first sync. Events will be returned from the point in time that the sync token was generated. *Note: On your first request, omit the sync token. The response will be the same as for an expired sync token, and will include a new valid sync token.If the sync token is too old (which may happen from time to time) the API will return a `412 Precondition Failed` error, and include a fresh sync token in the response.*
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/events"
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/goal_relationships.py b/asana/resources/gen/goal_relationships.py
deleted file mode 100644
index e5ee197c..00000000
--- a/asana/resources/gen/goal_relationships.py
+++ /dev/null
@@ -1,76 +0,0 @@
-# coding=utf-8
-class _GoalRelationships:
-
- def __init__(self, client=None):
- self.client = client
-
- def add_supporting_relationship(self, goal_gid, params=None, **options):
- """Add a supporting goal relationship
- :param str goal_gid: (required) Globally unique identifier for the goal.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goals/{goal_gid}/addSupportingRelationship".replace("{goal_gid}", goal_gid)
- return self.client.post(path, params, **options)
-
- def get_goal_relationship(self, goal_relationship_gid, params=None, **options):
- """Get a goal relationship
- :param str goal_relationship_gid: (required) Globally unique identifier for the goal relationship.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goal_relationships/{goal_relationship_gid}".replace("{goal_relationship_gid}", goal_relationship_gid)
- return self.client.get(path, params, **options)
-
- def get_goal_relationships(self, params=None, **options):
- """Get goal relationships
- :param Object params: Parameters for the request
- - supported_goal {str}: (required) Globally unique identifier for the supported goal in the goal relationship.
- - resource_subtype {str}: If provided, filter to goal relationships with a given resource_subtype.
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goal_relationships"
- return self.client.get_collection(path, params, **options)
-
- def remove_supporting_relationship(self, goal_gid, params=None, **options):
- """Removes a supporting goal relationship
- :param str goal_gid: (required) Globally unique identifier for the goal.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goals/{goal_gid}/removeSupportingRelationship".replace("{goal_gid}", goal_gid)
- return self.client.post(path, params, **options)
-
- def update_goal_relationship(self, goal_relationship_gid, params=None, **options):
- """Update a goal relationship
- :param str goal_relationship_gid: (required) Globally unique identifier for the goal relationship.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goal_relationships/{goal_relationship_gid}".replace("{goal_relationship_gid}", goal_relationship_gid)
- return self.client.put(path, params, **options)
diff --git a/asana/resources/gen/goals.py b/asana/resources/gen/goals.py
deleted file mode 100644
index 79e47743..00000000
--- a/asana/resources/gen/goals.py
+++ /dev/null
@@ -1,153 +0,0 @@
-# coding=utf-8
-class _Goals:
-
- def __init__(self, client=None):
- self.client = client
-
- def add_followers(self, goal_gid, params=None, **options):
- """Add a collaborator to a goal
- :param str goal_gid: (required) Globally unique identifier for the goal.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goals/{goal_gid}/addFollowers".replace("{goal_gid}", goal_gid)
- return self.client.post(path, params, **options)
-
- def create_goal(self, params=None, **options):
- """Create a goal
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goals"
- return self.client.post(path, params, **options)
-
- def create_goal_metric(self, goal_gid, params=None, **options):
- """Create a goal metric
- :param str goal_gid: (required) Globally unique identifier for the goal.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goals/{goal_gid}/setMetric".replace("{goal_gid}", goal_gid)
- return self.client.post(path, params, **options)
-
- def delete_goal(self, goal_gid, params=None, **options):
- """Delete a goal
- :param str goal_gid: (required) Globally unique identifier for the goal.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goals/{goal_gid}".replace("{goal_gid}", goal_gid)
- return self.client.delete(path, params, **options)
-
- def get_goal(self, goal_gid, params=None, **options):
- """Get a goal
- :param str goal_gid: (required) Globally unique identifier for the goal.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goals/{goal_gid}".replace("{goal_gid}", goal_gid)
- return self.client.get(path, params, **options)
-
- def get_goals(self, params=None, **options):
- """Get goals
- :param Object params: Parameters for the request
- - portfolio {str}: Globally unique identifier for supporting portfolio.
- - project {str}: Globally unique identifier for supporting project.
- - is_workspace_level {bool}: Filter to goals with is_workspace_level set to query value. Must be used with the workspace parameter.
- - team {str}: Globally unique identifier for the team.
- - workspace {str}: Globally unique identifier for the workspace.
- - time_periods {list[str]}: Globally unique identifiers for the time periods.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goals"
- return self.client.get_collection(path, params, **options)
-
- def get_parent_goals_for_goal(self, goal_gid, params=None, **options):
- """Get parent goals from a goal
- :param str goal_gid: (required) Globally unique identifier for the goal.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goals/{goal_gid}/parentGoals".replace("{goal_gid}", goal_gid)
- return self.client.get_collection(path, params, **options)
-
- def remove_followers(self, goal_gid, params=None, **options):
- """Remove a collaborator from a goal
- :param str goal_gid: (required) Globally unique identifier for the goal.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goals/{goal_gid}/removeFollowers".replace("{goal_gid}", goal_gid)
- return self.client.post(path, params, **options)
-
- def update_goal(self, goal_gid, params=None, **options):
- """Update a goal
- :param str goal_gid: (required) Globally unique identifier for the goal.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goals/{goal_gid}".replace("{goal_gid}", goal_gid)
- return self.client.put(path, params, **options)
-
- def update_goal_metric(self, goal_gid, params=None, **options):
- """Update a goal metric
- :param str goal_gid: (required) Globally unique identifier for the goal.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/goals/{goal_gid}/setMetricCurrentValue".replace("{goal_gid}", goal_gid)
- return self.client.post(path, params, **options)
diff --git a/asana/resources/gen/jobs.py b/asana/resources/gen/jobs.py
deleted file mode 100644
index 2c1d7027..00000000
--- a/asana/resources/gen/jobs.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# coding=utf-8
-class _Jobs:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_job(self, job_gid, params=None, **options):
- """Get a job by id
- :param str job_gid: (required) Globally unique identifier for the job.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/jobs/{job_gid}".replace("{job_gid}", job_gid)
- return self.client.get(path, params, **options)
diff --git a/asana/resources/gen/memberships.py b/asana/resources/gen/memberships.py
deleted file mode 100644
index 64a222a9..00000000
--- a/asana/resources/gen/memberships.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# coding=utf-8
-class _Memberships:
-
- def __init__(self, client=None):
- self.client = client
-
- def create_membership(self, params=None, **options):
- """Create a membership
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/memberships"
- return self.client.post(path, params, **options)
-
- def delete_membership(self, membership_gid, params=None, **options):
- """Delete a membership
- :param str membership_gid: (required) Globally unique identifier for the membership.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/memberships/{membership_gid}".replace("{membership_gid}", membership_gid)
- return self.client.delete(path, params, **options)
-
- def get_memberships(self, params=None, **options):
- """Get multiple memberships
- :param Object params: Parameters for the request
- - parent {str}: Globally unique identifier for `project`, `portfolio`, `team`, `goal`, and `workspace`.
- - member {str}: Globally unique identifier for `team` or `user`.
- - resource_subtype {str}: The resource_subtype to filter on. Must be provided with `member` and `workspace` if `parent` is not provided. Valid values include `team_membership`, `workspace_membership`, `portfolio_membership`
- - workspace {str}: The workspace to filter on. Must be provided with `member` and `resource_subtype` if `parent` is not provided.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Pagination limit for the request.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/memberships"
- return self.client.get_collection(path, params, **options)
-
- def update_membership(self, membership_gid, params=None, **options):
- """Update a membership
- :param str membership_gid: (required) Globally unique identifier for the membership.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/memberships/{membership_gid}".replace("{membership_gid}", membership_gid)
- return self.client.put(path, params, **options)
diff --git a/asana/resources/gen/message.py b/asana/resources/gen/message.py
deleted file mode 100644
index 13791545..00000000
--- a/asana/resources/gen/message.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# coding=utf-8
-class _Message:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_message(self, message_gid, params=None, **options):
- """Get a message
- :param str message_gid: (required) The message to get.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/messages/{message_gid}".replace("{message_gid}", message_gid)
- return self.client.get(path, params, **options)
diff --git a/asana/resources/gen/organization_exports.py b/asana/resources/gen/organization_exports.py
deleted file mode 100644
index 0c196941..00000000
--- a/asana/resources/gen/organization_exports.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# coding=utf-8
-class _OrganizationExports:
-
- def __init__(self, client=None):
- self.client = client
-
- def create_organization_export(self, params=None, **options):
- """Create an organization export request
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/organization_exports"
- return self.client.post(path, params, **options)
-
- def get_organization_export(self, organization_export_gid, params=None, **options):
- """Get details on an org export request
- :param str organization_export_gid: (required) Globally unique identifier for the organization export.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/organization_exports/{organization_export_gid}".replace("{organization_export_gid}", organization_export_gid)
- return self.client.get(path, params, **options)
diff --git a/asana/resources/gen/portfolio_memberships.py b/asana/resources/gen/portfolio_memberships.py
deleted file mode 100644
index bbae489d..00000000
--- a/asana/resources/gen/portfolio_memberships.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# coding=utf-8
-class _PortfolioMemberships:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_portfolio_membership(self, portfolio_membership_gid, params=None, **options):
- """Get a portfolio membership
- :param str portfolio_membership_gid: (required)
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolio_memberships/{portfolio_membership_gid}".replace("{portfolio_membership_gid}", portfolio_membership_gid)
- return self.client.get(path, params, **options)
-
- def get_portfolio_memberships(self, params=None, **options):
- """Get multiple portfolio memberships
- :param Object params: Parameters for the request
- - portfolio {str}: The portfolio to filter results on.
- - workspace {str}: The workspace to filter results on.
- - user {str}: A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolio_memberships"
- return self.client.get_collection(path, params, **options)
-
- def get_portfolio_memberships_for_portfolio(self, portfolio_gid, params=None, **options):
- """Get memberships from a portfolio
- :param str portfolio_gid: (required) Globally unique identifier for the portfolio.
- :param Object params: Parameters for the request
- - user {str}: A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios/{portfolio_gid}/portfolio_memberships".replace("{portfolio_gid}", portfolio_gid)
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/portfolios.py b/asana/resources/gen/portfolios.py
deleted file mode 100644
index 5ec3d557..00000000
--- a/asana/resources/gen/portfolios.py
+++ /dev/null
@@ -1,175 +0,0 @@
-# coding=utf-8
-class _Portfolios:
-
- def __init__(self, client=None):
- self.client = client
-
- def add_custom_field_setting_for_portfolio(self, portfolio_gid, params=None, **options):
- """Add a custom field to a portfolio
- :param str portfolio_gid: (required) Globally unique identifier for the portfolio.
- :param Object params: Parameters for the request
- :param **options
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios/{portfolio_gid}/addCustomFieldSetting".replace("{portfolio_gid}", portfolio_gid)
- return self.client.post(path, params, **options)
-
- def add_item_for_portfolio(self, portfolio_gid, params=None, **options):
- """Add a portfolio item
- :param str portfolio_gid: (required) Globally unique identifier for the portfolio.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios/{portfolio_gid}/addItem".replace("{portfolio_gid}", portfolio_gid)
- return self.client.post(path, params, **options)
-
- def add_members_for_portfolio(self, portfolio_gid, params=None, **options):
- """Add users to a portfolio
- :param str portfolio_gid: (required) Globally unique identifier for the portfolio.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios/{portfolio_gid}/addMembers".replace("{portfolio_gid}", portfolio_gid)
- return self.client.post(path, params, **options)
-
- def create_portfolio(self, params=None, **options):
- """Create a portfolio
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios"
- return self.client.post(path, params, **options)
-
- def delete_portfolio(self, portfolio_gid, params=None, **options):
- """Delete a portfolio
- :param str portfolio_gid: (required) Globally unique identifier for the portfolio.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios/{portfolio_gid}".replace("{portfolio_gid}", portfolio_gid)
- return self.client.delete(path, params, **options)
-
- def get_items_for_portfolio(self, portfolio_gid, params=None, **options):
- """Get portfolio items
- :param str portfolio_gid: (required) Globally unique identifier for the portfolio.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios/{portfolio_gid}/items".replace("{portfolio_gid}", portfolio_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_portfolio(self, portfolio_gid, params=None, **options):
- """Get a portfolio
- :param str portfolio_gid: (required) Globally unique identifier for the portfolio.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios/{portfolio_gid}".replace("{portfolio_gid}", portfolio_gid)
- return self.client.get(path, params, **options)
-
- def get_portfolios(self, params=None, **options):
- """Get multiple portfolios
- :param Object params: Parameters for the request
- - workspace {str}: (required) The workspace or organization to filter portfolios on.
- - owner {str}: The user who owns the portfolio. Currently, API users can only get a list of portfolios that they themselves own.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios"
- return self.client.get_collection(path, params, **options)
-
- def remove_custom_field_setting_for_portfolio(self, portfolio_gid, params=None, **options):
- """Remove a custom field from a portfolio
- :param str portfolio_gid: (required) Globally unique identifier for the portfolio.
- :param Object params: Parameters for the request
- :param **options
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios/{portfolio_gid}/removeCustomFieldSetting".replace("{portfolio_gid}", portfolio_gid)
- return self.client.post(path, params, **options)
-
- def remove_item_for_portfolio(self, portfolio_gid, params=None, **options):
- """Remove a portfolio item
- :param str portfolio_gid: (required) Globally unique identifier for the portfolio.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios/{portfolio_gid}/removeItem".replace("{portfolio_gid}", portfolio_gid)
- return self.client.post(path, params, **options)
-
- def remove_members_for_portfolio(self, portfolio_gid, params=None, **options):
- """Remove users from a portfolio
- :param str portfolio_gid: (required) Globally unique identifier for the portfolio.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios/{portfolio_gid}/removeMembers".replace("{portfolio_gid}", portfolio_gid)
- return self.client.post(path, params, **options)
-
- def update_portfolio(self, portfolio_gid, params=None, **options):
- """Update a portfolio
- :param str portfolio_gid: (required) Globally unique identifier for the portfolio.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/portfolios/{portfolio_gid}".replace("{portfolio_gid}", portfolio_gid)
- return self.client.put(path, params, **options)
diff --git a/asana/resources/gen/project_briefs.py b/asana/resources/gen/project_briefs.py
deleted file mode 100644
index 4d59ff55..00000000
--- a/asana/resources/gen/project_briefs.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# coding=utf-8
-class _ProjectBriefs:
-
- def __init__(self, client=None):
- self.client = client
-
- def create_project_brief(self, project_gid, params=None, **options):
- """Create a project brief
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/project_briefs".replace("{project_gid}", project_gid)
- return self.client.post(path, params, **options)
-
- def delete_project_brief(self, project_brief_gid, params=None, **options):
- """Delete a project brief
- :param str project_brief_gid: (required) Globally unique identifier for the project brief.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/project_briefs/{project_brief_gid}".replace("{project_brief_gid}", project_brief_gid)
- return self.client.delete(path, params, **options)
-
- def get_project_brief(self, project_brief_gid, params=None, **options):
- """Get a project brief
- :param str project_brief_gid: (required) Globally unique identifier for the project brief.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/project_briefs/{project_brief_gid}".replace("{project_brief_gid}", project_brief_gid)
- return self.client.get(path, params, **options)
-
- def update_project_brief(self, project_brief_gid, params=None, **options):
- """Update a project brief
- :param str project_brief_gid: (required) Globally unique identifier for the project brief.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/project_briefs/{project_brief_gid}".replace("{project_brief_gid}", project_brief_gid)
- return self.client.put(path, params, **options)
diff --git a/asana/resources/gen/project_memberships.py b/asana/resources/gen/project_memberships.py
deleted file mode 100644
index a78c0af5..00000000
--- a/asana/resources/gen/project_memberships.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# coding=utf-8
-class _ProjectMemberships:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_project_membership(self, project_membership_gid, params=None, **options):
- """Get a project membership
- :param str project_membership_gid: (required)
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/project_memberships/{project_membership_gid}".replace("{project_membership_gid}", project_membership_gid)
- return self.client.get(path, params, **options)
-
- def get_project_memberships_for_project(self, project_gid, params=None, **options):
- """Get memberships from a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- - user {str}: A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/project_memberships".replace("{project_gid}", project_gid)
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/project_statuses.py b/asana/resources/gen/project_statuses.py
deleted file mode 100644
index 94e9af82..00000000
--- a/asana/resources/gen/project_statuses.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# coding=utf-8
-class _ProjectStatuses:
-
- def __init__(self, client=None):
- self.client = client
-
- def create_project_status_for_project(self, project_gid, params=None, **options):
- """Create a project status
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/project_statuses".replace("{project_gid}", project_gid)
- return self.client.post(path, params, **options)
-
- def delete_project_status(self, project_status_gid, params=None, **options):
- """Delete a project status
- :param str project_status_gid: (required) The project status update to get.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/project_statuses/{project_status_gid}".replace("{project_status_gid}", project_status_gid)
- return self.client.delete(path, params, **options)
-
- def get_project_status(self, project_status_gid, params=None, **options):
- """Get a project status
- :param str project_status_gid: (required) The project status update to get.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/project_statuses/{project_status_gid}".replace("{project_status_gid}", project_status_gid)
- return self.client.get(path, params, **options)
-
- def get_project_statuses_for_project(self, project_gid, params=None, **options):
- """Get statuses from a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/project_statuses".replace("{project_gid}", project_gid)
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/project_templates.py b/asana/resources/gen/project_templates.py
deleted file mode 100644
index 87c99d29..00000000
--- a/asana/resources/gen/project_templates.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# coding=utf-8
-class _ProjectTemplates:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_project_template(self, project_template_gid, params=None, **options):
- """Get a project template
- :param str project_template_gid: (required) Globally unique identifier for the project template.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/project_templates/{project_template_gid}".replace("{project_template_gid}", project_template_gid)
- return self.client.get(path, params, **options)
-
- def get_project_templates(self, params=None, **options):
- """Get multiple project templates
- :param Object params: Parameters for the request
- - workspace {str}: The workspace to filter results on.
- - team {str}: The team to filter projects on.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/project_templates"
- return self.client.get_collection(path, params, **options)
-
- def get_project_templates_for_team(self, team_gid, params=None, **options):
- """Get a team's project templates
- :param str team_gid: (required) Globally unique identifier for the team.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/teams/{team_gid}/project_templates".replace("{team_gid}", team_gid)
- return self.client.get_collection(path, params, **options)
-
- def instantiate_project(self, project_template_gid, params=None, **options):
- """Instantiate a project from a project template
- :param str project_template_gid: (required) Globally unique identifier for the project template.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/project_templates/{project_template_gid}/instantiateProject".replace("{project_template_gid}", project_template_gid)
- return self.client.post(path, params, **options)
diff --git a/asana/resources/gen/projects.py b/asana/resources/gen/projects.py
deleted file mode 100644
index f93fba92..00000000
--- a/asana/resources/gen/projects.py
+++ /dev/null
@@ -1,282 +0,0 @@
-# coding=utf-8
-class _Projects:
-
- def __init__(self, client=None):
- self.client = client
-
- def add_custom_field_setting_for_project(self, project_gid, params=None, **options):
- """Add a custom field to a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/addCustomFieldSetting".replace("{project_gid}", project_gid)
- return self.client.post(path, params, **options)
-
- def add_followers_for_project(self, project_gid, params=None, **options):
- """Add followers to a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/addFollowers".replace("{project_gid}", project_gid)
- return self.client.post(path, params, **options)
-
- def add_members_for_project(self, project_gid, params=None, **options):
- """Add users to a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/addMembers".replace("{project_gid}", project_gid)
- return self.client.post(path, params, **options)
-
- def create_project(self, params=None, **options):
- """Create a project
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects"
- return self.client.post(path, params, **options)
-
- def create_project_for_team(self, team_gid, params=None, **options):
- """Create a project in a team
- :param str team_gid: (required) Globally unique identifier for the team.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/teams/{team_gid}/projects".replace("{team_gid}", team_gid)
- return self.client.post(path, params, **options)
-
- def create_project_for_workspace(self, workspace_gid, params=None, **options):
- """Create a project in a workspace
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/projects".replace("{workspace_gid}", workspace_gid)
- return self.client.post(path, params, **options)
-
- def delete_project(self, project_gid, params=None, **options):
- """Delete a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}".replace("{project_gid}", project_gid)
- return self.client.delete(path, params, **options)
-
- def duplicate_project(self, project_gid, params=None, **options):
- """Duplicate a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/duplicate".replace("{project_gid}", project_gid)
- return self.client.post(path, params, **options)
-
- def get_project(self, project_gid, params=None, **options):
- """Get a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}".replace("{project_gid}", project_gid)
- return self.client.get(path, params, **options)
-
- def get_projects(self, params=None, **options):
- """Get multiple projects
- :param Object params: Parameters for the request
- - workspace {str}: The workspace or organization to filter projects on.
- - team {str}: The team to filter projects on.
- - archived {bool}: Only return projects whose `archived` field takes on the value of this parameter.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects"
- return self.client.get_collection(path, params, **options)
-
- def get_projects_for_task(self, task_gid, params=None, **options):
- """Get projects a task is in
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/projects".replace("{task_gid}", task_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_projects_for_team(self, team_gid, params=None, **options):
- """Get a team's projects
- :param str team_gid: (required) Globally unique identifier for the team.
- :param Object params: Parameters for the request
- - archived {bool}: Only return projects whose `archived` field takes on the value of this parameter.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/teams/{team_gid}/projects".replace("{team_gid}", team_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_projects_for_workspace(self, workspace_gid, params=None, **options):
- """Get all projects in a workspace
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- - archived {bool}: Only return projects whose `archived` field takes on the value of this parameter.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/projects".replace("{workspace_gid}", workspace_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_task_counts_for_project(self, project_gid, params=None, **options):
- """Get task count of a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/task_counts".replace("{project_gid}", project_gid)
- return self.client.get(path, params, **options)
-
- def project_save_as_template(self, project_gid, params=None, **options):
- """Create a project template from a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/saveAsTemplate".replace("{project_gid}", project_gid)
- return self.client.post(path, params, **options)
-
- def remove_custom_field_setting_for_project(self, project_gid, params=None, **options):
- """Remove a custom field from a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/removeCustomFieldSetting".replace("{project_gid}", project_gid)
- return self.client.post(path, params, **options)
-
- def remove_followers_for_project(self, project_gid, params=None, **options):
- """Remove followers from a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/removeFollowers".replace("{project_gid}", project_gid)
- return self.client.post(path, params, **options)
-
- def remove_members_for_project(self, project_gid, params=None, **options):
- """Remove users from a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/removeMembers".replace("{project_gid}", project_gid)
- return self.client.post(path, params, **options)
-
- def update_project(self, project_gid, params=None, **options):
- """Update a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}".replace("{project_gid}", project_gid)
- return self.client.put(path, params, **options)
diff --git a/asana/resources/gen/sections.py b/asana/resources/gen/sections.py
deleted file mode 100644
index 043ac4c0..00000000
--- a/asana/resources/gen/sections.py
+++ /dev/null
@@ -1,105 +0,0 @@
-# coding=utf-8
-class _Sections:
-
- def __init__(self, client=None):
- self.client = client
-
- def add_task_for_section(self, section_gid, params=None, **options):
- """Add task to section
- :param str section_gid: (required) The globally unique identifier for the section.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/sections/{section_gid}/addTask".replace("{section_gid}", section_gid)
- return self.client.post(path, params, **options)
-
- def create_section_for_project(self, project_gid, params=None, **options):
- """Create a section in a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/sections".replace("{project_gid}", project_gid)
- return self.client.post(path, params, **options)
-
- def delete_section(self, section_gid, params=None, **options):
- """Delete a section
- :param str section_gid: (required) The globally unique identifier for the section.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/sections/{section_gid}".replace("{section_gid}", section_gid)
- return self.client.delete(path, params, **options)
-
- def get_section(self, section_gid, params=None, **options):
- """Get a section
- :param str section_gid: (required) The globally unique identifier for the section.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/sections/{section_gid}".replace("{section_gid}", section_gid)
- return self.client.get(path, params, **options)
-
- def get_sections_for_project(self, project_gid, params=None, **options):
- """Get sections in a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/sections".replace("{project_gid}", project_gid)
- return self.client.get_collection(path, params, **options)
-
- def insert_section_for_project(self, project_gid, params=None, **options):
- """Move or Insert sections
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/sections/insert".replace("{project_gid}", project_gid)
- return self.client.post(path, params, **options)
-
- def update_section(self, section_gid, params=None, **options):
- """Update a section
- :param str section_gid: (required) The globally unique identifier for the section.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/sections/{section_gid}".replace("{section_gid}", section_gid)
- return self.client.put(path, params, **options)
diff --git a/asana/resources/gen/status_updates.py b/asana/resources/gen/status_updates.py
deleted file mode 100644
index ef89bd5d..00000000
--- a/asana/resources/gen/status_updates.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# coding=utf-8
-class _StatusUpdates:
-
- def __init__(self, client=None):
- self.client = client
-
- def create_status_for_object(self, params=None, **options):
- """Create a status update
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/status_updates"
- return self.client.post(path, params, **options)
-
- def delete_status(self, status_gid, params=None, **options):
- """Delete a status update
- :param str status_gid: (required) The status update to get.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/status_updates/{status_gid}".replace("{status_gid}", status_gid)
- return self.client.delete(path, params, **options)
-
- def get_status(self, status_gid, params=None, **options):
- """Get a status update
- :param str status_gid: (required) The status update to get.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/status_updates/{status_gid}".replace("{status_gid}", status_gid)
- return self.client.get(path, params, **options)
-
- def get_statuses_for_object(self, params=None, **options):
- """Get status updates from an object
- :param Object params: Parameters for the request
- - parent {str}: (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a project, portfolio, or goal.
- - created_since {datetime}: Only return statuses that have been created since the given time.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/status_updates"
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/stories.py b/asana/resources/gen/stories.py
deleted file mode 100644
index d0dd73ed..00000000
--- a/asana/resources/gen/stories.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# coding=utf-8
-class _Stories:
-
- def __init__(self, client=None):
- self.client = client
-
- def create_story_for_task(self, task_gid, params=None, **options):
- """Create a story on a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/stories".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def delete_story(self, story_gid, params=None, **options):
- """Delete a story
- :param str story_gid: (required) Globally unique identifier for the story.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/stories/{story_gid}".replace("{story_gid}", story_gid)
- return self.client.delete(path, params, **options)
-
- def get_stories_for_task(self, task_gid, params=None, **options):
- """Get stories from a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/stories".replace("{task_gid}", task_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_story(self, story_gid, params=None, **options):
- """Get a story
- :param str story_gid: (required) Globally unique identifier for the story.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/stories/{story_gid}".replace("{story_gid}", story_gid)
- return self.client.get(path, params, **options)
-
- def update_story(self, story_gid, params=None, **options):
- """Update a story
- :param str story_gid: (required) Globally unique identifier for the story.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/stories/{story_gid}".replace("{story_gid}", story_gid)
- return self.client.put(path, params, **options)
diff --git a/asana/resources/gen/tags.py b/asana/resources/gen/tags.py
deleted file mode 100644
index 52fd7988..00000000
--- a/asana/resources/gen/tags.py
+++ /dev/null
@@ -1,128 +0,0 @@
-# coding=utf-8
-class _Tags:
-
- def __init__(self, client=None):
- self.client = client
-
- def create_tag(self, params=None, **options):
- """Create a tag
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tags"
- return self.client.post(path, params, **options)
-
- def create_tag_for_workspace(self, workspace_gid, params=None, **options):
- """Create a tag in a workspace
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/tags".replace("{workspace_gid}", workspace_gid)
- return self.client.post(path, params, **options)
-
- def delete_tag(self, tag_gid, params=None, **options):
- """Delete a tag
- :param str tag_gid: (required) Globally unique identifier for the tag.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tags/{tag_gid}".replace("{tag_gid}", tag_gid)
- return self.client.delete(path, params, **options)
-
- def get_tag(self, tag_gid, params=None, **options):
- """Get a tag
- :param str tag_gid: (required) Globally unique identifier for the tag.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tags/{tag_gid}".replace("{tag_gid}", tag_gid)
- return self.client.get(path, params, **options)
-
- def get_tags(self, params=None, **options):
- """Get multiple tags
- :param Object params: Parameters for the request
- - workspace {str}: The workspace to filter tags on.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tags"
- return self.client.get_collection(path, params, **options)
-
- def get_tags_for_task(self, task_gid, params=None, **options):
- """Get a task's tags
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/tags".replace("{task_gid}", task_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_tags_for_workspace(self, workspace_gid, params=None, **options):
- """Get tags in a workspace
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/tags".replace("{workspace_gid}", workspace_gid)
- return self.client.get_collection(path, params, **options)
-
- def update_tag(self, tag_gid, params=None, **options):
- """Update a tag
- :param str tag_gid: (required) Globally unique identifier for the tag.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tags/{tag_gid}".replace("{tag_gid}", tag_gid)
- return self.client.put(path, params, **options)
diff --git a/asana/resources/gen/tasks.py b/asana/resources/gen/tasks.py
deleted file mode 100644
index 1b100d28..00000000
--- a/asana/resources/gen/tasks.py
+++ /dev/null
@@ -1,443 +0,0 @@
-# coding=utf-8
-class _Tasks:
-
- def __init__(self, client=None):
- self.client = client
-
- def add_dependencies_for_task(self, task_gid, params=None, **options):
- """Set dependencies for a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/addDependencies".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def add_dependents_for_task(self, task_gid, params=None, **options):
- """Set dependents for a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/addDependents".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def add_followers_for_task(self, task_gid, params=None, **options):
- """Add followers to a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/addFollowers".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def add_project_for_task(self, task_gid, params=None, **options):
- """Add a project to a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/addProject".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def add_tag_for_task(self, task_gid, params=None, **options):
- """Add a tag to a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/addTag".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def create_subtask_for_task(self, task_gid, params=None, **options):
- """Create a subtask
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/subtasks".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def create_task(self, params=None, **options):
- """Create a task
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks"
- return self.client.post(path, params, **options)
-
- def delete_task(self, task_gid, params=None, **options):
- """Delete a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}".replace("{task_gid}", task_gid)
- return self.client.delete(path, params, **options)
-
- def duplicate_task(self, task_gid, params=None, **options):
- """Duplicate a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/duplicate".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def get_dependencies_for_task(self, task_gid, params=None, **options):
- """Get dependencies from a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/dependencies".replace("{task_gid}", task_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_dependents_for_task(self, task_gid, params=None, **options):
- """Get dependents from a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/dependents".replace("{task_gid}", task_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_subtasks_for_task(self, task_gid, params=None, **options):
- """Get subtasks from a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/subtasks".replace("{task_gid}", task_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_task(self, task_gid, params=None, **options):
- """Get a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}".replace("{task_gid}", task_gid)
- return self.client.get(path, params, **options)
-
- def get_tasks(self, params=None, **options):
- """Get multiple tasks
- :param Object params: Parameters for the request
- - assignee {str}: The assignee to filter tasks on. If searching for unassigned tasks, assignee.any = null can be specified. *Note: If you specify `assignee`, you must also specify the `workspace` to filter on.*
- - project {str}: The project to filter tasks on.
- - section {str}: The section to filter tasks on.
- - workspace {str}: The workspace to filter tasks on. *Note: If you specify `workspace`, you must also specify the `assignee` to filter on.*
- - completed_since {datetime}: Only return tasks that are either incomplete or that have been completed since this time.
- - modified_since {datetime}: Only return tasks that have been modified since the given time. *Note: A task is considered “modified” if any of its properties change, or associations between it and other objects are modified (e.g. a task being added to a project). A task is not considered modified just because another object it is associated with (e.g. a subtask) is modified. Actions that count as modifying the task include assigning, renaming, completing, and adding stories.*
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks"
- return self.client.get_collection(path, params, **options)
-
- def get_tasks_for_project(self, project_gid, params=None, **options):
- """Get tasks from a project
- :param str project_gid: (required) Globally unique identifier for the project.
- :param Object params: Parameters for the request
- - completed_since {str}: Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword *now*.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/projects/{project_gid}/tasks".replace("{project_gid}", project_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_tasks_for_section(self, section_gid, params=None, **options):
- """Get tasks from a section
- :param str section_gid: (required) The globally unique identifier for the section.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/sections/{section_gid}/tasks".replace("{section_gid}", section_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_tasks_for_tag(self, tag_gid, params=None, **options):
- """Get tasks from a tag
- :param str tag_gid: (required) Globally unique identifier for the tag.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tags/{tag_gid}/tasks".replace("{tag_gid}", tag_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_tasks_for_user_task_list(self, user_task_list_gid, params=None, **options):
- """Get tasks from a user task list
- :param str user_task_list_gid: (required) Globally unique identifier for the user task list.
- :param Object params: Parameters for the request
- - completed_since {str}: Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword *now*.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/user_task_lists/{user_task_list_gid}/tasks".replace("{user_task_list_gid}", user_task_list_gid)
- return self.client.get_collection(path, params, **options)
-
- def remove_dependencies_for_task(self, task_gid, params=None, **options):
- """Unlink dependencies from a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/removeDependencies".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def remove_dependents_for_task(self, task_gid, params=None, **options):
- """Unlink dependents from a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/removeDependents".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def remove_follower_for_task(self, task_gid, params=None, **options):
- """Remove followers from a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/removeFollowers".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def remove_project_for_task(self, task_gid, params=None, **options):
- """Remove a project from a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/removeProject".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def remove_tag_for_task(self, task_gid, params=None, **options):
- """Remove a tag from a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/removeTag".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def search_tasks_for_workspace(self, workspace_gid, params=None, **options):
- """Search tasks in a workspace
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- - text {str}: Performs full-text search on both task name and description
- - resource_subtype {str}: Filters results by the task's resource_subtype
- - assignee_any {str}: Comma-separated list of user identifiers
- - assignee_not {str}: Comma-separated list of user identifiers
- - portfolios_any {str}: Comma-separated list of portfolio IDs
- - projects_any {str}: Comma-separated list of project IDs
- - projects_not {str}: Comma-separated list of project IDs
- - projects_all {str}: Comma-separated list of project IDs
- - sections_any {str}: Comma-separated list of section or column IDs
- - sections_not {str}: Comma-separated list of section or column IDs
- - sections_all {str}: Comma-separated list of section or column IDs
- - tags_any {str}: Comma-separated list of tag IDs
- - tags_not {str}: Comma-separated list of tag IDs
- - tags_all {str}: Comma-separated list of tag IDs
- - teams_any {str}: Comma-separated list of team IDs
- - followers_not {str}: Comma-separated list of user identifiers
- - created_by_any {str}: Comma-separated list of user identifiers
- - created_by_not {str}: Comma-separated list of user identifiers
- - assigned_by_any {str}: Comma-separated list of user identifiers
- - assigned_by_not {str}: Comma-separated list of user identifiers
- - liked_by_not {str}: Comma-separated list of user identifiers
- - commented_on_by_not {str}: Comma-separated list of user identifiers
- - due_on_before {date}: ISO 8601 date string
- - due_on_after {date}: ISO 8601 date string
- - due_on {date}: ISO 8601 date string or `null`
- - due_at_before {datetime}: ISO 8601 datetime string
- - due_at_after {datetime}: ISO 8601 datetime string
- - start_on_before {date}: ISO 8601 date string
- - start_on_after {date}: ISO 8601 date string
- - start_on {date}: ISO 8601 date string or `null`
- - created_on_before {date}: ISO 8601 date string
- - created_on_after {date}: ISO 8601 date string
- - created_on {date}: ISO 8601 date string or `null`
- - created_at_before {datetime}: ISO 8601 datetime string
- - created_at_after {datetime}: ISO 8601 datetime string
- - completed_on_before {date}: ISO 8601 date string
- - completed_on_after {date}: ISO 8601 date string
- - completed_on {date}: ISO 8601 date string or `null`
- - completed_at_before {datetime}: ISO 8601 datetime string
- - completed_at_after {datetime}: ISO 8601 datetime string
- - modified_on_before {date}: ISO 8601 date string
- - modified_on_after {date}: ISO 8601 date string
- - modified_on {date}: ISO 8601 date string or `null`
- - modified_at_before {datetime}: ISO 8601 datetime string
- - modified_at_after {datetime}: ISO 8601 datetime string
- - is_blocking {bool}: Filter to incomplete tasks with dependents
- - is_blocked {bool}: Filter to tasks with incomplete dependencies
- - has_attachment {bool}: Filter to tasks with attachments
- - completed {bool}: Filter to completed tasks
- - is_subtask {bool}: Filter to subtasks
- - sort_by {str}: One of `due_date`, `created_at`, `completed_at`, `likes`, or `modified_at`, defaults to `modified_at`
- - sort_ascending {bool}: Default `false`
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/tasks/search".replace("{workspace_gid}", workspace_gid)
- return self.client.get_collection(path, params, **options)
-
- def set_parent_for_task(self, task_gid, params=None, **options):
- """Set the parent of a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}/setParent".replace("{task_gid}", task_gid)
- return self.client.post(path, params, **options)
-
- def update_task(self, task_gid, params=None, **options):
- """Update a task
- :param str task_gid: (required) The task to operate on.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/tasks/{task_gid}".replace("{task_gid}", task_gid)
- return self.client.put(path, params, **options)
diff --git a/asana/resources/gen/team_memberships.py b/asana/resources/gen/team_memberships.py
deleted file mode 100644
index ef3ba93c..00000000
--- a/asana/resources/gen/team_memberships.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# coding=utf-8
-class _TeamMemberships:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_team_membership(self, team_membership_gid, params=None, **options):
- """Get a team membership
- :param str team_membership_gid: (required)
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/team_memberships/{team_membership_gid}".replace("{team_membership_gid}", team_membership_gid)
- return self.client.get(path, params, **options)
-
- def get_team_memberships(self, params=None, **options):
- """Get team memberships
- :param Object params: Parameters for the request
- - team {str}: Globally unique identifier for the team.
- - user {str}: A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. This parameter must be used with the workspace parameter.
- - workspace {str}: Globally unique identifier for the workspace. This parameter must be used with the user parameter.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/team_memberships"
- return self.client.get_collection(path, params, **options)
-
- def get_team_memberships_for_team(self, team_gid, params=None, **options):
- """Get memberships from a team
- :param str team_gid: (required) Globally unique identifier for the team.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/teams/{team_gid}/team_memberships".replace("{team_gid}", team_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_team_memberships_for_user(self, user_gid, params=None, **options):
- """Get memberships from a user
- :param str user_gid: (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
- :param Object params: Parameters for the request
- - workspace {str}: (required) Globally unique identifier for the workspace.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/users/{user_gid}/team_memberships".replace("{user_gid}", user_gid)
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/teams.py b/asana/resources/gen/teams.py
deleted file mode 100644
index 459f0b34..00000000
--- a/asana/resources/gen/teams.py
+++ /dev/null
@@ -1,112 +0,0 @@
-# coding=utf-8
-class _Teams:
-
- def __init__(self, client=None):
- self.client = client
-
- def add_user_for_team(self, team_gid, params=None, **options):
- """Add a user to a team
- :param str team_gid: (required) Globally unique identifier for the team.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/teams/{team_gid}/addUser".replace("{team_gid}", team_gid)
- return self.client.post(path, params, **options)
-
- def create_team(self, params=None, **options):
- """Create a team
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/teams"
- return self.client.post(path, params, **options)
-
- def get_team(self, team_gid, params=None, **options):
- """Get a team
- :param str team_gid: (required) Globally unique identifier for the team.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/teams/{team_gid}".replace("{team_gid}", team_gid)
- return self.client.get(path, params, **options)
-
- def get_teams_for_user(self, user_gid, params=None, **options):
- """Get teams for a user
- :param str user_gid: (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
- :param Object params: Parameters for the request
- - organization {str}: (required) The workspace or organization to filter teams on.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/users/{user_gid}/teams".replace("{user_gid}", user_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_teams_for_workspace(self, workspace_gid, params=None, **options):
- """Get teams in a workspace
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/teams".replace("{workspace_gid}", workspace_gid)
- return self.client.get_collection(path, params, **options)
-
- def remove_user_for_team(self, team_gid, params=None, **options):
- """Remove a user from a team
- :param str team_gid: (required) Globally unique identifier for the team.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/teams/{team_gid}/removeUser".replace("{team_gid}", team_gid)
- return self.client.post(path, params, **options)
-
- def update_team(self, params=None, **options):
- """Update a team
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/teams"
- return self.client.put(path, params, **options)
diff --git a/asana/resources/gen/time_periods.py b/asana/resources/gen/time_periods.py
deleted file mode 100644
index a1471b9f..00000000
--- a/asana/resources/gen/time_periods.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# coding=utf-8
-class _TimePeriods:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_time_period(self, time_period_gid, params=None, **options):
- """Get a time period
- :param str time_period_gid: (required) Globally unique identifier for the time period.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/time_periods/{time_period_gid}".replace("{time_period_gid}", time_period_gid)
- return self.client.get(path, params, **options)
-
- def get_time_periods(self, params=None, **options):
- """Get time periods
- :param Object params: Parameters for the request
- - start_on {date}: ISO 8601 date string
- - end_on {date}: ISO 8601 date string
- - workspace {str}: (required) Globally unique identifier for the workspace.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/time_periods"
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/typeahead.py b/asana/resources/gen/typeahead.py
deleted file mode 100644
index c23110cf..00000000
--- a/asana/resources/gen/typeahead.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# coding=utf-8
-class _Typeahead:
-
- def __init__(self, client=None):
- self.client = client
-
- def typeahead_for_workspace(self, workspace_gid, params=None, **options):
- """Get objects via typeahead
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- - resource_type {str}: (required) The type of values the typeahead should return. You can choose from one of the following: `custom_field`, `project`, `project_template`, `portfolio`, `tag`, `task`, and `user`. Note that unlike in the names of endpoints, the types listed here are in singular form (e.g. `task`). Using multiple types is not yet supported.
- - type {str}: *Deprecated: new integrations should prefer the resource_type field.*
- - query {str}: The string that will be used to search for relevant objects. If an empty string is passed in, the API will return results.
- - count {int}: The number of results to return. The default is 20 if this parameter is omitted, with a minimum of 1 and a maximum of 100. If there are fewer results found than requested, all will be returned.
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/typeahead".replace("{workspace_gid}", workspace_gid)
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/user_task_lists.py b/asana/resources/gen/user_task_lists.py
deleted file mode 100644
index b59a9d56..00000000
--- a/asana/resources/gen/user_task_lists.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# coding=utf-8
-class _UserTaskLists:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_user_task_list(self, user_task_list_gid, params=None, **options):
- """Get a user task list
- :param str user_task_list_gid: (required) Globally unique identifier for the user task list.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/user_task_lists/{user_task_list_gid}".replace("{user_task_list_gid}", user_task_list_gid)
- return self.client.get(path, params, **options)
-
- def get_user_task_list_for_user(self, user_gid, params=None, **options):
- """Get a user's task list
- :param str user_gid: (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
- :param Object params: Parameters for the request
- - workspace {str}: (required) The workspace in which to get the user task list.
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/users/{user_gid}/user_task_list".replace("{user_gid}", user_gid)
- return self.client.get(path, params, **options)
diff --git a/asana/resources/gen/users.py b/asana/resources/gen/users.py
deleted file mode 100644
index 55538f6e..00000000
--- a/asana/resources/gen/users.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# coding=utf-8
-class _Users:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_favorites_for_user(self, user_gid, params=None, **options):
- """Get a user's favorites
- :param str user_gid: (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
- :param Object params: Parameters for the request
- - resource_type {str}: (required) The resource type of favorites to be returned.
- - workspace {str}: (required) The workspace in which to get favorites.
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/users/{user_gid}/favorites".replace("{user_gid}", user_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_user(self, user_gid, params=None, **options):
- """Get a user
- :param str user_gid: (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/users/{user_gid}".replace("{user_gid}", user_gid)
- return self.client.get(path, params, **options)
-
- def get_users(self, params=None, **options):
- """Get multiple users
- :param Object params: Parameters for the request
- - workspace {str}: The workspace or organization ID to filter users on.
- - team {str}: The team ID to filter users on.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/users"
- return self.client.get_collection(path, params, **options)
-
- def get_users_for_team(self, team_gid, params=None, **options):
- """Get users in a team
- :param str team_gid: (required) Globally unique identifier for the team.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/teams/{team_gid}/users".replace("{team_gid}", team_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_users_for_workspace(self, workspace_gid, params=None, **options):
- """Get users in a workspace or organization
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/users".replace("{workspace_gid}", workspace_gid)
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/webhooks.py b/asana/resources/gen/webhooks.py
deleted file mode 100644
index 29a59840..00000000
--- a/asana/resources/gen/webhooks.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# coding=utf-8
-class _Webhooks:
-
- def __init__(self, client=None):
- self.client = client
-
- def create_webhook(self, params=None, **options):
- """Establish a webhook
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/webhooks"
- return self.client.post(path, params, **options)
-
- def delete_webhook(self, webhook_gid, params=None, **options):
- """Delete a webhook
- :param str webhook_gid: (required) Globally unique identifier for the webhook.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/webhooks/{webhook_gid}".replace("{webhook_gid}", webhook_gid)
- return self.client.delete(path, params, **options)
-
- def get_webhook(self, webhook_gid, params=None, **options):
- """Get a webhook
- :param str webhook_gid: (required) Globally unique identifier for the webhook.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/webhooks/{webhook_gid}".replace("{webhook_gid}", webhook_gid)
- return self.client.get(path, params, **options)
-
- def get_webhooks(self, params=None, **options):
- """Get multiple webhooks
- :param Object params: Parameters for the request
- - workspace {str}: (required) The workspace to query for webhooks in.
- - resource {str}: Only return webhooks for the given resource.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/webhooks"
- return self.client.get_collection(path, params, **options)
-
- def update_webhook(self, webhook_gid, params=None, **options):
- """Update a webhook
- :param str webhook_gid: (required) Globally unique identifier for the webhook.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/webhooks/{webhook_gid}".replace("{webhook_gid}", webhook_gid)
- return self.client.put(path, params, **options)
diff --git a/asana/resources/gen/workspace_memberships.py b/asana/resources/gen/workspace_memberships.py
deleted file mode 100644
index ec84ddb7..00000000
--- a/asana/resources/gen/workspace_memberships.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# coding=utf-8
-class _WorkspaceMemberships:
-
- def __init__(self, client=None):
- self.client = client
-
- def get_workspace_membership(self, workspace_membership_gid, params=None, **options):
- """Get a workspace membership
- :param str workspace_membership_gid: (required)
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspace_memberships/{workspace_membership_gid}".replace("{workspace_membership_gid}", workspace_membership_gid)
- return self.client.get(path, params, **options)
-
- def get_workspace_memberships_for_user(self, user_gid, params=None, **options):
- """Get workspace memberships for a user
- :param str user_gid: (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/users/{user_gid}/workspace_memberships".replace("{user_gid}", user_gid)
- return self.client.get_collection(path, params, **options)
-
- def get_workspace_memberships_for_workspace(self, workspace_gid, params=None, **options):
- """Get the workspace memberships for a workspace
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- - user {str}: A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/workspace_memberships".replace("{workspace_gid}", workspace_gid)
- return self.client.get_collection(path, params, **options)
diff --git a/asana/resources/gen/workspaces.py b/asana/resources/gen/workspaces.py
deleted file mode 100644
index 0250dffd..00000000
--- a/asana/resources/gen/workspaces.py
+++ /dev/null
@@ -1,76 +0,0 @@
-# coding=utf-8
-class _Workspaces:
-
- def __init__(self, client=None):
- self.client = client
-
- def add_user_for_workspace(self, workspace_gid, params=None, **options):
- """Add a user to a workspace or organization
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/addUser".replace("{workspace_gid}", workspace_gid)
- return self.client.post(path, params, **options)
-
- def get_workspace(self, workspace_gid, params=None, **options):
- """Get a workspace
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}".replace("{workspace_gid}", workspace_gid)
- return self.client.get(path, params, **options)
-
- def get_workspaces(self, params=None, **options):
- """Get multiple workspaces
- :param Object params: Parameters for the request
- :param **options
- - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces"
- return self.client.get_collection(path, params, **options)
-
- def remove_user_for_workspace(self, workspace_gid, params=None, **options):
- """Remove a user from a workspace or organization
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}/removeUser".replace("{workspace_gid}", workspace_gid)
- return self.client.post(path, params, **options)
-
- def update_workspace(self, workspace_gid, params=None, **options):
- """Update a workspace
- :param str workspace_gid: (required) Globally unique identifier for the workspace or organization.
- :param Object params: Parameters for the request
- :param **options
- - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
- - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
- :return: Object
- """
- if params is None:
- params = {}
- path = "/workspaces/{workspace_gid}".replace("{workspace_gid}", workspace_gid)
- return self.client.put(path, params, **options)
diff --git a/asana/resources/goal_relationships.py b/asana/resources/goal_relationships.py
deleted file mode 100644
index 8580407d..00000000
--- a/asana/resources/goal_relationships.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from .gen.goal_relationships import _GoalRelationships
-
-class GoalRelationships(_GoalRelationships):
- """Goal relationships resource"""
- pass
diff --git a/asana/resources/goals.py b/asana/resources/goals.py
deleted file mode 100644
index 7d2b961d..00000000
--- a/asana/resources/goals.py
+++ /dev/null
@@ -1,6 +0,0 @@
-
-from .gen.goals import _Goals
-
-class Goals(_Goals):
- """Goals resource"""
- pass
diff --git a/asana/resources/jobs.py b/asana/resources/jobs.py
deleted file mode 100644
index d10f7e83..00000000
--- a/asana/resources/jobs.py
+++ /dev/null
@@ -1,15 +0,0 @@
-
-from .gen.jobs import _Jobs
-
-class Jobs(_Jobs):
- """Jobs resource"""
- def find_by_id(self, job, params={}, **options):
- """Returns the complete job record for a single job.
-
- Parameters
- ----------
- job : {Gid} The job to get.
- [params] : {Object} Parameters for the request
- """
- path = "/jobs/%s" % (job)
- return self.client.get(path, params, **options)
diff --git a/asana/resources/memberships.py b/asana/resources/memberships.py
deleted file mode 100644
index 1da78a76..00000000
--- a/asana/resources/memberships.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from .gen.memberships import _Memberships
-
-class Memberships(_Memberships):
- """Memberships resource"""
- pass
diff --git a/asana/resources/message.py b/asana/resources/message.py
deleted file mode 100644
index 8eeacca6..00000000
--- a/asana/resources/message.py
+++ /dev/null
@@ -1,6 +0,0 @@
-
-from .gen.message import _Message
-
-class Message(_Message):
- """Message resource"""
- pass
diff --git a/asana/resources/organization_exports.py b/asana/resources/organization_exports.py
deleted file mode 100644
index e649b7c0..00000000
--- a/asana/resources/organization_exports.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from .gen.organization_exports import _OrganizationExports
-
-
-class OrganizationExports(_OrganizationExports):
- """The :class:`OrganizationExports` object, which represents the resource
- of the same name in Asana's API.
-
- """
-
- def find_by_id(self, organization_export, params={}, **options):
- """Returns details of a previously-requested Organization export.
-
- Parameters
- ----------
- organization_export : {Gid} Globally unique identifier for the Organization export.
- [params] : {Object} Parameters for the request
- """
- path = "/organization_exports/%s" % (organization_export)
- return self.client.get(path, params, **options)
-
- def create(self, params={}, **options):
- """This method creates a request to export an Organization. Asana will complete the export at some
- point after you create the request.
-
- Parameters
- ----------
- [data] : {Object} Data for the request
- - organization : {Gid} Globally unique identifier for the workspace or organization.
- """
- return self.client.post("/organization_exports", params, **options)
diff --git a/asana/resources/portfolio_memberships.py b/asana/resources/portfolio_memberships.py
deleted file mode 100644
index ae20ffea..00000000
--- a/asana/resources/portfolio_memberships.py
+++ /dev/null
@@ -1,42 +0,0 @@
-
-from .gen.portfolio_memberships import _PortfolioMemberships
-
-class PortfolioMemberships(_PortfolioMemberships):
- """Portfolio Memberships resource"""
-
- def find_all(self, params={}, **options):
- """Returns the compact portfolio membership records for the portfolio. You must
- specify `portfolio`, `portfolio` and `user`, or `workspace` and `user`.
-
- Parameters
- ----------
- [params] : {Object} Parameters for the request
- - [portfolio] : {Gid} The portfolio for which to fetch memberships.
- - [workspace] : {Gid} The workspace for which to fetch memberships.
- - [user] : {String} The user to filter the memberships to.
- """
- return self.client.get_collection("/portfolio_memberships", params, **options)
-
- def find_by_portfolio(self, portfolio, params={}, **options):
- """Returns the compact portfolio membership records for the portfolio.
-
- Parameters
- ----------
- portfolio : {Gid} The portfolio for which to fetch memberships.
- [params] : {Object} Parameters for the request
- - [user] : {String} If present, the user to filter the memberships to.
- """
- path = "/portfolios/%s/portfolio_memberships" % (portfolio)
- return self.client.get_collection(path, params, **options)
-
- def find_by_id(self, portfolio_membership, params={}, **options):
- """Returns the portfolio membership record.
-
- Parameters
- ----------
- portfolio_membership : {Gid} Globally unique identifier for the portfolio membership.
- [params] : {Object} Parameters for the request
- """
- path = "/portfolio_memberships/%s" % (portfolio_membership)
- return self.client.get(path, params, **options)
-
diff --git a/asana/resources/portfolios.py b/asana/resources/portfolios.py
deleted file mode 100644
index fbe27435..00000000
--- a/asana/resources/portfolios.py
+++ /dev/null
@@ -1,184 +0,0 @@
-
-from .gen.portfolios import _Portfolios
-
-class Portfolios(_Portfolios):
- """Portfolios resource"""
-
- def create(self, params={}, **options):
- """Creates a new portfolio in the given workspace with the supplied name.
-
- Note that portfolios created in the Asana UI may have some state
- (like the "Priority" custom field) which is automatically added to the
- portfolio when it is created. Portfolios created via our API will **not**
- be created with the same initial state to allow integrations to create
- their own starting state on a portfolio.
-
- Parameters
- ----------
- [data] : {Object} Data for the request
- - workspace : {Gid} The workspace or organization in which to create the portfolio.
- - name : {String} The name of the newly-created portfolio
- - [color] : {String} An optional color for the portfolio
- """
- return self.client.post("/portfolios", params, **options)
-
- def find_by_id(self, portfolio, params={}, **options):
- """Returns the complete record for a single portfolio.
-
- Parameters
- ----------
- portfolio : {Gid} The portfolio to get.
- [params] : {Object} Parameters for the request
- """
- path = "/portfolios/%s" % (portfolio)
- return self.client.get(path, params, **options)
-
- def update(self, portfolio, params={}, **options):
- """An existing portfolio can be updated by making a PUT request on the
- URL for that portfolio. Only the fields provided in the `data` block will be
- updated; any unspecified fields will remain unchanged.
-
- Returns the complete updated portfolio record.
-
- Parameters
- ----------
- portfolio : {Gid} The portfolio to update.
- [data] : {Object} Data for the request
- """
- path = "/portfolios/%s" % (portfolio)
- return self.client.put(path, params, **options)
-
- def delete(self, portfolio, params={}, **options):
- """An existing portfolio can be deleted by making a DELETE request
- on the URL for that portfolio.
-
- Returns an empty data record.
-
- Parameters
- ----------
- portfolio : {Gid} The portfolio to delete.
- """
- path = "/portfolios/%s" % (portfolio)
- return self.client.delete(path, params, **options)
-
- def find_all(self, params={}, **options):
- """Returns a list of the portfolios in compact representation that are owned
- by the current API user.
-
- Parameters
- ----------
- [params] : {Object} Parameters for the request
- - workspace : {Gid} The workspace or organization to filter portfolios on.
- - owner : {String} The user who owns the portfolio. Currently, API users can only get a
- list of portfolios that they themselves own.
- """
- return self.client.get_collection("/portfolios", params, **options)
-
- def get_items(self, portfolio, params={}, **options):
- """Get a list of the items in compact form in a portfolio.
-
- Parameters
- ----------
- portfolio : {Gid} The portfolio from which to get the list of items.
- [params] : {Object} Parameters for the request
- """
- path = "/portfolios/%s/items" % (portfolio)
- return self.client.get_collection(path, params, **options)
-
- def add_item(self, portfolio, params={}, **options):
- """Add an item to a portfolio.
-
- Returns an empty data block.
-
- Parameters
- ----------
- portfolio : {Gid} The portfolio to which to add an item.
- [data] : {Object} Data for the request
- - item : {Gid} The item to add to the portfolio.
- - [insert_before] : {Gid} An id of an item in this portfolio. The new item will be added before the one specified here.
- `insert_before` and `insert_after` parameters cannot both be specified.
- - [insert_after] : {Gid} An id of an item in this portfolio. The new item will be added after the one specified here.
- `insert_before` and `insert_after` parameters cannot both be specified.
- """
- path = "/portfolios/%s/addItem" % (portfolio)
- return self.client.post(path, params, **options)
-
- def remove_item(self, portfolio, params={}, **options):
- """Remove an item to a portfolio.
-
- Returns an empty data block.
-
- Parameters
- ----------
- portfolio : {Gid} The portfolio from which to remove the item.
- [data] : {Object} Data for the request
- - item : {Gid} The item to remove from the portfolio.
- """
- path = "/portfolios/%s/removeItem" % (portfolio)
- return self.client.post(path, params, **options)
-
- def add_members(self, portfolio, params={}, **options):
- """Adds the specified list of users as members of the portfolio. Returns the updated portfolio record.
-
- Parameters
- ----------
- portfolio : {Gid} The portfolio to add members to.
- [data] : {Object} Data for the request
- - members : {Array} An array of user ids.
- """
- path = "/portfolios/%s/addMembers" % (portfolio)
- return self.client.post(path, params, **options)
-
- def remove_members(self, portfolio, params={}, **options):
- """Removes the specified list of members from the portfolio. Returns the updated portfolio record.
-
- Parameters
- ----------
- portfolio : {Gid} The portfolio to remove members from.
- [data] : {Object} Data for the request
- - members : {Array} An array of user ids.
- """
- path = "/portfolios/%s/removeMembers" % (portfolio)
- return self.client.post(path, params, **options)
-
- def custom_field_settings(self, portfolio, params={}, **options):
- """Get the custom field settings on a portfolio.
-
- Parameters
- ----------
- portfolio : {Gid} The portfolio from which to get the custom field settings.
- [params] : {Object} Parameters for the request
- """
- path = "/portfolios/%s/custom_field_settings" % (portfolio)
- return self.client.get_collection(path, params, **options)
-
- def add_custom_field_setting(self, portfolio, params={}, **options):
- """Create a new custom field setting on the portfolio. Returns the full
- record for the new custom field setting.
-
- Parameters
- ----------
- portfolio : {Gid} The portfolio onto which to add the custom field.
- [data] : {Object} Data for the request
- - custom_field : {Gid} The id of the custom field to add to the portfolio.
- - [is_important] : {Boolean} Whether this field should be considered important to this portfolio (for instance, to display in the list view of items in the portfolio).
- - [insert_before] : {Gid} An id of a custom field setting on this portfolio. The new custom field setting will be added before this one.
- `insert_before` and `insert_after` parameters cannot both be specified.
- - [insert_after] : {Gid} An id of a custom field setting on this portfolio. The new custom field setting will be added after this one.
- `insert_before` and `insert_after` parameters cannot both be specified.
- """
- path = "/portfolios/%s/addCustomFieldSetting" % (portfolio)
- return self.client.post(path, params, **options)
-
- def remove_custom_field_setting(self, portfolio, params={}, **options):
- """Remove a custom field setting on the portfolio. Returns an empty data
- block.
-
- Parameters
- ----------
- portfolio : {Gid} The portfolio from which to remove the custom field.
- [data] : {Object} Data for the request
- - custom_field : {Gid} The id of the custom field to remove from this portfolio.
- """
- path = "/portfolios/%s/removeCustomFieldSetting" % (portfolio)
- return self.client.post(path, params, **options)
diff --git a/asana/resources/project_briefs.py b/asana/resources/project_briefs.py
deleted file mode 100644
index ff73b5d1..00000000
--- a/asana/resources/project_briefs.py
+++ /dev/null
@@ -1,6 +0,0 @@
-
-from .gen.project_briefs import _ProjectBriefs
-
-class ProjectBriefs(_ProjectBriefs):
- """ProjectBriefs resource"""
- pass
diff --git a/asana/resources/project_memberships.py b/asana/resources/project_memberships.py
deleted file mode 100644
index ec44a91b..00000000
--- a/asana/resources/project_memberships.py
+++ /dev/null
@@ -1,29 +0,0 @@
-
-from .gen.project_memberships import _ProjectMemberships
-
-class ProjectMemberships(_ProjectMemberships):
- """Project Memberships resource"""
-
- def find_by_project(self, project, params={}, **options):
- """Returns the compact project membership records for the project.
-
- Parameters
- ----------
- project : {Gid} The project for which to fetch memberships.
- [params] : {Object} Parameters for the request
- - [user] : {String} If present, the user to filter the memberships to.
- """
- path = "/projects/%s/project_memberships" % (project)
- return self.client.get_collection(path, params, **options)
-
- def find_by_id(self, project_membership, params={}, **options):
- """Returns the project membership record.
-
- Parameters
- ----------
- project_membership : {Gid} Globally unique identifier for the project membership.
- [params] : {Object} Parameters for the request
- """
- path = "/project_memberships/%s" % (project_membership)
- return self.client.get(path, params, **options)
-
diff --git a/asana/resources/project_statuses.py b/asana/resources/project_statuses.py
deleted file mode 100644
index 397e0bec..00000000
--- a/asana/resources/project_statuses.py
+++ /dev/null
@@ -1,56 +0,0 @@
-
-from .gen.project_statuses import _ProjectStatuses
-
-class ProjectStatuses(_ProjectStatuses):
- """Project Statuses resource"""
- def create(self, project, params={}, **options):
- self.create_in_project(project, params, **options)
-
- def create_in_project(self, project, params={}, **options):
- """Creates a new status update on the project.
-
- Returns the full record of the newly created project status update.
-
- Parameters
- ----------
- project : {Gid} The project on which to create a status update.
- [data] : {Object} Data for the request
- - text : {String} The text of the project status update.
- - color : {String} The color to associate with the status update. Must be one of `"red"`, `"yellow"`, or `"green"`.
- """
- path = "/projects/%s/project_statuses" % (project)
- return self.client.post(path, params, **options)
-
- def find_by_project(self, project, params={}, **options):
- """Returns the compact project status update records for all updates on the project.
-
- Parameters
- ----------
- project : {Gid} The project to find status updates for.
- [params] : {Object} Parameters for the request
- """
- path = "/projects/%s/project_statuses" % (project)
- return self.client.get_collection(path, params, **options)
-
- def find_by_id(self, project_status, params={}, **options):
- """Returns the complete record for a single status update.
-
- Parameters
- ----------
- project-status : {Gid} The project status update to get.
- [params] : {Object} Parameters for the request
- """
- path = "/project_statuses/%s" % (project_status)
- return self.client.get(path, params, **options)
-
- def delete(self, project_status, params={}, **options):
- """Deletes a specific, existing project status update.
-
- Returns an empty data record.
-
- Parameters
- ----------
- project-status : {Gid} The project status update to delete.
- """
- path = "/project_statuses/%s" % (project_status)
- return self.client.delete(path, params, **options)
diff --git a/asana/resources/project_templates.py b/asana/resources/project_templates.py
deleted file mode 100644
index 3715a537..00000000
--- a/asana/resources/project_templates.py
+++ /dev/null
@@ -1,6 +0,0 @@
-
-from .gen.project_templates import _ProjectTemplates
-
-class ProjectTemplates(_ProjectTemplates):
- """ProjectTemplates resource"""
- pass
diff --git a/asana/resources/projects.py b/asana/resources/projects.py
deleted file mode 100644
index d4c38c9f..00000000
--- a/asana/resources/projects.py
+++ /dev/null
@@ -1,258 +0,0 @@
-
-from .gen.projects import _Projects
-
-class Projects(_Projects):
- """Projects resource"""
- def create(self, params={}, **options):
- """Creates a new project in a workspace or team.
-
- Every project is required to be created in a specific workspace or
- organization, and this cannot be changed once set. Note that you can use
- the `workspace` parameter regardless of whether or not it is an
- organization.
-
- If the workspace for your project _is_ an organization, you must also
- supply a `team` to share the project with.
-
- Returns the full record of the newly created project.
-
- Parameters
- ----------
- [data] : {Object} Data for the request
- - workspace : {Gid} The workspace or organization to create the project in.
- - [team] : {Gid} If creating in an organization, the specific team to create the
- project in.
- """
- return self.client.post("/projects", params, **options)
-
- def create_in_workspace(self, workspace, params={}, **options):
- """If the workspace for your project _is_ an organization, you must also
- supply a `team` to share the project with.
-
- Returns the full record of the newly created project.
-
- Parameters
- ----------
- workspace : {Gid} The workspace or organization to create the project in.
- [data] : {Object} Data for the request
- """
- path = "/workspaces/%s/projects" % (workspace)
- return self.client.post(path, params, **options)
-
- def create_in_team(self, team, params={}, **options):
- """Creates a project shared with the given team.
-
- Returns the full record of the newly created project.
-
- Parameters
- ----------
- team : {Gid} The team to create the project in.
- [data] : {Object} Data for the request
- """
- path = "/teams/%s/projects" % (team)
- return self.client.post(path, params, **options)
-
- def find_by_id(self, project, params={}, **options):
- """Returns the complete project record for a single project.
-
- Parameters
- ----------
- project : {Gid} The project to get.
- [params] : {Object} Parameters for the request
- """
- path = "/projects/%s" % (project)
- return self.client.get(path, params, **options)
-
- def update(self, project, params={}, **options):
- """A specific, existing project can be updated by making a PUT request on the
- URL for that project. Only the fields provided in the `data` block will be
- updated; any unspecified fields will remain unchanged.
-
- When using this method, it is best to specify only those fields you wish
- to change, or else you may overwrite changes made by another user since
- you last retrieved the task.
-
- Returns the complete updated project record.
-
- Parameters
- ----------
- project : {Gid} The project to update.
- [data] : {Object} Data for the request
- """
- path = "/projects/%s" % (project)
- return self.client.put(path, params, **options)
-
- def delete(self, project, params={}, **options):
- """A specific, existing project can be deleted by making a DELETE request
- on the URL for that project.
-
- Returns an empty data record.
-
- Parameters
- ----------
- project : {Gid} The project to delete.
- """
- path = "/projects/%s" % (project)
- return self.client.delete(path, params, **options)
-
- def duplicate_project(self, project, params={}, **options):
- """Creates and returns a job that will asynchronously handle the duplication.
-
- Parameters
- ----------
- project : {Gid} The project to duplicate.
- [data] : {Object} Data for the request
- - name : {String} The name of the new project.
- - [team] : {Gid} Sets the team of the new project. If team is not defined, the new project
- will be in the same team as the the original project.
- - [include] : {Array} The elements that will be duplicated to the new project.
- Tasks are always included.
- - [schedule_dates] : {String} A dictionary of options to auto-shift dates.
- `task_dates` must be included to use this option.
- Requires either `start_on` or `due_on`, but not both.
- `start_on` will set the first start date of the new
- project to the given date, while `due_on` will set the last due date
- to the given date. Both will offset the remaining dates by the same amount
- of the original project.
- """
- path = "/projects/%s/duplicate" % (project)
- return self.client.post(path, params, **options)
-
- def find_all(self, params={}, **options):
- """Returns the compact project records for some filtered set of projects.
- Use one or more of the parameters provided to filter the projects returned.
-
- Parameters
- ----------
- [params] : {Object} Parameters for the request
- - [workspace] : {Gid} The workspace or organization to filter projects on.
- - [team] : {Gid} The team to filter projects on.
- - [is_template] : {Boolean} **Note: This parameter can only be included if a team is also defined, or the workspace is not an organization**
- Filters results to include only template projects.
- - [archived] : {Boolean} Only return projects whose `archived` field takes on the value of
- this parameter.
- """
- return self.client.get_collection("/projects", params, **options)
-
- def find_by_workspace(self, workspace, params={}, **options):
- """Returns the compact project records for all projects in the workspace.
-
- Parameters
- ----------
- workspace : {Gid} The workspace or organization to find projects in.
- [params] : {Object} Parameters for the request
- - [is_template] : {Boolean} **Note: This parameter can only be included if a team is also defined, or the workspace is not an organization**
- Filters results to include only template projects.
- - [archived] : {Boolean} Only return projects whose `archived` field takes on the value of
- this parameter.
- """
- path = "/workspaces/%s/projects" % (workspace)
- return self.client.get_collection(path, params, **options)
-
- def find_by_team(self, team, params={}, **options):
- """Returns the compact project records for all projects in the team.
-
- Parameters
- ----------
- team : {Gid} The team to find projects in.
- [params] : {Object} Parameters for the request
- - [is_template] : {Boolean} Filters results to include only template projects.
- - [archived] : {Boolean} Only return projects whose `archived` field takes on the value of
- this parameter.
- """
- path = "/teams/%s/projects" % (team)
- return self.client.get_collection(path, params, **options)
-
- def tasks(self, project, params={}, **options):
- """Returns the compact task records for all tasks within the given project,
- ordered by their priority within the project. Tasks can exist in more than one project at a time.
-
- Parameters
- ----------
- project : {Gid} The project in which to search for tasks.
- [params] : {Object} Parameters for the request
- """
- path = "/projects/%s/tasks" % (project)
- return self.client.get_collection(path, params, **options)
-
- def add_followers(self, project, params={}, **options):
- """Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if
- the users are not already members of the project they will also become members as a result of this operation.
- Returns the updated project record.
-
- Parameters
- ----------
- project : {Gid} The project to add followers to.
- [data] : {Object} Data for the request
- - followers : {Array} An array of followers to add to the project.
- """
- path = "/projects/%s/addFollowers" % (project)
- return self.client.post(path, params, **options)
-
- def remove_followers(self, project, params={}, **options):
- """Removes the specified list of users from following the project, this will not affect project membership status.
- Returns the updated project record.
-
- Parameters
- ----------
- project : {Gid} The project to remove followers from.
- [data] : {Object} Data for the request
- - followers : {Array} An array of followers to remove from the project.
- """
- path = "/projects/%s/removeFollowers" % (project)
- return self.client.post(path, params, **options)
-
- def add_members(self, project, params={}, **options):
- """Adds the specified list of users as members of the project. Returns the updated project record.
-
- Parameters
- ----------
- project : {Gid} The project to add members to.
- [data] : {Object} Data for the request
- - members : {Array} An array of user ids.
- """
- path = "/projects/%s/addMembers" % (project)
- return self.client.post(path, params, **options)
-
- def remove_members(self, project, params={}, **options):
- """Removes the specified list of members from the project. Returns the updated project record.
-
- Parameters
- ----------
- project : {Gid} The project to remove members from.
- [data] : {Object} Data for the request
- - members : {Array} An array of user ids.
- """
- path = "/projects/%s/removeMembers" % (project)
- return self.client.post(path, params, **options)
-
- def add_custom_field_setting(self, project, params={}, **options):
- """Create a new custom field setting on the project.
-
- Parameters
- ----------
- project : {Gid} The project to associate the custom field with
- [data] : {Object} Data for the request
- - custom_field : {Gid} The id of the custom field to associate with this project.
- - [is_important] : {Boolean} Whether this field should be considered important to this project.
- - [insert_before] : {Gid} An id of a Custom Field Settings on this project, before which the new Custom Field Settings will be added.
- `insert_before` and `insert_after` parameters cannot both be specified.
- - [insert_after] : {Gid} An id of a Custom Field Settings on this project, after which the new Custom Field Settings will be added.
- `insert_before` and `insert_after` parameters cannot both be specified.
- """
- path = "/projects/%s/addCustomFieldSetting" % (project)
- return self.client.post(path, params, **options)
-
- def remove_custom_field_setting(self, project, params={}, **options):
- """Remove a custom field setting on the project.
-
- Parameters
- ----------
- project : {Gid} The project to associate the custom field with
- [data] : {Object} Data for the request
- - [custom_field] : {Gid} The id of the custom field to remove from this project.
- """
- path = "/projects/%s/removeCustomFieldSetting" % (project)
- return self.client.post(path, params, **options)
-
-
diff --git a/asana/resources/sections.py b/asana/resources/sections.py
deleted file mode 100644
index 002acedc..00000000
--- a/asana/resources/sections.py
+++ /dev/null
@@ -1,119 +0,0 @@
-from .gen.sections import _Sections
-
-
-class Sections(_Sections):
- """The :class:`Sections` object, which represents the resource of the same
- name in Asana's API.
-
- """
- def create_in_project(self, project, params={}, **options):
- """Creates a new section in a project.
-
- Returns the full record of the newly created section.
-
- Parameters
- ----------
- project : {Gid} The project to create the section in
- [data] : {Object} Data for the request
- - name : {String} The text to be displayed as the section name. This cannot be an empty string.
- """
- path = "/projects/%s/sections" % (project)
- return self.client.post(path, params, **options)
-
- def find_by_project(self, project, params={}, **options):
- """Returns the compact records for all sections in the specified project.
-
- Parameters
- ----------
- project : {Gid} The project to get sections from.
- [params] : {Object} Parameters for the request
- """
- path = "/projects/%s/sections" % (project)
- return self.client.get_collection(path, params, **options)
-
- def find_by_id(self, section, params={}, **options):
- """Returns the complete record for a single section.
-
- Parameters
- ----------
- section : {Gid} The section to get.
- [params] : {Object} Parameters for the request
- """
- path = "/sections/%s" % (section)
- return self.client.get(path, params, **options)
-
- def update(self, section, params={}, **options):
- """A specific, existing section can be updated by making a PUT request on
- the URL for that project. Only the fields provided in the `data` block
- will be updated; any unspecified fields will remain unchanged. (note that
- at this time, the only field that can be updated is the `name` field.)
-
- When using this method, it is best to specify only those fields you wish
- to change, or else you may overwrite changes made by another user since
- you last retrieved the task.
-
- Returns the complete updated section record.
-
- Parameters
- ----------
- section : {Gid} The section to update.
- [data] : {Object} Data for the request
- """
- path = "/sections/%s" % (section)
- return self.client.put(path, params, **options)
-
- def delete(self, section, params={}, **options):
- """A specific, existing section can be deleted by making a DELETE request
- on the URL for that section.
-
- Note that sections must be empty to be deleted.
-
- The last remaining section in a board view cannot be deleted.
-
- Returns an empty data block.
-
- Parameters
- ----------
- section : {Gid} The section to delete.
- """
- path = "/sections/%s" % (section)
- return self.client.delete(path, params, **options)
-
- def add_task(self, section, params={}, **options):
- """Add a task to a specific, existing section. This will remove the task from other sections of the project.
-
- The task will be inserted at the top of a section unless an `insert_before` or `insert_after` parameter is declared.
-
- This does not work for separators (tasks with the `resource_subtype` of section).
-
- Parameters
- ----------
- section : {Gid} The section to add a task to
- [data] : {Object} Data for the request
- - task : {Gid} The task to add to this section
- - [insert_before] : {Gid} Insert the given task immediately before the task specified by this parameter. Cannot be provided together with `insert_after`.
- - [insert_after] : {Gid} Insert the given task immediately after the task specified by this parameter. Cannot be provided together with `insert_before`.
- """
- path = "/sections/%s/addTask" % (section)
- return self.client.post(path, params, **options)
-
- def insert_in_project(self, project, params={}, **options):
- """Move sections relative to each other in a board view. One of
- `before_section` or `after_section` is required.
-
- Sections cannot be moved between projects.
-
- At this point in time, moving sections is not supported in list views, only board views.
-
- Returns an empty data block.
-
- Parameters
- ----------
- project : {Gid} The project in which to reorder the given section
- [data] : {Object} Data for the request
- - section : {Gid} The section to reorder
- - [before_section] : {Gid} Insert the given section immediately before the section specified by this parameter.
- - [after_section] : {Gid} Insert the given section immediately after the section specified by this parameter.
- """
- path = "/projects/%s/sections/insert" % (project)
- return self.client.post(path, params, **options)
diff --git a/asana/resources/status_updates.py b/asana/resources/status_updates.py
deleted file mode 100644
index c061a7bb..00000000
--- a/asana/resources/status_updates.py
+++ /dev/null
@@ -1,6 +0,0 @@
-
-from .gen.status_updates import _StatusUpdates
-
-class StatusUpdates(_StatusUpdates):
- """Goals resource"""
- pass
diff --git a/asana/resources/stories.py b/asana/resources/stories.py
deleted file mode 100644
index edf2913c..00000000
--- a/asana/resources/stories.py
+++ /dev/null
@@ -1,70 +0,0 @@
-
-from .gen.stories import _Stories
-
-class Stories(_Stories):
- """Stories resource"""
- def find_by_task(self, task, params={}, **options):
- """Returns the compact records for all stories on the task.
-
- Parameters
- ----------
- task : {Gid} Globally unique identifier for the task.
- [params] : {Object} Parameters for the request
- """
- path = "/tasks/%s/stories" % (task)
- return self.client.get_collection(path, params, **options)
-
- def find_by_id(self, story, params={}, **options):
- """Returns the full record for a single story.
-
- Parameters
- ----------
- story : {Gid} Globally unique identifier for the story.
- [params] : {Object} Parameters for the request
- """
- path = "/stories/%s" % (story)
- return self.client.get(path, params, **options)
-
- def create_on_task(self, task, params={}, **options):
- """Adds a comment to a task. The comment will be authored by the
- currently authenticated user, and timestamped when the server receives
- the request.
-
- Returns the full record for the new story added to the task.
-
- Parameters
- ----------
- task : {Id} Globally unique identifier for the task.
- [data] : {Object} Data for the request
- - text : {String} The plain text of the comment to add.
- """
- path = "/tasks/%s/stories" % (task)
- return self.client.post(path, params, **options)
-
- def update(self, story, params={}, **options):
- """Updates the story and returns the full record for the updated story.
- Only comment stories can have their text updated, and only comment stories and
- attachment stories can be pinned. Only one of `text` and `html_text` can be specified.
-
- Parameters
- ----------
- story : {Gid} Globally unique identifier for the story.
- [data] : {Object} Data for the request
- - [text] : {String} The plain text with which to update the comment.
- - [html_text] : {String} The rich text with which to update the comment.
- - [is_pinned] : {Boolean} Whether the story should be pinned on the resource.
- """
- path = "/stories/%s" % (story)
- return self.client.put(path, params, **options)
-
- def delete(self, story, params={}, **options):
- """Deletes a story. A user can only delete stories they have created. Returns an empty data record.
-
- Parameters
- ----------
- story : {Gid} Globally unique identifier for the story.
- """
- path = "/stories/%s" % (story)
- return self.client.delete(path, params, **options)
-
-
diff --git a/asana/resources/tags.py b/asana/resources/tags.py
deleted file mode 100644
index 20356310..00000000
--- a/asana/resources/tags.py
+++ /dev/null
@@ -1,118 +0,0 @@
-
-from .gen.tags import _Tags
-
-class Tags(_Tags):
- """Tags resource"""
- def create(self, params={}, **options):
- """Creates a new tag in a workspace or organization.
-
- Every tag is required to be created in a specific workspace or
- organization, and this cannot be changed once set. Note that you can use
- the `workspace` parameter regardless of whether or not it is an
- organization.
-
- Returns the full record of the newly created tag.
-
- Parameters
- ----------
- [data] : {Object} Data for the request
- - workspace : {Gid} The workspace or organization to create the tag in.
- """
- return self.client.post("/tags", params, **options)
-
- def create_in_workspace(self, workspace, params={}, **options):
- """Creates a new tag in a workspace or organization.
-
- Every tag is required to be created in a specific workspace or
- organization, and this cannot be changed once set. Note that you can use
- the `workspace` parameter regardless of whether or not it is an
- organization.
-
- Returns the full record of the newly created tag.
-
- Parameters
- ----------
- workspace : {Gid} The workspace or organization to create the tag in.
- [data] : {Object} Data for the request
- """
- path = "/workspaces/%s/tags" % (workspace)
- return self.client.post(path, params, **options)
-
- def find_by_id(self, tag, params={}, **options):
- """Returns the complete tag record for a single tag.
-
- Parameters
- ----------
- tag : {Gid} The tag to get.
- [params] : {Object} Parameters for the request
- """
- path = "/tags/%s" % (tag)
- return self.client.get(path, params, **options)
-
- def update(self, tag, params={}, **options):
- """Updates the properties of a tag. Only the fields provided in the `data`
- block will be updated; any unspecified fields will remain unchanged.
-
- When using this method, it is best to specify only those fields you wish
- to change, or else you may overwrite changes made by another user since
- you last retrieved the task.
-
- Returns the complete updated tag record.
-
- Parameters
- ----------
- tag : {Gid} The tag to update.
- [data] : {Object} Data for the request
- """
- path = "/tags/%s" % (tag)
- return self.client.put(path, params, **options)
-
- def delete(self, tag, params={}, **options):
- """A specific, existing tag can be deleted by making a DELETE request
- on the URL for that tag.
-
- Returns an empty data record.
-
- Parameters
- ----------
- tag : {Gid} The tag to delete.
- """
- path = "/tags/%s" % (tag)
- return self.client.delete(path, params, **options)
-
- def find_all(self, params={}, **options):
- """Returns the compact tag records for some filtered set of tags.
- Use one or more of the parameters provided to filter the tags returned.
-
- Parameters
- ----------
- [params] : {Object} Parameters for the request
- - [workspace] : {Gid} The workspace or organization to filter tags on.
- - [team] : {Gid} The team to filter tags on.
- - [archived] : {Boolean} Only return tags whose `archived` field takes on the value of
- this parameter.
- """
- return self.client.get_collection("/tags", params, **options)
-
- def find_by_workspace(self, workspace, params={}, **options):
- """Returns the compact tag records for all tags in the workspace.
-
- Parameters
- ----------
- workspace : {Gid} The workspace or organization to find tags in.
- [params] : {Object} Parameters for the request
- """
- path = "/workspaces/%s/tags" % (workspace)
- return self.client.get_collection(path, params, **options)
-
- def get_tasks_with_tag(self, tag, params={}, **options):
- """Returns the compact task records for all tasks with the given tag.
- Tasks can have more than one tag at a time.
- Parameters
- ----------
- tag : {Id} The tag to fetch tasks from.
- [params] : {Object} Parameters for the request
- """
- path = "/tags/%s/tasks" % (tag)
- return self.client.get_collection(path, params, **options)
-
diff --git a/asana/resources/tasks.py b/asana/resources/tasks.py
deleted file mode 100644
index 0f6436a6..00000000
--- a/asana/resources/tasks.py
+++ /dev/null
@@ -1,472 +0,0 @@
-
-from .gen.tasks import _Tasks
-
-class Tasks(_Tasks):
- """Tasks resource"""
- def set_parent(self, task_id, params={}, **options):
- """Changes the parent of a task. Each task may only be a subtask of a single
- parent, or no parent task at all. Returns an empty data block.
-
- Parameters
- ----------
- task : {Id} Globally unique identifier for the task.
- [data] : {Object} Data for the request
- - parent : {Id} The new parent of the task, or `null` for no parent.
- """
- path = '/tasks/%s/setParent' % (task_id)
- return self.client.post(path, params, **options)
-
- def create(self, params={}, **options):
- """Creating a new task is as easy as POSTing to the `/tasks` endpoint
- with a data block containing the fields you'd like to set on the task.
- Any unspecified fields will take on default values.
-
- Every task is required to be created in a specific workspace, and this
- workspace cannot be changed once set. The workspace need not be set
- explicitly if you specify `projects` or a `parent` task instead.
-
- `projects` can be a comma separated list of projects, or just a single
- project the task should belong to.
-
- Parameters
- ----------
- [data] : {Object} Data for the request
- - [workspace] : {Gid} The workspace to create a task in.
- """
- return self.client.post("/tasks", params, **options)
-
- def create_in_workspace(self, workspace, params={}, **options):
- """Creating a new task is as easy as POSTing to the `/tasks` endpoint
- with a data block containing the fields you'd like to set on the task.
- Any unspecified fields will take on default values.
-
- Every task is required to be created in a specific workspace, and this
- workspace cannot be changed once set. The workspace need not be set
- explicitly if you specify a `project` or a `parent` task instead.
-
- Parameters
- ----------
- workspace : {Gid} The workspace to create a task in.
- [data] : {Object} Data for the request
- """
- path = "/workspaces/%s/tasks" % (workspace)
- return self.client.post(path, params, **options)
-
- def find_by_id(self, task, params={}, **options):
- """Returns the complete task record for a single task.
-
- Parameters
- ----------
- task : {Gid} The task to get.
- [params] : {Object} Parameters for the request
- """
- path = "/tasks/%s" % (task)
- return self.client.get(path, params, **options)
-
- def update(self, task, params={}, **options):
- """A specific, existing task can be updated by making a PUT request on the
- URL for that task. Only the fields provided in the `data` block will be
- updated; any unspecified fields will remain unchanged.
-
- When using this method, it is best to specify only those fields you wish
- to change, or else you may overwrite changes made by another user since
- you last retrieved the task.
-
- Returns the complete updated task record.
-
- Parameters
- ----------
- task : {Gid} The task to update.
- [data] : {Object} Data for the request
- """
- path = "/tasks/%s" % (task)
- return self.client.put(path, params, **options)
-
- def delete(self, task, params={}, **options):
- """A specific, existing task can be deleted by making a DELETE request on the
- URL for that task. Deleted tasks go into the "trash" of the user making
- the delete request. Tasks can be recovered from the trash within a period
- of 30 days; afterward they are completely removed from the system.
-
- Returns an empty data record.
-
- Parameters
- ----------
- task : {Gid} The task to delete.
- """
- path = "/tasks/%s" % (task)
- return self.client.delete(path, params, **options)
-
- def duplicate_task(self, task, params={}, **options):
- """Creates and returns a job that will asynchronously handle the duplication.
-
- Parameters
- ----------
- task : {Gid} The task to duplicate.
- [data] : {Object} Data for the request
- - name : {String} The name of the new task.
- - [include] : {Array} The fields that will be duplicated to the new task.
- """
- path = "/tasks/%s/duplicate" % (task)
- return self.client.post(path, params, **options)
-
- def find_by_project(self, project, params={}, **options):
- """Returns the compact task records for all tasks within the given project,
- ordered by their priority within the project.
-
- Parameters
- ----------
- project : {Gid} The project in which to search for tasks.
- [params] : {Object} Parameters for the request
- """
- path = "/projects/%s/tasks" % (project)
- return self.client.get_collection(path, params, **options)
-
- def find_by_tag(self, tag, params={}, **options):
- """Returns the compact task records for all tasks with the given tag.
-
- Parameters
- ----------
- tag : {Gid} The tag in which to search for tasks.
- [params] : {Object} Parameters for the request
- """
- path = "/tags/%s/tasks" % (tag)
- return self.client.get_collection(path, params, **options)
-
- def find_by_section(self, section, params={}, **options):
- """Board view only: Returns the compact section records for all tasks within the given section.
-
- Parameters
- ----------
- section : {Gid} The section in which to search for tasks.
- [params] : {Object} Parameters for the request
- """
- path = "/sections/%s/tasks" % (section)
- return self.client.get_collection(path, params, **options)
-
- def find_by_user_task_list(self, user_task_list, params={}, **options):
- """Returns the compact list of tasks in a user's My Tasks list. The returned
- tasks will be in order within each assignee status group of `Inbox`,
- `Today`, and `Upcoming`.
-
- **Note:** tasks in `Later` have a different ordering in the Asana web app
- than the other assignee status groups; this endpoint will still return
- them in list order in `Later` (differently than they show up in Asana,
- but the same order as in Asana's mobile apps).
-
- **Note:** Access control is enforced for this endpoint as with all Asana
- API endpoints, meaning a user's private tasks will be filtered out if the
- API-authenticated user does not have access to them.
-
- **Note:** Both complete and incomplete tasks are returned by default
- unless they are filtered out (for example, setting `completed_since=now`
- will return only incomplete tasks, which is the default view for "My
- Tasks" in Asana.)
-
- Parameters
- ----------
- user_task_list : {Gid} The user task list in which to search for tasks.
- [params] : {Object} Parameters for the request
- - [completed_since] : {String} Only return tasks that are either incomplete or that have been
- completed since this time.
- """
- path = "/user_task_lists/%s/tasks" % (user_task_list)
- return self.client.get_collection(path, params, **options)
-
- def find_all(self, params={}, **options):
- """Returns the compact task records for some filtered set of tasks. Use one
- or more of the parameters provided to filter the tasks returned. You must
- specify a `project`, `section`, `tag`, or `user_task_list` if you do not
- specify `assignee` and `workspace`.
-
- Parameters
- ----------
- [params] : {Object} Parameters for the request
- - [assignee] : {String} The assignee to filter tasks on.
- - [workspace] : {Gid} The workspace or organization to filter tasks on.
- - [project] : {Gid} The project to filter tasks on.
- - [section] : {Gid} The section to filter tasks on.
- - [tag] : {Gid} The tag to filter tasks on.
- - [user_task_list] : {Gid} The user task list to filter tasks on.
- - [completed_since] : {String} Only return tasks that are either incomplete or that have been
- completed since this time.
- - [modified_since] : {String} Only return tasks that have been modified since the given time.
- """
- return self.client.get_collection("/tasks", params, **options)
-
- def search_in_workspace(self, workspace, params={}, **options):
- """The search endpoint allows you to build complex queries to find and fetch exactly the data you need from Asana. For a more comprehensive description of all the query parameters and limitations of this endpoint, see our [long-form documentation](/developers/documentation/getting-started/search-api) for this feature.
-
- Parameters
- ----------
- workspace : {Gid} The workspace or organization in which to search for tasks.
- [params] : {Object} Parameters for the request
- - [resource_subtype] : {Enum} Filters results by the task's resource_subtype.
- """
- path = "/workspaces/%s/tasks/search" % (workspace)
- return self.client.get_collection(path, params, **options)
-
- def dependencies(self, task, params={}, **options):
- """Returns the compact representations of all of the dependencies of a task.
-
- Parameters
- ----------
- task : {Gid} The task to get dependencies on.
- [params] : {Object} Parameters for the request
- """
- path = "/tasks/%s/dependencies" % (task)
- return self.client.get(path, params, **options)
-
- def dependents(self, task, params={}, **options):
- """Returns the compact representations of all of the dependents of a task.
-
- Parameters
- ----------
- task : {Gid} The task to get dependents on.
- [params] : {Object} Parameters for the request
- """
- path = "/tasks/%s/dependents" % (task)
- return self.client.get(path, params, **options)
-
- def add_dependencies(self, task, params={}, **options):
- """Marks a set of tasks as dependencies of this task, if they are not
- already dependencies. *A task can have at most 15 dependencies.*
-
- Parameters
- ----------
- task : {Gid} The task to add dependencies to.
- [data] : {Object} Data for the request
- - dependencies : {Array} An array of task IDs that this task should depend on.
- """
- path = "/tasks/%s/addDependencies" % (task)
- return self.client.post(path, params, **options)
-
- def add_dependents(self, task, params={}, **options):
- """Marks a set of tasks as dependents of this task, if they are not already
- dependents. *A task can have at most 30 dependents.*
-
- Parameters
- ----------
- task : {Gid} The task to add dependents to.
- [data] : {Object} Data for the request
- - dependents : {Array} An array of task IDs that should depend on this task.
- """
- path = "/tasks/%s/addDependents" % (task)
- return self.client.post(path, params, **options)
-
- def remove_dependencies(self, task, params={}, **options):
- """Unlinks a set of dependencies from this task.
-
- Parameters
- ----------
- task : {Gid} The task to remove dependencies from.
- [data] : {Object} Data for the request
- - dependencies : {Array} An array of task IDs to remove as dependencies.
- """
- path = "/tasks/%s/removeDependencies" % (task)
- return self.client.post(path, params, **options)
-
- def remove_dependents(self, task, params={}, **options):
- """Unlinks a set of dependents from this task.
-
- Parameters
- ----------
- task : {Gid} The task to remove dependents from.
- [data] : {Object} Data for the request
- - dependents : {Array} An array of task IDs to remove as dependents.
- """
- path = "/tasks/%s/removeDependents" % (task)
- return self.client.post(path, params, **options)
-
- def add_followers(self, task, params={}, **options):
- """Adds each of the specified followers to the task, if they are not already
- following. Returns the complete, updated record for the affected task.
-
- Parameters
- ----------
- task : {Gid} The task to add followers to.
- [data] : {Object} Data for the request
- - followers : {Array} An array of followers to add to the task.
- """
- path = "/tasks/%s/addFollowers" % (task)
- return self.client.post(path, params, **options)
-
- def remove_followers(self, task, params={}, **options):
- """Removes each of the specified followers from the task if they are
- following. Returns the complete, updated record for the affected task.
-
- Parameters
- ----------
- task : {Gid} The task to remove followers from.
- [data] : {Object} Data for the request
- - followers : {Array} An array of followers to remove from the task.
- """
- path = "/tasks/%s/removeFollowers" % (task)
- return self.client.post(path, params, **options)
-
- def projects(self, task, params={}, **options):
- """Returns a compact representation of all of the projects the task is in.
-
- Parameters
- ----------
- task : {Gid} The task to get projects on.
- [params] : {Object} Parameters for the request
- """
- path = "/tasks/%s/projects" % (task)
- return self.client.get_collection(path, params, **options)
-
- def add_project(self, task, params={}, **options):
- """Adds the task to the specified project, in the optional location
- specified. If no location arguments are given, the task will be added to
- the end of the project.
-
- `addProject` can also be used to reorder a task within a project or section that
- already contains it.
-
- At most one of `insert_before`, `insert_after`, or `section` should be
- specified. Inserting into a section in an non-order-dependent way can be
- done by specifying `section`, otherwise, to insert within a section in a
- particular place, specify `insert_before` or `insert_after` and a task
- within the section to anchor the position of this task.
-
- Returns an empty data block.
-
- Parameters
- ----------
- task : {Gid} The task to add to a project.
- [data] : {Object} Data for the request
- - project : {Gid} The project to add the task to.
- - [insert_after] : {Gid} A task in the project to insert the task after, or `null` to
- insert at the beginning of the list.
- - [insert_before] : {Gid} A task in the project to insert the task before, or `null` to
- insert at the end of the list.
- - [section] : {Gid} A section in the project to insert the task into. The task will be
- inserted at the bottom of the section.
- """
- path = "/tasks/%s/addProject" % (task)
- return self.client.post(path, params, **options)
-
- def remove_project(self, task, params={}, **options):
- """Removes the task from the specified project. The task will still exist
- in the system, but it will not be in the project anymore.
-
- Returns an empty data block.
-
- Parameters
- ----------
- task : {Gid} The task to remove from a project.
- [data] : {Object} Data for the request
- - project : {Gid} The project to remove the task from.
- """
- path = "/tasks/%s/removeProject" % (task)
- return self.client.post(path, params, **options)
-
- def tags(self, task, params={}, **options):
- """Returns a compact representation of all of the tags the task has.
-
- Parameters
- ----------
- task : {Gid} The task to get tags on.
- [params] : {Object} Parameters for the request
- """
- path = "/tasks/%s/tags" % (task)
- return self.client.get_collection(path, params, **options)
-
- def add_tag(self, task, params={}, **options):
- """Adds a tag to a task. Returns an empty data block.
-
- Parameters
- ----------
- task : {Gid} The task to add a tag to.
- [data] : {Object} Data for the request
- - tag : {Gid} The tag to add to the task.
- """
- path = "/tasks/%s/addTag" % (task)
- return self.client.post(path, params, **options)
-
- def remove_tag(self, task, params={}, **options):
- """Removes a tag from the task. Returns an empty data block.
-
- Parameters
- ----------
- task : {Gid} The task to remove a tag from.
- [data] : {Object} Data for the request
- - tag : {Gid} The tag to remove from the task.
- """
- path = "/tasks/%s/removeTag" % (task)
- return self.client.post(path, params, **options)
-
- def subtasks(self, task, params={}, **options):
- """Returns a compact representation of all of the subtasks of a task.
-
- Parameters
- ----------
- task : {Gid} The task to get the subtasks of.
- [params] : {Object} Parameters for the request
- """
- path = "/tasks/%s/subtasks" % (task)
- return self.client.get_collection(path, params, **options)
-
- def add_subtask(self, task, params={}, **options):
- """Creates a new subtask and adds it to the parent task. Returns the full record
- for the newly created subtask.
-
- Parameters
- ----------
- task : {Gid} The task to add a subtask to.
- [data] : {Object} Data for the request
- """
- path = "/tasks/%s/subtasks" % (task)
- return self.client.post(path, params, **options)
-
- def stories(self, task, params={}, **options):
- """Returns a compact representation of all of the stories on the task.
-
- Parameters
- ----------
- task : {Gid} The task containing the stories to get.
- [params] : {Object} Parameters for the request
- """
- path = "/tasks/%s/stories" % (task)
- return self.client.get_collection(path, params, **options)
-
- def add_comment(self, task, params={}, **options):
- """Adds a comment to a task. The comment will be authored by the
- currently authenticated user, and timestamped when the server receives
- the request.
-
- Returns the full record for the new story added to the task.
-
- Parameters
- ----------
- task : {Id} Globally unique identifier for the task.
- [data] : {Object} Data for the request
- - text : {String} The plain text of the comment to add.
- """
- path = "/tasks/%s/stories" % (task)
- return self.client.post(path, params, **options)
-
- def insert_in_user_task_list(self, user_task_list, params={}, **options):
- """Insert or reorder tasks in a user's My Tasks list. If the task was not
- assigned to the owner of the user task list it will be reassigned when
- this endpoint is called. If neither `insert_before` nor `insert_after`
- are provided the task will be inserted at the top of the assignee's
- inbox.
-
- Returns an empty data block.
-
- Parameters
- ----------
- user_task_list : {Gid} Globally unique identifier for the user task list.
- [data] : {Object} Data for the request
- - task : {Gid} Globally unique identifier for the task.
- - [insert_before] : {Gid} Insert the task before the task specified by this field. The inserted
- task will inherit the `assignee_status` of this task. `insert_before`
- and `insert_after` parameters cannot both be specified.
- - [insert_after] : {Gid} Insert the task after the task specified by this field. The inserted
- task will inherit the `assignee_status` of this task. `insert_before`
- and `insert_after` parameters cannot both be specified.
- """
- path = "/user_task_lists/%s/tasks/insert" % (user_task_list)
- return self.client.post(path, params, **options)
-
diff --git a/asana/resources/team_memberships.py b/asana/resources/team_memberships.py
deleted file mode 100644
index b3bba790..00000000
--- a/asana/resources/team_memberships.py
+++ /dev/null
@@ -1,6 +0,0 @@
-
-from .gen.team_memberships import _TeamMemberships
-
-class TeamMemberships(_TeamMemberships):
- """TeamMemberships resource"""
- pass
diff --git a/asana/resources/teams.py b/asana/resources/teams.py
deleted file mode 100644
index 737f7374..00000000
--- a/asana/resources/teams.py
+++ /dev/null
@@ -1,86 +0,0 @@
-
-from .gen.teams import _Teams
-
-class Teams(_Teams):
- """Teams resource"""
- def find_by_id(self, team, params={}, **options):
- """Returns the full record for a single team.
-
- Parameters
- ----------
- team : {Id} Globally unique identifier for the team.
- [params] : {Object} Parameters for the request
- """
- path = "/teams/%s" % (team)
- return self.client.get(path, params, **options)
-
- def find_by_organization(self, organization, params={}, **options):
- """Returns the compact records for all teams in the organization visible to
- the authorized user.
-
- Parameters
- ----------
- organization : {Id} Globally unique identifier for the workspace or organization.
- [params] : {Object} Parameters for the request
- """
- path = "/organizations/%s/teams" % (organization)
- return self.client.get_collection(path, params, **options)
-
- def find_by_user(self, user, params={}, **options):
- """Returns the compact records for all teams to which user is assigned.
-
- Parameters
- ----------
- user : {String} An identifier for the user. Can be one of an email address,
- the globally unique identifier for the user, or the keyword `me`
- to indicate the current user making the request.
- [params] : {Object} Parameters for the request
- - [organization] : {Id} The workspace or organization to filter teams on.
- """
- path = "/users/%s/teams" % (user)
- return self.client.get_collection(path, params, **options)
-
- def users(self, team, params={}, **options):
- """Returns the compact records for all users that are members of the team.
-
- Parameters
- ----------
- team : {Id} Globally unique identifier for the team.
- [params] : {Object} Parameters for the request
- """
- path = "/teams/%s/users" % (team)
- return self.client.get_collection(path, params, **options)
-
- def add_user(self, team, params={}, **options):
- """The user making this call must be a member of the team in order to add others.
- The user to add must exist in the same organization as the team in order to be added.
- The user to add can be referenced by their globally unique user ID or their email address.
- Returns the full user record for the added user.
-
- Parameters
- ----------
- team : {Id} Globally unique identifier for the team.
- [data] : {Object} Data for the request
- - user : {String} An identifier for the user. Can be one of an email address,
- the globally unique identifier for the user, or the keyword `me`
- to indicate the current user making the request.
- """
- path = "/teams/%s/addUser" % (team)
- return self.client.post(path, params, **options)
-
- def remove_user(self, team, params={}, **options):
- """The user to remove can be referenced by their globally unique user ID or their email address.
- Removes the user from the specified team. Returns an empty data record.
-
- Parameters
- ----------
- team : {Id} Globally unique identifier for the team.
- [data] : {Object} Data for the request
- - user : {String} An identifier for the user. Can be one of an email address,
- the globally unique identifier for the user, or the keyword `me`
- to indicate the current user making the request.
- """
- path = "/teams/%s/removeUser" % (team)
- return self.client.post(path, params, **options)
-
-
diff --git a/asana/resources/time_periods.py b/asana/resources/time_periods.py
deleted file mode 100644
index 1980735b..00000000
--- a/asana/resources/time_periods.py
+++ /dev/null
@@ -1,6 +0,0 @@
-
-from .gen.time_periods import _TimePeriods
-
-class TimePeriods(_TimePeriods):
- """TimePeriods resource"""
- pass
diff --git a/asana/resources/typeahead.py b/asana/resources/typeahead.py
deleted file mode 100644
index bfb36814..00000000
--- a/asana/resources/typeahead.py
+++ /dev/null
@@ -1,6 +0,0 @@
-
-from .gen.typeahead import _Typeahead
-
-class Typeahead(_Typeahead):
- """Typeahead resource"""
- pass
diff --git a/asana/resources/user_task_lists.py b/asana/resources/user_task_lists.py
deleted file mode 100644
index db4a3b70..00000000
--- a/asana/resources/user_task_lists.py
+++ /dev/null
@@ -1,60 +0,0 @@
-
-from .gen.user_task_lists import _UserTaskLists
-
-class UserTaskLists(_UserTaskLists):
- """User Task Lists resource"""
- def find_by_user(self, user, params={}, **options):
- """Returns the full record for the user task list for the given user
-
- Parameters
- ----------
- user : {String} An identifier for the user. Can be one of an email address,
- the globally unique identifier for the user, or the keyword `me`
- to indicate the current user making the request.
- [params] : {Object} Parameters for the request
- - workspace : {Gid} Globally unique identifier for the workspace or organization.
- """
- path = "/users/%s/user_task_list" % (user)
- return self.client.get(path, params, **options)
-
- def find_by_id(self, user_task_list, params={}, **options):
- """Returns the full record for a user task list.
-
- Parameters
- ----------
- user_task_list : {Gid} Globally unique identifier for the user task list.
- [params] : {Object} Parameters for the request
- """
- path = "/user_task_lists/%s" % (user_task_list)
- return self.client.get(path, params, **options)
-
- def tasks(self, user_task_list, params={}, **options):
- """Returns the compact list of tasks in a user's My Tasks list. The returned
- tasks will be in order within each assignee status group of `Inbox`,
- `Today`, and `Upcoming`.
-
- **Note:** tasks in `Later` have a different ordering in the Asana web app
- than the other assignee status groups; this endpoint will still return
- them in list order in `Later` (differently than they show up in Asana,
- but the same order as in Asana's mobile apps).
-
- **Note:** Access control is enforced for this endpoint as with all Asana
- API endpoints, meaning a user's private tasks will be filtered out if the
- API-authenticated user does not have access to them.
-
- **Note:** Both complete and incomplete tasks are returned by default
- unless they are filtered out (for example, setting `completed_since=now`
- will return only incomplete tasks, which is the default view for "My
- Tasks" in Asana.)
-
- Parameters
- ----------
- user_task_list : {Gid} The user task list in which to search for tasks.
- [params] : {Object} Parameters for the request
- - [completed_since] : {String} Only return tasks that are either incomplete or that have been
- completed since this time.
- """
- path = "/user_task_lists/%s/tasks" % (user_task_list)
- return self.client.get_collection(path, params, **options)
-
-
diff --git a/asana/resources/users.py b/asana/resources/users.py
deleted file mode 100644
index 98ab7b97..00000000
--- a/asana/resources/users.py
+++ /dev/null
@@ -1,68 +0,0 @@
-
-from .gen.users import _Users
-
-class Users(_Users):
- """Users resource"""
- def me(self, params={}, **options):
- """Returns the full user record for the currently authenticated user.
-
- Parameters
- ----------
- [params] : {Object} Parameters for the request
- """
- return self.client.get("/users/me", params, **options)
-
- def find_by_id(self, user, params={}, **options):
- """Returns the full user record for the single user with the provided ID.
-
- Parameters
- ----------
- user : {String} An identifier for the user. Can be one of an email address,
- the globally unique identifier for the user, or the keyword `me`
- to indicate the current user making the request.
- [params] : {Object} Parameters for the request
- """
- path = "/users/%s" % (user)
- return self.client.get(path, params, **options)
-
- def get_user_favorites(self, user, params={}, **options):
- """Returns all of a user's favorites in the given workspace, of the given type.
- Results are given in order (The same order as Asana's sidebar).
-
- Parameters
- ----------
- user : {String} An identifier for the user. Can be one of an email address,
- the globally unique identifier for the user, or the keyword `me`
- to indicate the current user making the request.
- [params] : {Object} Parameters for the request
- - workspace : {Id} The workspace in which to get favorites.
- - resource_type : {Enum} The resource type of favorites to be returned.
- """
- path = "/users/%s/favorites" % (user)
- return self.client.get_collection(path, params, **options)
-
- def find_by_workspace(self, workspace, params={}, **options):
- """Returns the user records for all users in the specified workspace or
- organization.
-
- Parameters
- ----------
- workspace : {Id} The workspace in which to get users.
- [params] : {Object} Parameters for the request
- """
- path = "/workspaces/%s/users" % (workspace)
- return self.client.get_collection(path, params, **options)
-
- def find_all(self, params={}, **options):
- """Returns the user records for all users in all workspaces and organizations
- accessible to the authenticated user. Accepts an optional workspace ID
- parameter.
-
- Parameters
- ----------
- [params] : {Object} Parameters for the request
- - [workspace] : {Id} The workspace or organization to filter users on.
- """
- return self.client.get_collection("/users", params, **options)
-
-
diff --git a/asana/resources/webhooks.py b/asana/resources/webhooks.py
deleted file mode 100644
index 25e79536..00000000
--- a/asana/resources/webhooks.py
+++ /dev/null
@@ -1,64 +0,0 @@
-
-from .gen.webhooks import _Webhooks
-
-class Webhooks(_Webhooks):
- """Webhooks resource"""
- def create(self, params={}, **options):
- """Establishing a webhook is a two-part process. First, a simple HTTP POST
- similar to any other resource creation. Since you could have multiple
- webhooks we recommend specifying a unique local id for each target.
-
- Next comes the confirmation handshake. When a webhook is created, we will
- send a test POST to the `target` with an `X-Hook-Secret` header as
- described in the
- [Resthooks Security documentation](http://resthooks.org/docs/security/).
- The target must respond with a `200 OK` and a matching `X-Hook-Secret`
- header to confirm that this webhook subscription is indeed expected.
-
- If you do not acknowledge the webhook's confirmation handshake it will
- fail to setup, and you will receive an error in response to your attempt
- to create it. This means you need to be able to receive and complete the
- webhook *while* the POST request is in-flight.
-
- Parameters
- ----------
- resource : {Id} A resource ID to subscribe to. The resource can be a task or project.
- target : {String} The URL to receive the HTTP POST.
- [data] : {Object} Data for the request
- """
- return self.client.post("/webhooks", params, **options)
-
- def get_all(self, params={}, **options):
- """Returns the compact representation of all webhooks your app has
- registered for the authenticated user in the given workspace.
-
- Parameters
- ----------
- workspace : {Id} The workspace to query for webhooks in.
- [params] : {Object} Parameters for the request
- - [resource] : {Id} Only return webhooks for the given resource.
- """
- return self.client.get_collection("/webhooks", params, **options)
-
- def get_by_id(self, webhook, params={}, **options):
- """Returns the full record for the given webhook.
-
- Parameters
- ----------
- webhook : {Id} The webhook to get.
- [params] : {Object} Parameters for the request
- """
- path = "/webhooks/%s" % (webhook)
- return self.client.get(path, params, **options)
-
- def delete_by_id(self, webhook, params={}, **options):
- """This method permanently removes a webhook. Note that it may be possible
- to receive a request that was already in flight after deleting the
- webhook, but no further requests will be issued.
-
- Parameters
- ----------
- webhook : {Id} The webhook to delete.
- """
- path = "/webhooks/%s" % (webhook)
- return self.client.delete(path, params, **options)
diff --git a/asana/resources/workspace_memberships.py b/asana/resources/workspace_memberships.py
deleted file mode 100644
index daecf713..00000000
--- a/asana/resources/workspace_memberships.py
+++ /dev/null
@@ -1,6 +0,0 @@
-
-from .gen.workspace_memberships import _WorkspaceMemberships
-
-class WorkspaceMemberships(_WorkspaceMemberships):
- """WorkspaceMemberships resource"""
- pass
diff --git a/asana/resources/workspaces.py b/asana/resources/workspaces.py
deleted file mode 100644
index c1fd2166..00000000
--- a/asana/resources/workspaces.py
+++ /dev/null
@@ -1,97 +0,0 @@
-
-from .gen.workspaces import _Workspaces
-
-class Workspaces(_Workspaces):
- """Workspaces resource"""
- def find_by_id(self, workspace, params={}, **options):
- """Returns the full workspace record for a single workspace.
-
- Parameters
- ----------
- workspace : {Id} Globally unique identifier for the workspace or organization.
- [params] : {Object} Parameters for the request
- """
- path = "/workspaces/%s" % (workspace)
- return self.client.get(path, params, **options)
-
- def find_all(self, params={}, **options):
- """Returns the compact records for all workspaces visible to the authorized user.
-
- Parameters
- ----------
- [params] : {Object} Parameters for the request
- """
- return self.client.get_collection("/workspaces", params, **options)
-
- def update(self, workspace, params={}, **options):
- """A specific, existing workspace can be updated by making a PUT request on
- the URL for that workspace. Only the fields provided in the data block
- will be updated; any unspecified fields will remain unchanged.
-
- Currently the only field that can be modified for a workspace is its `name`.
-
- Returns the complete, updated workspace record.
-
- Parameters
- ----------
- workspace : {Id} The workspace to update.
- [data] : {Object} Data for the request
- """
- path = "/workspaces/%s" % (workspace)
- return self.client.put(path, params, **options)
-
- def typeahead(self, workspace, params={}, **options):
- """Retrieves objects in the workspace based on an auto-completion/typeahead
- search algorithm. This feature is meant to provide results quickly, so do
- not rely on this API to provide extremely accurate search results. The
- result set is limited to a single page of results with a maximum size,
- so you won't be able to fetch large numbers of results.
-
- Parameters
- ----------
- workspace : {Id} The workspace to fetch objects from.
- [params] : {Object} Parameters for the request
- - resource_type : {Enum} The type of values the typeahead should return. You can choose from
- one of the following: custom_field, project, tag, task, and user.
- Note that unlike in the names of endpoints, the types listed here are
- in singular form (e.g. `task`). Using multiple types is not yet supported.
- - [type] : {Enum} **Deprecated: new integrations should prefer the resource_type field.**
- - [query] : {String} The string that will be used to search for relevant objects. If an
- empty string is passed in, the API will currently return an empty
- result set.
- - [count] : {Number} The number of results to return. The default is `20` if this
- parameter is omitted, with a minimum of `1` and a maximum of `100`.
- If there are fewer results found than requested, all will be returned.
- """
- path = "/workspaces/%s/typeahead" % (workspace)
- return self.client.get_collection(path, params, **options)
-
- def add_user(self, workspace, params={}, **options):
- """The user can be referenced by their globally unique user ID or their email address.
- Returns the full user record for the invited user.
-
- Parameters
- ----------
- workspace : {Id} The workspace or organization to invite the user to.
- [data] : {Object} Data for the request
- - user : {String} An identifier for the user. Can be one of an email address,
- the globally unique identifier for the user, or the keyword `me`
- to indicate the current user making the request.
- """
- path = "/workspaces/%s/addUser" % (workspace)
- return self.client.post(path, params, **options)
-
- def remove_user(self, workspace, params={}, **options):
- """The user making this call must be an admin in the workspace.
- Returns an empty data record.
-
- Parameters
- ----------
- workspace : {Id} The workspace or organization to invite the user to.
- [data] : {Object} Data for the request
- - user : {String} An identifier for the user. Can be one of an email address,
- the globally unique identifier for the user, or the keyword `me`
- to indicate the current user making the request.
- """
- path = "/workspaces/%s/removeUser" % (workspace)
- return self.client.post(path, params, **options)
diff --git a/asana/session.py b/asana/session.py
deleted file mode 100644
index 1d0276ce..00000000
--- a/asana/session.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import requests
-import requests_oauthlib
-
-class AsanaOAuth2Session(requests_oauthlib.OAuth2Session):
- """Session class for making OAuth authenticated requests to Asana's API"""
-
- authorize_url = 'https://app.asana.com/-/oauth_authorize'
- token_url = 'https://app.asana.com/-/oauth_token'
-
- def __init__(self, client_secret=None, **kwargs):
- super(AsanaOAuth2Session, self).__init__(**kwargs)
- self.client_secret = client_secret
-
- def authorization_url(self):
- """Get a URL (and 'state' token) to redirect the user to for authentication"""
- return super(AsanaOAuth2Session, self).authorization_url(self.authorize_url)
-
- def fetch_token(self, **kwargs):
- """Exchange a code (and 'state' token) for a bearer token"""
- return super(AsanaOAuth2Session, self).fetch_token(self.token_url, client_secret=self.client_secret, **kwargs)
diff --git a/asana/version.py b/asana/version.py
deleted file mode 100644
index 29e4a941..00000000
--- a/asana/version.py
+++ /dev/null
@@ -1 +0,0 @@
-__version__ = '3.2.2'
diff --git a/codegen/swagger/README.md b/codegen/swagger/README.md
new file mode 100644
index 00000000..ca6b3110
--- /dev/null
+++ b/codegen/swagger/README.md
@@ -0,0 +1,74 @@
+# Swagger Codegen for the AsanaPythonClientCodegen library
+
+## Overview
+This is a boiler-plate project to generate your own client library with Swagger. Its goal is
+to get you started with the basic plumbing so you can put in your own logic. It won't work without
+your changes applied.
+
+## What's Swagger?
+The goal of Swagger™ is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined via Swagger, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interfaces have done for lower-level programming, Swagger removes the guesswork in calling the service.
+
+
+Check out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for additional information about the Swagger project, including additional libraries with support for other languages and more.
+
+## How do I use this?
+At this point, you've likely generated a client setup. It will include something along these lines:
+
+```
+.
+|- README.md // this file
+|- pom.xml // build script
+|-- src
+|--- main
+|---- java
+|----- com.asana.codegen.AsanaPythonClientCodegenGenerator.java // generator file
+|---- resources
+|----- AsanaPythonClientCodegen // template files
+|----- META-INF
+|------ services
+|------- io.swagger.codegen.CodegenConfig
+```
+
+You _will_ need to make changes in at least the following:
+
+`AsanaPythonClientCodegenGenerator.java`
+
+Templates in this folder:
+
+`src/main/resources/AsanaPythonClientCodegen`
+
+Once modified, you can run this:
+
+```
+mvn package
+```
+
+In your generator project. A single jar file will be produced in `target`. You can now use that with codegen:
+
+```
+java -cp /path/to/swagger-codegen-cli.jar:/path/to/your.jar io.swagger.codegen.v3.cli.SwaggerCodegen -l AsanaPythonClientCodegen -i /path/to/swagger.yaml -o ./test
+```
+
+Now your templates are available to the client generator and you can write output values
+
+## But how do I modify this?
+The `ReadMe.java` has comments in it--lots of comments. There is no good substitute
+for reading the code more, though. See how the `ReadMe` implements `CodegenConfig`.
+That class has the signature of all values that can be overridden.
+
+For the templates themselves, you have a number of values available to you for generation.
+You can execute the `java` command from above while passing different debug flags to show
+the object you have available during client generation:
+
+```
+# The following additional debug options are available for all codegen targets:
+# -DdebugSwagger prints the OpenAPI Specification as interpreted by the codegen
+# -DdebugModels prints models passed to the template engine
+# -DdebugOperations prints operations passed to the template engine
+# -DdebugSupportingFiles prints additional data passed to the template engine
+
+java -DdebugOperations -cp /path/to/swagger-codegen-cli.jar:/path/to/your.jar io.swagger.codegen.Codegen -l AsanaPythonClientCodegen -i /path/to/swagger.yaml -o ./test
+```
+
+Will, for example, output the debug info for operations. You can use this info
+in the `api.mustache` file.
diff --git a/codegen/swagger/pom.xml b/codegen/swagger/pom.xml
new file mode 100644
index 00000000..edd08158
--- /dev/null
+++ b/codegen/swagger/pom.xml
@@ -0,0 +1,129 @@
+ Hello {{ name }}.{{ dump }}