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

CloseBoardAction.run()   A

Complexity

Conditions 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 2
dl 0
loc 8
rs 9.4286
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