There are far more than calling the official nobel prize API. By including some fixed query parameters, a more specific response of search of the nobel prize data can be returned.
For example:
Prize
In the case of : http://api.nobelprize.org/v1/prize.json , we have the following query parameters:-
Query Params
Descriptions
year
(int32) Year of the Nobel Prize as YYYY format
yearTo
(int32) End of year span as YYYT format. Year is required and used at start. (i.e.: ?year=YYYY&yearTo=YYYY )
category
(string) Search for prize by category (physics, chemistry, medicine, peace, literature or economics)
numberOfLaureates
(int32) Filter prizes by number of laureates who shared the prize
Laureates
Here is Laureate , where the api is : http://api.nobelprize.org/v1/laureate.json . For country code, see Country (below)
Query Params
Descriptions
id
(int32) ID of a unique Nobel Laureate
bornCountry
(string) Search for laureates by country of birth
bornCountryCode
(string) Search for laureates by country of birth based on country code
bornCity
(string) Search for laureates by city of birth
diedCountry
(string) Search for laureates by country where they died
diedCountryCode
(string) Search for laureates by country where they died based on country code
diedCity
(string) Search for laureates by city where they died
bornDate
(string) Search for laureates by city where they died
bornDateTo
(string) End of search for laureates by year (YYYY) or date (YYYYMMDD) of birth. Requires the bornDate param to be set
diedDate
(string) Search for laureates by year (YYYY) or date (YYYYMMDD) of death
diedDateTo
(string) End of search for laureates by year (YYYY) or date (YYYYMMDD) of death. Requires the diedDate param to be set
motivation
(string) Search for laureates based on the motivation of receiving the prize
gender
(string) Default to All Search for laureates by gender (All, Male, Female or Organization)
affiliation
(string) Search for laureates by affiliation
Country
For country, the link is: http://api.nobelprize.org/v1/country.json . However, the official api reference page does not indicate any query parameters for country. It return an object with two keys, name and code. The code is a two letter long uppercase alphabet, the name is the name in string to what the code represent.
Task
The Task of this branch shall be:-
[ ] Write new api and/or amend old api so that a more specific search of the data can be returned.
[ ] In associate with the above query parameters, depends on the search terms user can or should be allowed to provide, under your discretion (think about what might be a more maintainable and more controllable so the user might not be doing something not expected), create necessary frontend UI so that user can seek their fixed controlled choice of search terms and still feel they can do many things.
[ ] (optional) create two way to search.
[ ] search the official nobel prize page and return the results on the showResult components (amend showResult so that it can handle all returning data from the official nobel prize page)
[ ] search the django-postgresql database. The data should be first obtain from the official nobel prize page, compared for different if not already existed, update if there are different, then show those result on the showResult according to the search request and return those data from the database (amend showResult so that it can handle data from the database and show them on the showResult component.)
Title
Create new api to handle payload
Issues
Client + Server
Matter
There are far more than calling the official nobel prize API. By including some fixed query parameters, a more specific response of search of the nobel prize data can be returned.
For example:
Prize
http://api.nobelprize.org/v1/prize.json
, we have the following query parameters:-?year=YYYY&yearTo=YYYY
)Laureates
Here is
Laureate
, where the api is :http://api.nobelprize.org/v1/laureate.json
. For country code, see Country (below)YYYY
) or date (YYYYMMDD
) of birth. Requires thebornDate
param to be setYYYY
) or date (YYYYMMDD
) of deathYYYY
) or date (YYYYMMDD
) of death. Requires thediedDate
param to be setCountry
For
country
, the link is:http://api.nobelprize.org/v1/country.json
. However, the official api reference page does not indicate any query parameters for country. It return an object with two keys,name
andcode
. Thecode
is a two letter long uppercase alphabet, thename
is the name in string to what the code represent.Task
The Task of this branch shall be:-
seek
their fixed controlled choice of search terms and still feel they can do many things.showResult
components (amendshowResult
so that it can handle all returning data from the official nobel prize page)django-postgresql
database. The data should be first obtain from the official nobel prize page, compared for different if not already existed, update if there are different, then show those result on theshowResult
according to the search request and return those data from the database (amendshowResult
so that it can handle data from the database and show them on theshowResult
component.)References
More details in:- Get Start with v1 Code Example Prize Laureate Country