neris-api-client 1.4.0__tar.gz → 1.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {neris_api_client-1.4.0/src/neris_api_client.egg-info → neris_api_client-1.5.0}/PKG-INFO +1 -1
- {neris_api_client-1.4.0 → neris_api_client-1.5.0}/pyproject.toml +1 -1
- {neris_api_client-1.4.0 → neris_api_client-1.5.0}/src/neris_api_client/client.py +35 -0
- {neris_api_client-1.4.0 → neris_api_client-1.5.0/src/neris_api_client.egg-info}/PKG-INFO +1 -1
- {neris_api_client-1.4.0 → neris_api_client-1.5.0}/LICENSE +0 -0
- {neris_api_client-1.4.0 → neris_api_client-1.5.0}/README.md +0 -0
- {neris_api_client-1.4.0 → neris_api_client-1.5.0}/setup.cfg +0 -0
- {neris_api_client-1.4.0 → neris_api_client-1.5.0}/src/neris_api_client/__init__.py +0 -0
- {neris_api_client-1.4.0 → neris_api_client-1.5.0}/src/neris_api_client/config.py +0 -0
- {neris_api_client-1.4.0 → neris_api_client-1.5.0}/src/neris_api_client/models.py +0 -0
- {neris_api_client-1.4.0 → neris_api_client-1.5.0}/src/neris_api_client.egg-info/SOURCES.txt +0 -0
- {neris_api_client-1.4.0 → neris_api_client-1.5.0}/src/neris_api_client.egg-info/dependency_links.txt +0 -0
- {neris_api_client-1.4.0 → neris_api_client-1.5.0}/src/neris_api_client.egg-info/requires.txt +0 -0
- {neris_api_client-1.4.0 → neris_api_client-1.5.0}/src/neris_api_client.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: neris_api_client
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: NERIS API Client
|
|
5
5
|
Author-email: Ben Coleman <ben.coleman@ul.org>, Tommy Messbauer <thomas.messbauer@ul.org>, Joseph Pagani <joseph.pagani@ul.org>
|
|
6
6
|
Project-URL: Homepage, https://github.com/ulfsri/neris-api-client
|
|
@@ -11,6 +11,10 @@ from pydantic import BaseModel
|
|
|
11
11
|
from .config import Config, GrantType, TokenSet
|
|
12
12
|
|
|
13
13
|
from .models import (
|
|
14
|
+
DeptSortBy,
|
|
15
|
+
StatesTerrs,
|
|
16
|
+
SortDirection,
|
|
17
|
+
TypeEntityValue,
|
|
14
18
|
IncidentPayload,
|
|
15
19
|
PatchUnitPayload,
|
|
16
20
|
CreateUnitPayload,
|
|
@@ -228,6 +232,37 @@ class NerisApiClient(_NerisApiClient):
|
|
|
228
232
|
def get_entity(self, neris_id: str) -> Dict[str, Any]:
|
|
229
233
|
return self._call("get", f"/entity/{neris_id}")
|
|
230
234
|
|
|
235
|
+
def list_entities(
|
|
236
|
+
self,
|
|
237
|
+
name: str | None = None,
|
|
238
|
+
neris_id: str | None = None,
|
|
239
|
+
state: StatesTerrs | None = None,
|
|
240
|
+
entity_subtype: TypeEntityValue | None = None,
|
|
241
|
+
last_modified: str | None = None,
|
|
242
|
+
page_number: int | None = None,
|
|
243
|
+
page_size: int | None = None,
|
|
244
|
+
sort_by: DeptSortBy | None = None,
|
|
245
|
+
sort_direction: SortDirection | None = None,
|
|
246
|
+
) -> Dict[str, Any]:
|
|
247
|
+
params = dict(
|
|
248
|
+
name=name,
|
|
249
|
+
neris_id=neris_id,
|
|
250
|
+
state=state,
|
|
251
|
+
entity_subtype=entity_subtype,
|
|
252
|
+
last_modified=last_modified,
|
|
253
|
+
page_number=page_number,
|
|
254
|
+
page_size=page_size,
|
|
255
|
+
sort_by=sort_by,
|
|
256
|
+
sort_direction=sort_direction,
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
# delete null params
|
|
260
|
+
for k in list(params.keys()):
|
|
261
|
+
if params[k] is None:
|
|
262
|
+
del params[k]
|
|
263
|
+
|
|
264
|
+
return self._call("get", "/entity", params=params)
|
|
265
|
+
|
|
231
266
|
def create_entity(self, body: str | Dict[str, Any]) -> Dict[str, Any]:
|
|
232
267
|
return self._call("post", "/entity/", body, model=CreateDepartmentPayload)
|
|
233
268
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: neris_api_client
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: NERIS API Client
|
|
5
5
|
Author-email: Ben Coleman <ben.coleman@ul.org>, Tommy Messbauer <thomas.messbauer@ul.org>, Joseph Pagani <joseph.pagani@ul.org>
|
|
6
6
|
Project-URL: Homepage, https://github.com/ulfsri/neris-api-client
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{neris_api_client-1.4.0 → neris_api_client-1.5.0}/src/neris_api_client.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{neris_api_client-1.4.0 → neris_api_client-1.5.0}/src/neris_api_client.egg-info/requires.txt
RENAMED
|
File without changes
|
{neris_api_client-1.4.0 → neris_api_client-1.5.0}/src/neris_api_client.egg-info/top_level.txt
RENAMED
|
File without changes
|