From ae5924919656e499aae173c29962ba606fe5cd2d Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Sat, 5 Mar 2016 23:18:04 +0100 Subject: [PATCH] Introducing Notifications Currently we make use of the Notification and Activity objects to pull the relevant information. In the future only Notification will be needed. --- pillarsdk/__init__.py | 1 + pillarsdk/activities.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 pillarsdk/activities.py diff --git a/pillarsdk/__init__.py b/pillarsdk/__init__.py index 2bf930e..d6e0aa0 100644 --- a/pillarsdk/__init__.py +++ b/pillarsdk/__init__.py @@ -7,6 +7,7 @@ from .tokens import Token from .groups import Group from .organizations import Organization from .projects import Project +from .activities import Activity, Notification from .binary_files import binaryFile from .exceptions import ResourceNotFound, UnauthorizedAccess, MissingConfig from .config import __version__, __pypi_packagename__ diff --git a/pillarsdk/activities.py b/pillarsdk/activities.py new file mode 100644 index 0000000..5b73dfd --- /dev/null +++ b/pillarsdk/activities.py @@ -0,0 +1,16 @@ +from .resource import List +from .resource import Find +from .resource import Update +from .resource import Create + + +class Activity(List, Find): + """Activities class wrapping the REST activities endpoint + """ + path = "activities" + + +class Notification(List, Find, Update): + """Notifications class wrapping the REST notifications endpoint + """ + path = "notifications"