Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
alpinweis committed Nov 6, 2021
1 parent 6786300 commit f48f69a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### [0.4.1] - 2021-11-07
* Fix get_contexts()
* Add endpoints for context environment variables (API v2)

### [0.4.0] - 2021-11-06
* Add context endpoints (API v2)
* Add job details endpoint (API v2)
Expand Down
18 changes: 9 additions & 9 deletions pycircleci/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ def get_contexts(self, username=None, owner_id=None, owner_type=ORGANIZATION, vc
:param limit: Maximum number of items to return. By default returns all the results from multiple calls to the endpoint, or all the results from a single call to the endpoint, depending on the value for ``paginate``.
Endpoint:
GET ``/v2/context?owner-slug=:vcs_type/:username``
GET ``/v2/context?owner-slug=:vcs-type/:username``
"""

params = {"owner-type": owner_type}
Expand Down Expand Up @@ -806,7 +806,7 @@ def get_context(self, context_id):
:param context_id: UUID of context to get.
Endpoint:
GET ``/v2/context/:context_id``
GET ``/v2/context/:context-id``
"""
endpoint = "context/{0}".format(context_id)

Expand All @@ -819,22 +819,22 @@ def delete_context(self, context_id):
:param context_id: UUID of context to delete.
Endpoint:
DELETE ``/v2/context/:context_id``
DELETE ``/v2/context/:context-id``
"""
endpoint = "context/{0}".format(context_id)

resp = self._request(DELETE, endpoint, api_version=API_VER_V2)
return resp

def get_context_envvars(self, context_id, paginate=False, limit=None):
"""Get environment variables for a context
"""Get environment variables for a context.
:param context_id: ID of context to retrieve environment variables from
:param context_id: ID of context to retrieve environment variables from.
:param paginate: If True, repeatedly requests more items from the endpoint until the limit has been reached (or until all results have been fetched). Defaults to False..
:param limit: Maximum number of items to return. By default returns all the results from multiple calls to the endpoint, or all the results from a single call to the endpoint, depending on the value for ``paginate``.
Endpoint:
GET ``/v2/context/:context_id/environment-variable``
GET ``/v2/context/:context-id/environment-variable``
"""
endpoint = "context/{0}/environment-variable".format(context_id)

Expand All @@ -849,7 +849,7 @@ def add_context_envvar(self, context_id, name, value):
:param value: Value of the environment variable.
Endpoint:
PUT: ``/context/:context-id/environment-variable/:name``
PUT ``/context/:context-id/environment-variable/:name``
"""
data = {"value": value}
endpoint = "context/{0}/environment-variable/{1}".format(context_id, name)
Expand All @@ -864,7 +864,7 @@ def delete_context_envvar(self, context_id, name):
:param name: Name of the environment variable.
Endpoint:
DELETE: ``/context/:context-id/environment-variable/:name``
DELETE ``/context/:context-id/environment-variable/:name``
"""
endpoint = "context/{0}/environment-variable/{1}".format(context_id, name)

Expand Down Expand Up @@ -1031,7 +1031,7 @@ def split_slug(self, slug):
:param slug: Project slug.
Returns: tuple ``(:vcs_type, :username, :reponame)``
Returns: tuple ``(:vcs-type, :username, :reponame)``
"""
parts = slug.split("/")
if len(parts) != 3:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup

VERSION = "0.4.0"
VERSION = "0.4.1"

with open("README.md", "r") as f:
long_description = f.read()
Expand Down

0 comments on commit f48f69a

Please sign in to comment.