4
4
from .fio import fio_client
5
5
from .config import column_default
6
6
7
- DEFAULT_COLS = column_default ('accounts' , 'id,owner.email,plan.name,storage,member_count,collaborator_count,inserted_at' )
7
+ DEFAULT_COLS = column_default (
8
+ "accounts" ,
9
+ "id,owner.email,plan.name,storage,member_count,collaborator_count,inserted_at" ,
10
+ )
11
+
8
12
9
13
@click .group ()
10
14
def accounts ():
11
15
"""Account related commands"""
12
16
17
+
13
18
@accounts .command (help = "Fetch a single account" )
14
19
@click .argument ("account_id" )
15
- @click .option (' --format' , type = utils .FormatType (), default = ' table' )
16
- @click .option (' --columns' , type = utils .ListType (), default = DEFAULT_COLS )
20
+ @click .option (" --format" , type = utils .FormatType (), default = " table" )
21
+ @click .option (" --columns" , type = utils .ListType (), default = DEFAULT_COLS )
17
22
def get (account_id , format , columns ):
18
- account = fio_client ()._api_call (' get' , f"/accounts/{ account_id } " )
23
+ account = fio_client ()._api_call (" get" , f"/accounts/{ account_id } " )
19
24
20
25
format (account , cols = columns )
21
26
27
+
22
28
@accounts .command (help = "Lists accounts accessible to the current user" )
23
- @click .option (' --format' , type = utils .FormatType (), default = ' table' )
24
- @click .option (' --columns' , type = utils .ListType (), default = DEFAULT_COLS )
29
+ @click .option (" --format" , type = utils .FormatType (), default = " table" )
30
+ @click .option (" --columns" , type = utils .ListType (), default = DEFAULT_COLS )
25
31
def list (format , columns ):
26
32
accounts = fio .stream_endpoint (f"/accounts" )
27
33
28
- format (accounts , cols = columns )
34
+ format (accounts , cols = columns )
0 commit comments