Skip to content
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

Allo JSON raw data requests #20

Open
wants to merge 3 commits into
base: master
from

Conversation

@ladyada
Copy link
Member

ladyada commented Apr 3, 2019

also fix an AIO error exception to be more clear what happened

@ladyada ladyada requested a review from adafruit/circuitpythonlibrarians Apr 5, 2019
@jepler
jepler approved these changes Sep 9, 2019
Copy link

jepler left a comment

Looks good to me, though I didn't do any testing.

@@ -642,9 +649,11 @@ def image_converter_url(image_url, width, height, color_depth=16):
width, height,
color_depth, image_url)

def fetch(self):
def fetch(self, *, raw_url_text=False, raw_url_json=False):

This comment has been minimized.

Copy link
@caternuson

caternuson Sep 11, 2019

Contributor

Could this be done with a single parameter and then something like an enum for the options?

def fetch(self, return_type=JSON_DATA):

and then:

result = pp.fetch() # default
result = pp.fetch(PyPortal.RAW_TEXT) # raw_url_text
result = pp.fetch(PyPortal.RAW_JSON) # raw_url_json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.