Skip to content

Commit 89ea666

Browse files
authored
Merge pull request #2368 from dhalbert/env-to-settings-toml
update .env references to settings.toml
2 parents f751352 + 91b96d7 commit 89ea666

File tree

3 files changed

+6
-5
lines changed
  • CircuitPython_Mastodon_API_Examples
  • Scrolling_Alphanumeric_Countdown_Clock

3 files changed

+6
-5
lines changed

CircuitPython_Mastodon_API_Examples/Read_From_Mastodon/code.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616
# connect to SSID
1717
wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
1818

19-
# add your mastodon token as 'mastodon_token' to your .env file
19+
# add your mastodon token as 'mastodon_token' to your settings.toml file
2020
headers = {'Authorization': 'Bearer ' + os.getenv('mastodon_token') + 'read:statuses'}
2121

2222
pool = socketpool.SocketPool(wifi.radio)
2323
requests = adafruit_requests.Session(pool, ssl.create_default_context())
2424

2525
# initial request, gets most recent matching hashtag post
26-
# add your mastodon instance (mastodon.social, tech.lgbt, etc) to your .env file as mastodon_host
26+
# add your mastodon instance (mastodon.social, tech.lgbt, etc)
27+
# to your settings.toml file as mastodon_host
2728
r = requests.get("https://%s/api/v1/timelines/tag/%s?limit=1" % (os.getenv('mastodon_host'), hashtag), headers=headers) # pylint: disable=line-too-long
2829
json_data = r.json()
2930
post_id = str(json_data[0]['id'])

CircuitPython_Mastodon_API_Examples/Send_To_Mastodon/code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import socketpool
88
import adafruit_requests
99

10-
# add your mastodon token as 'mastodon_token' to your .env file
10+
# add your mastodon token as 'mastodon_token' to your settings.toml file
1111
headers = {'Authorization': 'Bearer ' + os.getenv('mastodon_token')}
1212

13-
# add your mastodon instance to your .env file as mastodon_host
13+
# add your mastodon instance to your settings.toml file as mastodon_host
1414
url = 'https://' + os.getenv('mastodon_host') + '/api/v1/statuses'
1515

1616
# connect to SSID

Scrolling_Alphanumeric_Countdown_Clock/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
CircuitPython Quad-Alphanumeric Display Holiday Countdown.
55
6-
This demo requires a separate file named .env (including the dot) on your CIRCUITPY drive, which
6+
This demo requires a separate file named settings.toml on your CIRCUITPY drive, which
77
should contain your WiFi credentials and Adafruit IO credentials.
88
"""
99

0 commit comments

Comments
 (0)