Completed
Push — master ( e847a5...5b0cc0 )
by Matěj
25s queued 10s
created

NextCloud.NextCloud   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 5

1 Method

Rating   Name   Duplication   Size   Complexity  
A NextCloud.__init__() 0 12 5
1
from .requester import Requester
2
from .api_wrappers import API_CLASSES
3
4
5
class NextCloud(object):
6
7
    def __init__(self, endpoint, user, password, json_output=True):
8
        self.query_components = []
9
10
        requester = Requester(endpoint, user, password, json_output)
11
12
        self.functionality_classes = [api_class(requester) for api_class in API_CLASSES]
13
14
        for functionality_class in self.functionality_classes:
15
            for potential_method in dir(functionality_class):
16
                if potential_method.startswith('_') or not callable(getattr(functionality_class, potential_method)):
17
                    continue
18
                setattr(self, potential_method, getattr(functionality_class, potential_method))
19