randallpace / starter-stock-app

Stock News app
0 stars 0 forks source link

Create Function That Returns a List of News for A Given Ticker Symbol #2

Open gshaw1997 opened 3 years ago

gshaw1997 commented 3 years ago

Create a new GET endpoint, /get-news, in our API, that takes in ticker as a query parameter and returns a list of News.

Example Successful API Response

GET /get-news?ticker="AAPL" HTTP/1.1
Content-Type: application/json;charset=UTF-8

[
{
  "date" : "1/09/2021",
  "text": "Some news text about the ticker",
"headline": "Send back headline for article",
}
]

Example Failure API Response

GET /get-news HTTP/1.1
Content-Type: application/json;charset=UTF-8

{
  "error" : "1/09/2021",
}
gshaw1997 commented 3 years ago

Group 2