Skip to content

Commit 00c3bef

Browse files
Spec updates
1 parent 507e9c2 commit 00c3bef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2421
-2337
lines changed

.gitignore

Lines changed: 0 additions & 64 deletions
This file was deleted.

README.md

Lines changed: 71 additions & 70 deletions
Large diffs are not rendered by default.

TelstraTPN/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
from __future__ import absolute_import
1717

18+
__version__ = "1.0.4"
19+
1820
# import apis into sdk package
1921
from TelstraTPN.api.authentication_api import AuthenticationApi
2022
from TelstraTPN.api.contracts_api import ContractsApi
@@ -85,9 +87,9 @@
8587
from TelstraTPN.models.inline_response202 import InlineResponse202
8688
from TelstraTPN.models.inline_response202_errormsg import InlineResponse202Errormsg
8789
from TelstraTPN.models.inline_response401 import InlineResponse401
88-
from TelstraTPN.models.inventorylinksstatsflowlinkidstartdateenddate_tags import InventorylinksstatsflowlinkidstartdateenddateTags
8990
from TelstraTPN.models.link import Link
9091
from TelstraTPN.models.meta import Meta
92+
from TelstraTPN.models.model100inventorylinksstatsflowlinkidstartdateenddate_tags import Model100inventorylinksstatsflowlinkidstartdateenddateTags
9193
from TelstraTPN.models.pop import Pop
9294
from TelstraTPN.models.rebootrequest import Rebootrequest
9395
from TelstraTPN.models.regendpointrequest import Regendpointrequest

TelstraTPN/api/authentication_api.py

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ def __init__(self, api_client=None):
3333
api_client = ApiClient()
3434
self.api_client = api_client
3535

36-
def auth_generatetoken_post(self, grant_type, username, password, **kwargs): # noqa: E501
36+
def generate_token(self, grant_type, username, password, **kwargs): # noqa: E501
3737
"""Create an authentication token # noqa: E501
3838
3939
This method makes a synchronous HTTP request by default. To make an
4040
asynchronous HTTP request, please pass async=True
41-
>>> thread = api.auth_generatetoken_post(grant_type, username, password, async=True)
41+
>>> thread = api.generate_token(grant_type, username, password, async=True)
4242
>>> result = thread.get()
4343
4444
:param async bool
@@ -51,17 +51,17 @@ def auth_generatetoken_post(self, grant_type, username, password, **kwargs): #
5151
"""
5252
kwargs['_return_http_data_only'] = True
5353
if kwargs.get('async'):
54-
return self.auth_generatetoken_post_with_http_info(grant_type, username, password, **kwargs) # noqa: E501
54+
return self.generate_token_with_http_info(grant_type, username, password, **kwargs) # noqa: E501
5555
else:
56-
(data) = self.auth_generatetoken_post_with_http_info(grant_type, username, password, **kwargs) # noqa: E501
56+
(data) = self.generate_token_with_http_info(grant_type, username, password, **kwargs) # noqa: E501
5757
return data
5858

59-
def auth_generatetoken_post_with_http_info(self, grant_type, username, password, **kwargs): # noqa: E501
59+
def generate_token_with_http_info(self, grant_type, username, password, **kwargs): # noqa: E501
6060
"""Create an authentication token # noqa: E501
6161
6262
This method makes a synchronous HTTP request by default. To make an
6363
asynchronous HTTP request, please pass async=True
64-
>>> thread = api.auth_generatetoken_post_with_http_info(grant_type, username, password, async=True)
64+
>>> thread = api.generate_token_with_http_info(grant_type, username, password, async=True)
6565
>>> result = thread.get()
6666
6767
:param async bool
@@ -73,33 +73,34 @@ def auth_generatetoken_post_with_http_info(self, grant_type, username, password,
7373
returns the request thread.
7474
"""
7575

76+
local_var_params = locals()
77+
7678
all_params = ['grant_type', 'username', 'password'] # noqa: E501
7779
all_params.append('async')
7880
all_params.append('_return_http_data_only')
7981
all_params.append('_preload_content')
8082
all_params.append('_request_timeout')
8183

