aboutsummaryrefslogtreecommitdiff
path: root/pyfunkwhale/funkwhale.py
blob: 8f399ab3b4c99d89279984ffcf344f4c25cea3e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python

from pyfunkwhale.client import Client


class Funkwhale(object):

    def __init__(self, client_name, redirect_uri, client_id,
                 client_secret, scopes, username, password, domain,
                 authorization_endpoint, token_endpoint, token_filename):
        self.client = Client(
                client_name, redirect_uri, client_id, client_secret,
                scopes, username, password, domain, authorization_endpoint,
                token_endpoint, token_filename)

    def artists(self):
        return self.client.call('/artists/', 'get').json()