Skip to content

Commit

Permalink
Method renames (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliya Smith committed Apr 16, 2020
1 parent 5d23bcf commit ac1fa7d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
The intended audience of this file is for py42 consumers -- as such, changes that don't affect
how a consumer would use the library (e.g. adding unit tests, updating documentation, etc) are not captured here.

## 0.8.1 - 2020-04-16

### Changed

- `sdk.detectionlists` method renames:
- `create()` -> `create_user()`
- `get()` -> `get_user()`
- `get_by_id()` -> `get_user_by_id()`
- `update_notes()` -> `update_user_notes()`
- `add_risk_tag()` -> `add_user_risk_tags()`
- `remove_risk_tag()` -> `remove_user_risk_tags()`
- `add_cloud_alias()` -> `add_user_cloud_aliases()`
- `remove_cloud_alias()` -> `remove_user_cloud_aliases()`

## 0.8.0 - 2020-04-15

### Added
Expand Down Expand Up @@ -44,7 +58,7 @@ how a consumer would use the library (e.g. adding unit tests, updating documenta
- `py42.sdk.util`. Use `py42.util` instead.
- `py42.sdk.settings`. Use `py42.settings` instead.
- `py42.sdk.response`. Use `py42.response` instead.
- `py42.sdk.usercontext`. Use `py42.usercontext` instead.
- `py42.sdk.usercontext`. Use `py42.usercontext` instead.

## Changed

Expand Down
2 changes: 1 addition & 1 deletion src/py42/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# py42

__version__ = "0.8.0"
__version__ = "0.8.1"
16 changes: 8 additions & 8 deletions src/py42/modules/detectionlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def departing_employee(self):
def high_risk_employee(self):
return self._microservice_client_factory.get_high_risk_employee_client(self._user_client)

def create(self, username):
def create_user(self, username):
"""Create a detection list profile for a user.
Args:
Expand All @@ -26,7 +26,7 @@ def create(self, username):
)
return self._detection_list_user_client.create(username)

def get(self, username):
def get_user(self, username):
"""Get user details by username.
Args:
Expand All @@ -40,7 +40,7 @@ def get(self, username):
)
return self._detection_list_user_client.get(username)

def get_by_id(self, user_id):
def get_user_by_id(self, user_id):
"""Get user details by user_id.
Args:
Expand All @@ -54,7 +54,7 @@ def get_by_id(self, user_id):
)
return self._detection_list_user_client.get_by_id(user_id)

def update_notes(self, user_id, notes):
def update_user_notes(self, user_id, notes):
"""Add or update notes related to the user.
Args:
Expand All @@ -69,7 +69,7 @@ def update_notes(self, user_id, notes):
)
self._detection_list_user_client.update_notes(user_id, notes)

def add_risk_tag(self, user_id, tags):
def add_user_risk_tags(self, user_id, tags):
"""Add one or more tags.
Args:
Expand All @@ -85,7 +85,7 @@ def add_risk_tag(self, user_id, tags):
)
self._detection_list_user_client.add_risk_tags(user_id, tags)

def remove_risk_tag(self, user_id, tags):
def remove_user_risk_tags(self, user_id, tags):
"""Remove one or more tags.
Args:
Expand All @@ -101,7 +101,7 @@ def remove_risk_tag(self, user_id, tags):
)
self._detection_list_user_client.remove_risk_tags(user_id, tags)

def add_cloud_alias(self, user_id, aliases):
def add_user_cloud_aliases(self, user_id, aliases):
"""Add one or more cloud alias.
Args:
Expand All @@ -117,7 +117,7 @@ def add_cloud_alias(self, user_id, aliases):
)
self._detection_list_user_client.add_cloud_aliases(user_id, aliases)

def remove_cloud_alias(self, user_id, aliases):
def remove_user_cloud_aliases(self, user_id, aliases):
"""Remove one or more cloud alias.
Args:
Expand Down

0 comments on commit ac1fa7d

Please sign in to comment.