aboutsummaryrefslogtreecommitdiff
path: root/pyfunkwhale/funkwhale.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyfunkwhale/funkwhale.py')
-rw-r--r--pyfunkwhale/funkwhale.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/pyfunkwhale/funkwhale.py b/pyfunkwhale/funkwhale.py
index 7d7bc3c..189b9cd 100644
--- a/pyfunkwhale/funkwhale.py
+++ b/pyfunkwhale/funkwhale.py
@@ -33,6 +33,28 @@ class Funkwhale(object):
return params
+ def create_app(self, name: str, redirect_uris: str = None,
+ scopes: str = None):
+ """
+ Register an OAuth application
+
+ Parameters
+ ----------
+ name : str
+ Name of the application
+ redirect_uris : str, optional
+ Uris where the instance will redirect
+ scopes : str, optional
+ Rights of the application on the instance
+ Default value: read
+ """
+
+ arguments = locals()
+
+ datas = self._build_params(arguments)
+
+ return self.client.call('/oauth/apps/', 'post', data=datas).json()
+
def artists(self, q: str = None, ordering: str = None,
playable: bool = None, page: int = None,
page_size: int = None) -> dict: