Skip to content

Commit dd4b4c3

Browse files
📝 update basic usage docs example
1 parent c29ddae commit dd4b4c3

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ to `dashboard` > `my account` > `Regenerate API/CLI KEY` and copy the key.
2727
2828
## Basic usage
2929
```python
30-
import squarecloud as square
3130
import asyncio
3231

32+
import squarecloud as square
33+
3334
client = square.Client('API_KEY', debug=True)
3435

3536
async def main():

squarecloud/cli/app.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
'--token',
3737
'-t',
3838
help='your api token',
39-
envvar='SQUARECLOUD-TOKEN',
39+
envvar='SQUARECLOUD_KEY',
4040
required=True,
4141
type=click.STRING,
4242
prompt='API KEY',
@@ -105,7 +105,7 @@ async def get_app_status(ctx: Context):
105105
'--token',
106106
'-t',
107107
help='your api token',
108-
envvar='SQUARECLOUD-TOKEN',
108+
envvar='SQUARECLOUD_KEY',
109109
required=True,
110110
type=click.STRING,
111111
prompt='API KEY',
@@ -134,7 +134,6 @@ async def app_list(ctx: Context, token: str):
134134
table.add_column('Language', justify='center')
135135
table.add_column('Description', justify='center')
136136
table.add_column('Is Website', justify='center')
137-
table.add_column('Avatar', justify='center')
138137
table.add_column('Cluster', justify='center')
139138
for app in apps:
140139
table.add_row(
@@ -292,7 +291,7 @@ async def delete_app(ctx: Context):
292291
'--token',
293292
'-t',
294293
help='your api token',
295-
envvar='SQUARECLOUD-TOKEN',
294+
envvar='SQUARECLOUD_KEY',
296295
required=True,
297296
type=click.STRING,
298297
prompt='API KEY',
@@ -373,7 +372,16 @@ async def last_deploys(ctx: Context):
373372
name='github-integration',
374373
help='Get a webhook url to integrate your application with github',
375374
)
376-
@click.argument('access_token', type=click.STRING)
375+
@click.option(
376+
'--access-token',
377+
'-t',
378+
help='your github access token',
379+
envvar='GITHUB_ACCESS_TOKEN',
380+
required=True,
381+
type=click.STRING,
382+
prompt='GITHUB ACCESS TOKEN',
383+
hide_input=True,
384+
)
377385
@click.pass_context
378386
@run_async
379387
async def github_integration(ctx: Context, access_token: str):

0 commit comments

Comments
 (0)