Skip to content

Commit

Permalink
Issue ucsschool-kelvin-rest-api#83: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos García-Mauriño committed Apr 20, 2023
1 parent 2d7c29b commit a01264d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/usage-role.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,20 @@ Retrieve role
'url': 'https://master.ucs.local/ucsschool/kelvin/v1/roles/student'}
Check if role exists
--------------------

.. code-block:: python
from ucsschool.kelvin.client import Session, RoleResource
async with Session(**credentials) as session:
if await RoleResource(session=session).exists(name="student"):
print("The role 'student' exists!")
Note: This method only works with Kelvin server version 1.8.8 or newer.


Search roles
------------

Expand Down

0 comments on commit a01264d

Please sign in to comment.