diff --git a/pydactyl/api/nodes.py b/pydactyl/api/nodes.py index 70476b2..114a6f1 100644 --- a/pydactyl/api/nodes.py +++ b/pydactyl/api/nodes.py @@ -19,6 +19,16 @@ def list_nodes(self, include=None): response = self._api_request(endpoint=endpoint, params=params) return PaginatedResponse(self, endpoint, response) + def get_node_config(self, node_id): + """Get the Wings configuration for the specified node. + + Args: + node_id(int): Pterodactyl Node ID. + """ + response = self._api_request( + endpoint='application/nodes/{}/configuration'.format(node_id)) + return response + def get_node_details(self, node_id): """Get detailed info for the specified node. diff --git a/tests/application/nodes_test.py b/tests/application/nodes_test.py index 59f2e6c..fc7a465 100644 --- a/tests/application/nodes_test.py +++ b/tests/application/nodes_test.py @@ -34,6 +34,14 @@ def test_get_node_details(self, mock_api): self.client.nodes.get_node_details(11) mock_api.assert_called_with(**expected) + @mock.patch('pydactyl.api.base.PterodactylAPI._api_request') + def test_get_node_config(self, mock_api): + expected = { + 'endpoint': 'application/nodes/111/configuration', + } + self.client.nodes.get_node_config(111) + mock_api.assert_called_with(**expected) + @mock.patch('pydactyl.api.base.PterodactylAPI._api_request') def test_create_node(self, mock_api): expected_data = {