We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c59231 commit d236963Copy full SHA for d236963
1 file changed
PyPortal_Word_of_the_Day/code.py
@@ -17,7 +17,6 @@
17
18
# Set up where we'll be fetching data from
19
DATA_SOURCE = "https://api.wordnik.com/v4/words.json/wordOfTheDay?api_key="+secrets['wordnik_token']
20
-WORD_LOCATION = ['word']
21
PART_OF_SPEECH = ['definitions', 0, 'partOfSpeech']
22
DEF_LOCATION = ['definitions', 0, 'text']
23
EXAMPLE_LOCATION = ['examples', 0, 'text']
@@ -59,7 +58,8 @@
59
58
if pyportal.touchscreen.touch_point:
60
try:
61
#set the JSON path here to be able to change between definition and example
62
- pyportal._json_path=(WORD_LOCATION,
+ # pylint: disable=protected-access
+ pyportal._json_path=(['word'],
63
PART_OF_SPEECH,
64
DEFINITION_EXAMPLE_ARR[definition_example])
65
value = pyportal.fetch()
0 commit comments