diff --git a/README.md b/README.md
index 34321ff..badd8f5 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ Initialize the wrapper with the token you want to use
i.e: gotipy_usr = gotipy.gotipy("user token", "https://URL.TLD")
-applications class
+
applications class
| Function |
@@ -20,7 +20,7 @@ i.e: gotipy_usr = gotipy.gotipy("user token", "https://URL.TLD")
| createApplication |
- name, description |
+ Name, Description |
JSON formatted list |
@@ -35,73 +35,142 @@ i.e: gotipy_usr = gotipy.gotipy("user token", "https://URL.TLD")
-Functions Implimented
+clients class
+
+
+ | Function |
+ Arguments |
+ Return |
+
+
+ | getClients |
+ N/A |
+ JSON formatted list |
+
+
+ | createClient |
+ Name |
+ JSON formatted list |
+
+
+ | deleteClient |
+ Client ID |
+ HTTP response code |
+
+
-- basicAuth(user, passwd)
-Sets up basic Auth for inclusion in the header
+msgManager class
+
+
+ | Function |
+ Arguments |
+ Return |
+
+
+ | getMessagesByApp |
+ Application ID |
+ JSON formatted list |
+
+
+ | deleteAllMessagesFromApp |
+ Application ID |
+ HTTP response code |
+
+
+ | getAllMesages |
+ N/A |
+ JSON formatted list |
+
+
+ | deleteAllMessages |
+ N/A |
+ HTTP response code |
+
+
+ | deleteMessagesByID |
+ Message ID |
+ HTTP response code |
+
+
+ | getStream |
+ N/A |
+ JSON formatted list |
+
+
-- getApplications()
-Returns a JSON formatted list of applications
+messages class
+
+
+ | Function |
+ Arguments |
+ Return |
+
+
+ | sendMessage |
+ Title, Message |
+ JSON formatted list |
+
+
-- createApplication(name, description)
-Creates an application with defined name and description
+users class
+
+
+ | Function |
+ Arguments |
+ Return |
+
+
+ | getCurrentUser() |
+ N/A |
+ JSON formatted list |
+
+
+ | changeUserPassword |
+ Password |
+ JSON formatted list |
+
+
+ | getUsers |
+ N/A |
+ JSON formatted list |
+
+
+ | createUser |
+ Admin, Username, Password |
+ JSON formatted list |
+
+
+ | getUserByID |
+ User ID |
+ JSON formatted list |
+
+
+ | updateUserByID |
+ User ID, Admin, Username, Password |
+ JSON formatted list |
+
+
+ | deleteUserByID |
+ User ID |
+ HTTP response code |
+
+
-- deleteApplication(appid)
-Delete Application via appid
-
-- updateApplicationImage(appid, imgData)
-Updates the application image
-
-- getClients()
-Returns a JSON formatted list of Clients
-
-- addClient(name)
-Creates a new client with name
-
-- deleteClient(clientid)
-Delete clients via clientID
-
-- getMessagesByApp(appid)
-Returns a JSON formatted list of messages in an application
-
-- deleteAllMessagesFromApp(appid)
-Deletes all messages in an application
-
-- getAllMessages()
-Returns a JSON formatted list of all messages
-
-- sendMessage(title, message)
-Sends a message using an application auth token (Note this is the only function that requires an application token)
-
-- deleteAllMessages()
-Deletes all messages
-
-- deleteMessageByID(msgid)
-Delete a message by its ID
-
-- getStream() ## Currently broken, returns 400 error, no idea why
-This should return all new messages but it doesn't, also broken when testing with the docs so #nfi
-
-- getCurrentUser()
-Returns a JSON formatted list of information for the current user
-
-- changeUserPassword(passwd)
-Changes the password of the current account
-
-- getUsers()
-Returns a JSON formatted list of users
-
-- createUser(isAdmin, username, password)
-Creates a new user with the specified details (isAdmin: boolean value)
-
-- getUserByID(userID)
-Returns a JSON formatted list of the selected user
-
-- updateUserByID(userID, isAdmin, username, password) ## I really do not like this implementation will look into a better way
-Updates the user information by ID, need to pass an entire user data object currently, working on a better way
-
-- deleteUserByID(userID)
-Deletes user by ID
-
-- getVersion()
-Returns the version of gotify running on the server
\ No newline at end of file
+utils class
+
+
+ | Function |
+ Arguments |
+ Return |
+
+
+ | getVersion |
+ N/A |
+ JSON formatted list |
+
+
+ | basicAuth |
+ Username, password |
+ JSON formatted list |
+
+
\ No newline at end of file
diff --git a/gotipy.py b/gotipy.py
index 9fb37eb..a610367 100644
--- a/gotipy.py
+++ b/gotipy.py
@@ -62,7 +62,7 @@ class gotipy(object):
req = requests.get(self.requrl, headers=self.headers)
return req
- def addClient(self, name):
+ def createClient(self, name):
self.name = name
self.requrl = self.url + '/client'
data = {"name": self.name}
@@ -71,7 +71,6 @@ class gotipy(object):
req = requests.post(self.requrl, headers=self.headers, json=data)
return req
- def deleteClient(self, clientid):
self.clientid = clientid
self.requrl = self.url + '/client/' + str(self.clientid)
@@ -235,4 +234,4 @@ class gotipy(object):
print(self.string.encode('utf-8'))
self.headers["authorization"] = "Basic " + base64.b64encode(self.string)
print(self.encoded)
- return self.headers
\ No newline at end of file
+ return self.headers