82-
params = locals()
83-
for key, val in six.iteritems(params['kwargs']):
84+
for key, val in six.iteritems(local_var_params['kwargs']):
8485
if key not in all_params:
8586
raise TypeError(
8687
"Got an unexpected keyword argument '%s'"
87-
" to method auth_generatetoken_post" % key
88+
" to method generate_token" % key
8889
)
89-
params[key] = val
90-
del params['kwargs']
90+
local_var_params[key] = val
91+
del local_var_params['kwargs']
9192
# verify the required parameter 'grant_type' is set
92-
if ('grant_type' not in params or
93-
params['grant_type'] is None):
94-
raise ValueError("Missing the required parameter `grant_type` when calling `auth_generatetoken_post`") # noqa: E501
93+
if ('grant_type' not in local_var_params or
94+
local_var_params['grant_type'] is None):
95+
raise ValueError("Missing the required parameter `grant_type` when calling `generate_token`") # noqa: E501
9596
# verify the required parameter 'username' is set
96-
if ('username' not in params or
97-
params['username'] is None):
98-
raise ValueError("Missing the required parameter `username` when calling `auth_generatetoken_post`") # noqa: E501
97+
if ('username' not in local_var_params or
98+
local_var_params['username'] is None):
99+
raise ValueError("Missing the required parameter `username` when calling `generate_token`") # noqa: E501
99100
# verify the required parameter 'password' is set
100-
if ('password' not in params or
101-
params['password'] is None):
102-
raise ValueError("Missing the required parameter `password` when calling `auth_generatetoken_post`") # noqa: E501
101+
if ('password' not in local_var_params or
102+
local_var_params['password'] is None):
103+
raise ValueError("Missing the required parameter `password` when calling `generate_token`") # noqa: E501
103104

104105
collection_formats = {}
105106

