gotipy/README.md
benjamyn 01fdbc4d31 Updated README.md with a new layout
Fixed name of function to better fit the standard (addClient -> createClient)
2018-11-11 20:29:31 +11:00

176 lines
3.4 KiB
Markdown

<h2>API Wrapper for gotify RESTAPI for python3</h2>
<b><a href="https://github.com/gotify/server"> Gotify server</a></b>
Initialize the wrapper with the token you want to use
i.e: gotipy_usr = gotipy.gotipy("user token", "https://URL.TLD")
<h3><b>applications class</b></h3>
<table style="width:100%">
<tr>
<th>Function</th>
<th>Arguments</th>
<th>Return</th>
</tr>
<tr>
<td>getApplications</td>
<td>N/A</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>createApplication</td>
<td>Name, Description</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>deleteApplication</td>
<td>Application ID</td>
<td>HTTP resopnse code</td>
</tr>
<tr>
<td>updateApplicationImage</td>
<td>Application ID, Image Data</td>
<td>HTTP response code</td>
</tr>
</table>
<h3><b>clients class</b></h3>
<table style="width:100%">
<tr>
<th>Function</th>
<th>Arguments</th>
<th>Return</th>
</tr>
<tr>
<td>getClients</td>
<td>N/A</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>createClient</td>
<td>Name</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>deleteClient</td>
<td>Client ID</td>
<td>HTTP response code</td>
</tr>
</table>
<h3><b>msgManager class</b></h3>
<table style="width:100%">
<tr>
<th>Function</th>
<th>Arguments</th>
<th>Return</th>
</tr>
<tr>
<td>getMessagesByApp</td>
<td>Application ID</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>deleteAllMessagesFromApp</td>
<td>Application ID</td>
<td>HTTP response code</td>
</tr>
<tr>
<td>getAllMesages</td>
<td>N/A</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>deleteAllMessages</td>
<td>N/A</td>
<td>HTTP response code</td>
</tr>
<tr>
<td>deleteMessagesByID</td>
<td>Message ID</td>
<td>HTTP response code</td>
</tr>
<tr>
<td>getStream</td>
<td>N/A</td>
<td>JSON formatted list</td>
</tr>
</table>
<h3><b>messages class</b></h3>
<table style="width:100%">
<tr>
<th>Function</th>
<th>Arguments</th>
<th>Return</th>
</tr>
<tr>
<td>sendMessage</td>
<td>Title, Message</td>
<td>JSON formatted list</td>
</tr>
</table>
<h3><b>users class</b></h3>
<table style="width:100%">
<tr>
<th>Function</th>
<th>Arguments</th>
<th>Return</th>
</tr>
<tr>
<td>getCurrentUser()</td>
<td>N/A</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>changeUserPassword</td>
<td>Password</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>getUsers</td>
<td>N/A</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>createUser</td>
<td>Admin, Username, Password</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>getUserByID</td>
<td>User ID</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>updateUserByID</td>
<td>User ID, Admin, Username, Password</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>deleteUserByID</td>
<td>User ID</td>
<td>HTTP response code</td>
</tr>
</table>
<h3><b>utils class</b></h3>
<table style="width:100%">
<tr>
<th>Function</th>
<th>Arguments</th>
<th>Return</th>
</tr>
<tr>
<td>getVersion</td>
<td>N/A</td>
<td>JSON formatted list</td>
</tr>
<tr>
<td>basicAuth</td>
<td>Username, password</td>
<td>JSON formatted list</td>
</tr>
</table>