Skip to content

Commit

Permalink
fix(docs): Changes $DIGITALOCEAN_TOKEN to DIGITALOCEAN_TOKEN and chan…
Browse files Browse the repository at this point in the history
…ges get to list (#278)

* DigitalOcean token will now be set correctly

* Changed get() to list() as get takes a droplet_id
  • Loading branch information
KylePeterDavies authored Apr 4, 2024
1 parent bdce25c commit c00c87c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ make install
import os
from pydo import Client

client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN"))
client = Client(token=os.getenv("DIGITALOCEAN_TOKEN"))
```

#### Example of Using `pydo` to Access DO Resources
Expand All @@ -56,7 +56,7 @@ Find below a working example for GETting a ssh_key ([per this http request](http
import os
from pydo import Client

client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN"))
client = Client(token=os.getenv("DIGITALOCEAN_TOKEN"))

ssh_keys_resp = client.ssh_keys.list()
for k in ssh_keys_resp["ssh_keys"]:
Expand Down Expand Up @@ -95,13 +95,13 @@ By default the client uses the same retry policy as the [Azure SDK for Python](h
retry policy. If you'd like to modify any of these values, you can pass them as keywords to your client initialization:

```python
client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN"), retry_total=3)
client = Client(token=os.getenv("DIGITALOCEAN_TOKEN"), retry_total=3)
```

or

```python
client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN"), retry_policy=MyRetryPolicy())
client = Client(token=os.getenv("DIGITALOCEAN_TOKEN"), retry_policy=MyRetryPolicy())
```

# **Contributing**
Expand Down Expand Up @@ -196,8 +196,8 @@ From here you can use the client interactively:

```shell
>>> from pydo import Client
>>> c = Client($DIGITALOCEAN_TOKEN)
>>> c.droplets.get()
>>> c = Client(DIGITALOCEAN_TOKEN)
>>> c.droplets.list()
```

Alternatively, the tests can be run by attaching the tests as a volume and
Expand Down

0 comments on commit c00c87c

Please sign in to comment.