@@ -15,14 +15,14 @@ async def cli():
15
15
"""CLI for Spore REST API"""
16
16
17
17
18
- @cli .command ()
18
+ @cli .command (help = "Get stats" )
19
19
async def get_stats ():
20
20
async with _client as client :
21
21
result = await client .get_stats ()
22
22
click .echo (result .to_json ())
23
23
24
24
25
- @cli .command ()
25
+ @cli .command (help = "Get creature" )
26
26
@click .argument ("asset_id" , type = int )
27
27
async def get_creature (asset_id : int ):
28
28
async with _client as client :
@@ -32,7 +32,7 @@ async def get_creature(asset_id: int):
32
32
click .echo (result .to_json ())
33
33
34
34
35
- @cli .command ()
35
+ @cli .command (help = "Get user information" )
36
36
@click .argument ("username" , type = str )
37
37
async def get_user_info (username : str ):
38
38
async with _client as client :
@@ -42,7 +42,7 @@ async def get_user_info(username: str):
42
42
click .echo (result .to_json ())
43
43
44
44
45
- @cli .command ()
45
+ @cli .command (help = "Get creature of the user" )
46
46
@click .argument ("username" , type = str )
47
47
@click .argument ("start_index" , type = int , default = 1 )
48
48
@click .argument ("length" , type = int , default = 10 )
@@ -56,7 +56,7 @@ async def get_user_assets(username: str, start_index: int, length: int):
56
56
click .echo (result .to_json ())
57
57
58
58
59
- @cli .command ()
59
+ @cli .command (help = "Get sporecasts of the user" )
60
60
@click .argument ("username" , type = str )
61
61
async def get_user_sporecasts (username : str ):
62
62
async with _client as client :
@@ -66,7 +66,7 @@ async def get_user_sporecasts(username: str):
66
66
click .echo (result .to_json ())
67
67
68
68
69
- @cli .command ()
69
+ @cli .command (help = "Get achievements of the user" )
70
70
@click .argument ("username" , type = str )
71
71
@click .argument ("start_index" , type = int , default = 1 )
72
72
@click .argument ("length" , type = int , default = 10 )
@@ -80,7 +80,7 @@ async def get_user_achievements(username: str, start_index: int, length: int):
80
80
click .echo (result .to_json ())
81
81
82
82
83
- @cli .command ()
83
+ @cli .command (help = "Get buddies of the user" )
84
84
@click .argument ("username" , type = str )
85
85
@click .argument ("start_index" , type = int , default = 1 )
86
86
@click .argument ("length" , type = int , default = 10 )
@@ -94,7 +94,7 @@ async def get_user_buddies(username: str, start_index: int, length: int):
94
94
click .echo (result .to_json ())
95
95
96
96
97
- @cli .command ()
97
+ @cli .command (help = "Get subscribers of the user" )
98
98
@click .argument ("username" , type = str )
99
99
@click .argument ("start_index" , type = int , default = 1 )
100
100
@click .argument ("length" , type = int , default = 10 )
@@ -108,7 +108,7 @@ async def get_user_subscribers(username: str, start_index: int, length: int):
108
108
click .echo (result .to_json ())
109
109
110
110
111
- @cli .command ()
111
+ @cli .command (help = "Get asset information" )
112
112
@click .argument ("asset_id" , type = int )
113
113
async def get_asset_info (asset_id : int ):
114
114
async with _client as client :
@@ -118,7 +118,7 @@ async def get_asset_info(asset_id: int):
118
118
click .echo (result .to_json ())
119
119
120
120
121
- @cli .command ()
121
+ @cli .command (help = "Get comments of the asset" )
122
122
@click .argument ("asset_id" , type = int )
123
123
@click .argument ("start_index" , type = int , default = 1 )
124
124
@click .argument ("length" , type = int , default = 10 )
@@ -132,7 +132,7 @@ async def get_asset_comments(asset_id: int, start_index: int, length: int):
132
132
click .echo (result .to_json ())
133
133
134
134
135
- @cli .command ()
135
+ @cli .command (help = "Get assets of the sporecast" )
136
136
@click .argument ("sporecast_id" , type = int )
137
137
@click .argument ("start_index" , type = int , default = 1 )
138
138
@click .argument ("length" , type = int , default = 10 )
@@ -146,7 +146,7 @@ async def get_sporecast_assets(sporecast_id: int, start_index: int, length: int)
146
146
click .echo (result .to_json ())
147
147
148
148
149
- @cli .command ()
149
+ @cli .command (help = "Search assets" )
150
150
@click .argument (
151
151
"view_type" ,
152
152
type = click .Choice (ViewType ._member_names_ , case_sensitive = False )
@@ -158,9 +158,9 @@ async def get_sporecast_assets(sporecast_id: int, start_index: int, length: int)
158
158
type = click .Choice (AssetType ._member_names_ , case_sensitive = False ),
159
159
required = False
160
160
)
161
- async def assets_search (view_type : str , start_index : int , length : int , asset_type : Optional [str ]):
161
+ async def search_assets (view_type : str , start_index : int , length : int , asset_type : Optional [str ]):
162
162
async with _client as client :
163
- result = await client .assets_search (
163
+ result = await client .search_assets (
164
164
view_type = ViewType [view_type ],
165
165
start_index = start_index ,
166
166
length = length ,
0 commit comments