Skip to content

Commit 9f3f07f

Browse files
gasabrLev Rubel
authored andcommitted
Update api 1.12 (#49)
* Updating to 0.1.4 Changes: - default create_on{ha,junk} fixed according to API - added licence type to the create method of sources - added old_password argument to password chagnge method * Fixing tests * Removed deprecated entries module * Removed tests of entries * Updated changelogˆ * Doing version the right way * Bump version: 0.1.3 → 0.1.4 * Removed Python 3.4 support * Added licence choices Changes: - kinda enum class that encapsulates all available licences * Fixing licences types * Removing entries from examples and client * Removing entries from docs * Revert "Removing entries from examples and client" This reverts commit 87f98a1 * Revert "Removed deprecated entries module" This reverts commit 43b8795 * Removed records * Returning entries docs * Bump version: 0.1.4 → 0.1.5 * Returning entries in client * Revert "Removed deprecated entries module" This reverts commit 43b8795 * Removed docs for records * Revert "Removing entries from docs" This reverts commit 5fe7db5
1 parent 259e4b4 commit 9f3f07f

File tree

14 files changed

+55
-101
lines changed

14 files changed

+55
-101
lines changed

HISTORY.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
History
22
=================
33

4+
0.1.5 (2019-07-01)
5+
------------------
6+
7+
* Returned entries module
8+
* Removed records module
9+
410
0.1.4 (2019-06-20)
511
------------------
612

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
identixone.api.records package
1+
identixone.api.entries package
22
==============================
33

44
Subpackages
55
-----------
66

77
.. toctree::
88

9-
identixone.api.records.v1
9+
identixone.api.entries.v1
1010

1111
Module contents
1212
---------------
1313

14-
.. automodule:: identixone.api.records
14+
.. automodule:: identixone.api.entries
1515
:members:
1616
:undoc-members:
1717
:show-inheritance:
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
identixone.api.records.v1 package
1+
identixone.api.entries.v1 package
22
=================================
33

44
Submodules
55
----------
66

7-
identixone.api.records.v1.records module
7+
identixone.api.entries.v1.entries module
88
----------------------------------------
99

10-
.. automodule:: identixone.api.records.v1.records
10+
.. automodule:: identixone.api.entries.v1.entries
1111
:members:
1212
:undoc-members:
1313
:show-inheritance:
@@ -16,7 +16,7 @@ identixone.api.records.v1.records module
1616
Module contents
1717
---------------
1818

19-
.. automodule:: identixone.api.records.v1
19+
.. automodule:: identixone.api.entries.v1
2020
:members:
2121
:undoc-members:
2222
:show-inheritance:

examples.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,6 @@
99
client = Client(token=token, version=1)
1010

1111

12-
def list_records():
13-
# DEPRECATED
14-
period_start = datetime.datetime(year=2019, month=1, day=13, hour=19,
15-
minute=20, second=1)
16-
period_end = datetime.datetime(year=2019, month=1, day=22, hour=19,
17-
minute=20, second=1)
18-
r = client.records.list(new=True, nm=False, junk=False, exact=False,
19-
ha=False, det=False, period_start=period_start,
20-
period_end=period_end)
21-
print(r.json())
22-
23-
2412
def sources_list():
2513
r = client.sources.list()
2614
print(r.json())
@@ -133,20 +121,6 @@ def bulk_delete_temporary_tokens():
133121
print(r.status_code)
134122

135123

136-
def idxid_records():
137-
# DEPRECATED
138-
idxid = 'idxid'
139-
r = client.records.get(idxid=idxid)
140-
print(r.json())
141-
142-
143-
def entry_delete():
144-
# DEPRECATED
145-
entry_id = 1
146-
r = client.records.entry_delete(entry_id)
147-
print(r.status_code)
148-
149-
150124
def auth_create_token():
151125
r = client.auth.create_token()
152126
print(r.json())

identixone/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
__author__ = """Identix One"""
44
__email__ = '[email protected]'
5-
__version__ = '0.1.4'
5+
__version__ = '0.1.5'

identixone/api/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ def persons(self):
8989
return cls(self.http_client)
9090

9191
@property
92-
def records(self):
93-
cls = self.dynamic_import('identixone.api.records', 'Records')
92+
def sources(self):
93+
cls = self.dynamic_import('identixone.api.sources', 'Sources')
9494
return cls(self.http_client)
9595

9696
@property
97-
def sources(self):
98-
cls = self.dynamic_import('identixone.api.sources', 'Sources')
97+
def entries(self):
98+
cls = self.dynamic_import('identixone.api.entries', 'Entries')
9999
return cls(self.http_client)
100100

101101
@property

identixone/api/entries/v1/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from identixone.api.entries.v1.entries import Entries
2+
3+
__all__ = [Entries]

identixone/api/entries/v1/entries.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class Entries(object):
2+
3+
def __init__(self, http_client):
4+
self.http_client = http_client
5+
6+
def list(self, **kwargs):
7+
return self.http_client.get('v1/entries/', params=kwargs)
8+
9+
def delete(self, id):
10+
return self.http_client.delete('v1/entries/{}/'.format(id))
11+
12+
def stats_idxid(self, idxid):
13+
return self.http_client.get('v1/entries/stats/idxid/{}/'.format(idxid))
14+
15+
def stats_sources(self, **kwargs):
16+
return self.http_client.get('v1/entries/stats/sources/', params=kwargs)

identixone/api/records/v1/__init__.py

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

0 commit comments

Comments
 (0)