Skip to content

Commit

Permalink
Add the currentuser endpoint
Browse files Browse the repository at this point in the history
Adds the /api/currentuser endpoint, allowing a session to determine information about the active user based on login or api key.
  • Loading branch information
HarkonenBade committed Sep 7, 2021
1 parent 6593ccb commit 117ecb0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions octorest/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,18 @@ def get_version(self):
Retrieve information regarding server and API version
"""
return self._get('/api/version')

##############
### LOGIN ###
##############

def current_user(self):
"""Current User
https://docs.octoprint.org/en/master/api/general.html#current-user
Retrieves information about the current user.
"""
return self._get('/api/currentuser')

###########################
### APPS - SESSION KEYS ###
Expand Down

0 comments on commit 117ecb0

Please sign in to comment.