@@ -111,12 +112,12 @@ def auth_generatetoken_post_with_http_info(self, grant_type, username, password,
111112

112113
form_params = []
113114
local_var_files = {}
114-
if 'grant_type' in params:
115-
form_params.append(('grant_type', params['grant_type'])) # noqa: E501
116-
if 'username' in params:
117-
form_params.append(('username', params['username'])) # noqa: E501
118-
if 'password' in params:
119-
form_params.append(('password', params['password'])) # noqa: E501
115+
if 'grant_type' in local_var_params:
116+
form_params.append(('grant_type', local_var_params['grant_type'])) # noqa: E501
117+
if 'username' in local_var_params:
118+
form_params.append(('username', local_var_params['username'])) # noqa: E501
119+
if 'password' in local_var_params:
120+
form_params.append(('password', local_var_params['password'])) # noqa: E501
120121

121122
body_params = None
122123
# HTTP header `Accept`
@@ -131,7 +132,7 @@ def auth_generatetoken_post_with_http_info(self, grant_type, username, password,
131132
auth_settings = [] # noqa: E501
132133

133134
return self.api_client.call_api(
134-
'/auth/generatetoken/', 'POST',
135+
'/1.0.0/auth/generatetoken', 'POST',
135136
path_params,
136137
query_params,
137138
header_params,
@@ -140,19 +141,19 @@ def auth_generatetoken_post_with_http_info(self, grant_type, username, password,
140141
files=local_var_files,
141142
response_type='InlineResponse20015', # noqa: E501
142143
auth_settings=auth_settings,
143-
async=params.get('async'),
144-
_return_http_data_only=params.get('_return_http_data_only'),
145-
_preload_content=params.get('_preload_content', True),
146-
_request_timeout=params.get('_request_timeout'),
144+
async=local_var_params.get('async'),
145+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
146+
_preload_content=local_var_params.get('_preload_content', True),
147+
_request_timeout=local_var_params.get('_request_timeout'),
147148
collection_formats=collection_formats)
148149

149-
def auth_validatetoken_get(self, **kwargs): # noqa: E501
150+
def validate_token(self, **kwargs): # noqa: E501
150151
"""Validate authentication token # noqa: E501
151152
152153
Validate the authentication token and get information about the user (roles, permissions, etc.) # noqa: E501
153154
This method makes a synchronous HTTP request by default. To make an
154155
asynchronous HTTP request, please pass async=True
155-
>>> thread = api.auth_validatetoken_get(async=True)
156+
>>> thread = api.validate_token(async=True)
156157
>>> result = thread.get()
157158
158159
:param async bool
@@ -162,18 +163,18 @@ def auth_validatetoken_get(self, **kwargs): # noqa: E501
162163
"""
163164
kwargs['_return_http_data_only'] = True
164165
if kwargs.get('async'):
165-
return self.auth_validatetoken_get_with_http_info(**kwargs) # noqa: E501
166+
return self.validate_token_with_http_info(**kwargs) # noqa: E501
166167
else:
167-
(data) = self.auth_validatetoken_get_with_http_info(**kwargs) # noqa: E501
168+
(data) = self.validate_token_with_http_info(**kwargs) # noqa: E501
168169
return data
169170

170-
def auth_validatetoken_get_with_http_info(self, **kwargs): # noqa: E501
171+
def validate_token_with_http_info(self, **kwargs): # noqa: E501
171172
"""Validate authentication token # noqa: E501
172173
173174
Validate the authentication token and get information about the user (roles, permissions, etc.) # noqa: E501
174175
This method makes a synchronous HTTP request by default. To make an
175176
asynchronous HTTP request, please pass async=True
176-
>>> thread = api.auth_validatetoken_get_with_http_info(async=True)
177+
>>> thread = api.validate_token_with_http_info(async=True)
177178
>>> result = thread.get()
178179
179180
:param async bool
@@ -182,21 +183,22 @@ def auth_validatetoken_get_with_http_info(self, **kwargs): # noqa: E501
182183
returns the request thread.
183184
"""
184185

186+
local_var_params = locals()
187+
185188
all_params = [] # noqa: E501
186189
all_params.append('async')
187190
all_params.append('_return_http_data_only')
188191
all_params.append('_preload_content')
189192
all_params.append('_request_timeout')
190193

191-
params = locals()
192-
for key, val in six.iteritems(params['kwargs']):
194+
for key, val in six.iteritems(local_var_params['kwargs']):
193195
if key not in all_params:
194196
raise TypeError(
195197
"Got an unexpected keyword argument '%s'"
196-
" to method auth_validatetoken_get" % key
198+
" to method validate_token" % key
197199
)
198-
params[key] = val
199-
del params['kwargs']
200+
local_var_params[key] = val
201+
del local_var_params['kwargs']
200202

201203
collection_formats = {}
202204

@@ -218,7 +220,7 @@ def auth_validatetoken_get_with_http_info(self, **kwargs): # noqa: E501
218220
auth_settings = ['oAuth2'] # noqa: E501
219221

220222
return self.api_client.call_api(
221-
'/auth/validatetoken/', 'GET',
223+
'/1.0.0/auth/validatetoken', 'GET',
222224
path_params,
223225
query_params,
224226
header_params,
@@ -227,8 +229,8 @@ def auth_validatetoken_get_with_http_info(self, **kwargs): # noqa: E501
227229
files=local_var_files,
228230
response_type='InlineResponse20016', # noqa: E501
229231
auth_settings=auth_settings,
230-
async=params.get('async'),
231-
_return_http_data_only=params.get('_return_http_data_only'),
232-
_preload_content=params.get('_preload_content', True),
233-
_request_timeout=params.get('_request_timeout'),
232+
async=local_var_params.get('async'),
233+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
234+
_preload_content=local_var_params.get('_preload_content', True),
235+
_request_timeout=local_var_params.get('_request_timeout'),
234236
collection_formats=collection_formats)

0 commit comments

Comments
 (0)