Acceptable Response Statement?

,

Screen Link:

https://app.dataquest.io/m/53/intermediate-apis/5/pagination

My Code:

params = {"per_page": 50, "page": 1}
response = requests.get("https://api.github.com/users/VikParuchuri/starred", headers=headers, params=params)
page1_repos = response.json()

response = requests.get("https://api.github.com/users/VikParuchuri/starred?page=2&per_page=50", headers=headers)

page2_repos = response.json()
print(page2_repos)

Would the above code be acceptable for the response statement in my answer? Rather than plugging the parameters into a dictionary I made them part of my response statement. The URL worked in the browser but not in the DQ page.

What I expected to happen:
Results for the second page to be displayed.

What actually happened:

{'message': 'Not found.'}
1 Like

Hi @vroomvroom,

For security reasons, we are only mimicking web requests on this screen; we are not sending any actual requests to Github. Because of that, alternative solutions may not work on this screen.

Best,
Sahil

Oh okay, I understand.

1 Like