Skip to content

n this challenge, the REST API contains information about football matches. The provided API allows querying matches by teams and year. Your task is to get the total number of goals scored by a given team in a given year. To access a collection of matches, perform GET requests to https://jsonmock.hackerrank.com/api/football_matches?year=&team1=&…

Notifications You must be signed in to change notification settings

saajithmohd/Hacker-Rank-REST-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

HackerRankRESTIntermediateJavaSolution

n this challenge, the REST API contains information about football matches. The provided API allows querying matches by teams and year. Your task is to get the total number of goals scored by a given team in a given year. To access a collection of matches, perform GET requests to https://jsonmock.hackerrank.com/api/football_matches?year=&team1=&page= https://jsonmock.hackerrank.com/api/football_matches?year=&team2=&page= where is the year of the competition, is the name of the team, and is the page of the results to request. The results might be divided into several pages. Pages are numbered from 1. Notice that the above two URLs are different. The first URL specifies the team1 parameter (denoting the home team) while the second URL specifies the team2 parameter (denoting the visiting team). Thus, in order to get all matches that a particular team played in, you need to retrieve matches where the team was the home team and the visiting team. For example, a GET request to https://jsonmock.hackerrank.com/api/football_matches?year=2011&team1=Barcelona&page=2 returns data associated with matches in the year 2011, where team1 (the home team) was Barcelona, on the second page of the results. Similarly, a GET request to https://jsonmock.hackerrank.com/api/football_matches?year=2011&team2=Barcelona&page=1 returns data associated with matches in the year 2011 where team2 (the visiting team) was Barcelona, on the first page of the results.

About

n this challenge, the REST API contains information about football matches. The provided API allows querying matches by teams and year. Your task is to get the total number of goals scored by a given team in a given year. To access a collection of matches, perform GET requests to https://jsonmock.hackerrank.com/api/football_matches?year=&team1=&…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages