dev@cloudburo

Python Tutorial Exercise 3: Implement the govAPI_UK class

Write a govAPI_UK implementation class which retrieves the following attributes from the UK government API:
  • familyName
  • givenName
  • gender
  • party
  • id (by extracting the number out of the about attributes)

We use the UK goverment API “data.parliament.uk” for retrieving government members.

A hint:
  • When you have fetched the JSON and stored in a variable, loadedjson you have to iterate over the array found in
    loaded_json[‘result’][‘items’]

Additional point:
  • Elaborate if the API used the paging mechanism



comments powered by Disqus