File tree Expand file tree Collapse file tree
PyPortal/PyPortal_Thingiverse Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22#
33# SPDX-License-Identifier: MIT
44
5+ import os
56import time
67import random
78import board
89import adafruit_pyportal
910
10- # Get wifi details and more from a settings.py file
11- try :
12- from secrets import secrets
13- except ImportError :
14- print ("WiFi secrets are kept in secrets.py, please add them there!" )
15- raise
16-
1711# Set up where we'll be fetching data from
1812NUM_THINGS = 25 # how many things to select from (we randomize between em)
1913DATA_SOURCE = "https://api.thingiverse.com/users/adafruit/things?per_page=" + str (NUM_THINGS )
20- DATA_SOURCE += "&access_token=" + secrets [ 'thingiverse_token' ]
14+ DATA_SOURCE += "&access_token=" + os . getenv ( "THINGIVERSE_TOKEN" )
2115IMAGE_LOCATION = [0 , "thumbnail" ]
2216TITLE_LOCATION = [0 , "name" ]
2317URL_LOCATION = [0 , "public_url" ]
You can’t perform that action at this time.
0 commit comments