-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Endpoints now use new model names Added support for void methods (like most DELETE requests) as they have no return type.
- Loading branch information
Showing
1,993 changed files
with
2,409 additions
and
4,893 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
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,35 +1,34 @@ | ||
from typing import Any | ||
|
||
from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint | ||
from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Security import AuthInformation | ||
from pyconnectwise.models.base.message_model import GenericMessageModel | ||
from pyconnectwise.models.automate import AutomateAuthInformation, AutomateTokenResult | ||
from pyconnectwise.responses.paginated_response import PaginatedResponse | ||
|
||
|
||
class ApitokenEndpoint(ConnectWiseEndpoint): | ||
def __init__(self, client, parent_endpoint=None): | ||
super().__init__(client, "Apitoken", parent_endpoint=parent_endpoint) | ||
|
||
def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AuthInformation: | ||
def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AutomateAuthInformation: | ||
""" | ||
Performs a GET request against the /Apitoken endpoint. | ||
Parameters: | ||
data (dict[str, Any]): The data to send in the request body. | ||
params (dict[str, int | str]): The parameters to send in the request query string. | ||
Returns: | ||
AuthInformation: The parsed response data. | ||
AutomateAuthInformation: The parsed response data. | ||
""" | ||
return self._parse_one(AuthInformation, super()._make_request("GET", data=data, params=params).json()) | ||
return self._parse_one(AutomateAuthInformation, super()._make_request("GET", data=data, params=params).json()) | ||
|
||
def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TokenResult: | ||
def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AutomateTokenResult: | ||
""" | ||
Performs a POST request against the /Apitoken endpoint. | ||
Parameters: | ||
data (dict[str, Any]): The data to send in the request body. | ||
params (dict[str, int | str]): The parameters to send in the request query string. | ||
Returns: | ||
TokenResult: The parsed response data. | ||
AutomateTokenResult: The parsed response data. | ||
""" | ||
return self._parse_one(TokenResult, super()._make_request("POST", data=data, params=params).json()) | ||
return self._parse_one(AutomateTokenResult, super()._make_request("POST", data=data, params=params).json()) |
1 change: 0 additions & 1 deletion
1
src/pyconnectwise/endpoints/automate/ApprovalpoliciesEndpoint.py
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
9 changes: 4 additions & 5 deletions
9
src/pyconnectwise/endpoints/automate/AvtemplatepoliciesEndpoint.py
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,23 +1,22 @@ | ||
from typing import Any | ||
|
||
from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint | ||
from pyconnectwise.models.automate.LabTech.Models import AVTemplatePolicy | ||
from pyconnectwise.models.base.message_model import GenericMessageModel | ||
from pyconnectwise.models.automate import LabTechAVTemplatePolicy | ||
from pyconnectwise.responses.paginated_response import PaginatedResponse | ||
|
||
|
||
class AvtemplatepoliciesEndpoint(ConnectWiseEndpoint): | ||
def __init__(self, client, parent_endpoint=None): | ||
super().__init__(client, "Avtemplatepolicies", parent_endpoint=parent_endpoint) | ||
|
||
def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AVTemplatePolicy: | ||
def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LabTechAVTemplatePolicy: | ||
""" | ||
Performs a POST request against the /Avtemplatepolicies endpoint. | ||
Parameters: | ||
data (dict[str, Any]): The data to send in the request body. | ||
params (dict[str, int | str]): The parameters to send in the request query string. | ||
Returns: | ||
AVTemplatePolicy: The parsed response data. | ||
LabTechAVTemplatePolicy: The parsed response data. | ||
""" | ||
return self._parse_one(AVTemplatePolicy, super()._make_request("POST", data=data, params=params).json()) | ||
return self._parse_one(LabTechAVTemplatePolicy, super()._make_request("POST", data=data, params=params).json()) |
11 changes: 6 additions & 5 deletions
11
src/pyconnectwise/endpoints/automate/AvtemplatepolicydataEndpoint.py
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,23 +1,24 @@ | ||
from typing import Any | ||
|
||
from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint | ||
from pyconnectwise.models.automate.LabTech.Models import AVTemplatePolicyData | ||
from pyconnectwise.models.base.message_model import GenericMessageModel | ||
from pyconnectwise.models.automate import LabTechAVTemplatePolicyData | ||
from pyconnectwise.responses.paginated_response import PaginatedResponse | ||
|
||
|
||
class AvtemplatepolicydataEndpoint(ConnectWiseEndpoint): | ||
def __init__(self, client, parent_endpoint=None): | ||
super().__init__(client, "Avtemplatepolicydata", parent_endpoint=parent_endpoint) | ||
|
||
def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AVTemplatePolicyData: | ||
def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LabTechAVTemplatePolicyData: | ||
""" | ||
Performs a POST request against the /Avtemplatepolicydata endpoint. | ||
Parameters: | ||
data (dict[str, Any]): The data to send in the request body. | ||
params (dict[str, int | str]): The parameters to send in the request query string. | ||
Returns: | ||
AVTemplatePolicyData: The parsed response data. | ||
LabTechAVTemplatePolicyData: The parsed response data. | ||
""" | ||
return self._parse_one(AVTemplatePolicyData, super()._make_request("POST", data=data, params=params).json()) | ||
return self._parse_one( | ||
LabTechAVTemplatePolicyData, super()._make_request("POST", data=data, params=params).json() | ||
) |
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
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.