Project 2 (Grad Students): API Data
and GUI Display
Summary: let's
practice with some more interesting stuff in GO
Due:
OCT 23rd at 11:59pm
Details:
- Create a new project. Make sure it has your name and the fact that it
is project2 in it somewhere in the project name.
-
- Go to the rest countries API https://restcountries.com/welcome
and create a free API key
- Once you confirm the account, they will send you to a page which shows
you code in many languages (including go) to query the API.
- use this and the countries API documentation https://restcountries.com/docs/countries
to get the json response for countries in a region. (I used the curl
version and then redirected it into a file).
- create the structs needed for go to unmarshal this - I suggest using
LLM style AI to help.
- make a fyne GUI
- let the user choose a region (go to https://restcountries.com/docs/countries#field-reference
and scroll down till you get there) or a membership (same directions)
[your choice of region or membership, but let me know in the readme]
- fill a list or other fyne collections widget with the countries
(let's only display the names of the countries - your choice on which
version of that name you use)
- when a user selects a country display information about that country
including
- official name
- common name(s)
- official language(s)
- flag
- whether or not it is landlocked
- two other pieces of data that you think are relevant.
- Make sure that the data displayed is labeled so that a user
understands what they are looking at.
- Make sure that the data that is displayed is displayed in widgets that
show the data with a reasonable visibility (for example don't use a tiny
one line text field if the data is a paragraph long and so on.
- My lowest resolution Monitor is a 1900x1080 monitor, make sure your
project isn't larger than that display.
Submitting the project.
submit the project by putting it on github and sending me a collaboration
invite.