Package xyz.thegrapevine.jnewsapi
Class NewsClient
- java.lang.Object
-
- xyz.thegrapevine.jnewsapi.NewsClient
-
public class NewsClient extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NewsClient(java.lang.String key)Instantiates the news client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EverythingResponseeverything(HTTPParameter... args)Returns everything related to a query.SourcesResponsesources(HTTPParameter... args)Returns a detailed list of sources.TopHeadlinesResponsetopHeadlines(HTTPParameter... args)Gets the top headlines of the day.
-
-
-
Method Detail
-
topHeadlines
public TopHeadlinesResponse topHeadlines(HTTPParameter... args) throws NewsAPIException
Gets the top headlines of the day.- Parameters:
args- Array of parameters to pass to the client.- Returns:
- A
TopHeadlinesResponseobject. - Throws:
NewsAPIException- A custom exception for the client.
-
sources
public SourcesResponse sources(HTTPParameter... args) throws NewsAPIException
Returns a detailed list of sources.- Parameters:
args- Array of parameters to pass to the client.- Returns:
- A
SourcesResponseobject. - Throws:
NewsAPIException- A custom exception for the client.
-
everything
public EverythingResponse everything(HTTPParameter... args) throws NewsAPIException
Returns everything related to a query.- Parameters:
args- Array of parameters to pass to the client.- Returns:
- A
EverythingResponseobject. - Throws:
NewsAPIException- A custom exception for the client.
-
-