Skip to content

Added URL option to fetch #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions adafruit_pyportal.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,13 @@ def image_converter_url(image_url, width, height, color_depth=16):
width, height,
color_depth, image_url)

def fetch(self):
def fetch(self, refresh_url=None):
"""Fetch data from the url we initialized with, perfom any parsing,
and display text or graphics. This function does pretty much everything"""
and display text or graphics. This function does pretty much everything
Optionally update the URL
"""
if refresh_url:
self._url = refresh_url
json_out = None
image_url = None
values = []
Expand Down