-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update v3 to v3.2.3 + Add important message to README.md
- Loading branch information
Showing
54 changed files
with
673 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.2.2 | ||
3.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
from .gen.allocations import _Allocations | ||
|
||
class Allocations(_Allocations): | ||
"""Allocations resource""" | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# coding=utf-8 | ||
class _Allocations: | ||
|
||
def __init__(self, client=None): | ||
self.client = client | ||
|
||
def create_allocation(self, params=None, **options): | ||
"""Create an allocation | ||
:param Object params: Parameters for the request | ||
:param **options | ||
- opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. | ||
- 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 = "/allocations" | ||
return self.client.post(path, params, **options) | ||
|
||
def delete_allocation(self, allocation_gid, params=None, **options): | ||
"""Delete an allocation | ||
:param str allocation_gid: (required) Globally unique identifier for the allocation. | ||
: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 = "/allocations/{allocation_gid}".replace("{allocation_gid}", allocation_gid) | ||
return self.client.delete(path, params, **options) | ||
|
||
def get_allocation(self, allocation_gid, params=None, **options): | ||
"""Get an allocation | ||
:param str allocation_gid: (required) Globally unique identifier for the allocation. | ||
:param Object params: Parameters for the request | ||
:param **options | ||
- opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. | ||
- 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 = "/allocations/{allocation_gid}".replace("{allocation_gid}", allocation_gid) | ||
return self.client.get(path, params, **options) | ||
|
||
def get_allocations(self, params=None, **options): | ||
"""Get multiple allocations | ||
:param Object params: Parameters for the request | ||
- parent {str}: Globally unique identifier for the project to filter allocations by. | ||
- assignee {str}: Globally unique identifier for the user the allocation is assigned to. | ||
- workspace {str}: 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]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. | ||
- 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 = "/allocations" | ||
return self.client.get_collection(path, params, **options) | ||
|
||
def update_allocation(self, allocation_gid, params=None, **options): | ||
"""Update an allocation | ||
:param str allocation_gid: (required) Globally unique identifier for the allocation. | ||
:param Object params: Parameters for the request | ||
:param **options | ||
- opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. | ||
- 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 = "/allocations/{allocation_gid}".replace("{allocation_gid}", allocation_gid) | ||
return self.client.put(path, params, **options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.