Completed
Pull Request — master (#340)
by Arma
03:46
created

CloseBoardAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %
Metric Value
dl 0
loc 9
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 8 2
1
from lib import action
2
3
4
class ViewOrganizationsAction(action.BaseAction):
5
    def run(self, api_key=None, token=None):
6
        if api_key:
7
            self._set_creds(api_key=api_key, token=token)
8
9
        orgs = {}
10
        for org in self._client.list_organizations():
11
            orgs[org.id] = org.name
12
13
        return orgs
14