Skip to content

Commit 3da6b3c

Browse files
authored
Merge pull request #28 from wifijt/master
Added URL option to fetch
2 parents a789a1a + 01b8a63 commit 3da6b3c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

adafruit_pyportal.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,13 @@ def image_converter_url(image_url, width, height, color_depth=16):
649649
width, height,
650650
color_depth, image_url)
651651

652-
def fetch(self):
652+
def fetch(self, refresh_url=None):
653653
"""Fetch data from the url we initialized with, perfom any parsing,
654-
and display text or graphics. This function does pretty much everything"""
654+
and display text or graphics. This function does pretty much everything
655+
Optionally update the URL
656+
"""
657+
if refresh_url:
658+
self._url = refresh_url
655659
json_out = None
656660
image_url = None
657661
values = []

0 commit comments

Comments
 (0)