Post a new tweet [client to FE]
- POST /tweets
- Request body: {"text": "this is a #tweet"}
- 404 Not found returned for bad endpoint
- 400 Bad Request returned if tweet contains no hashtag
- 400 Bad Request return for " # "
- 201 Created for valid request
Search tweets [client to FE]
- GET /tweets?q=searchterm
- 200 Ok for valid request
- Response body: {"q": "searchterm", "tweets": ["tw1", "tw2"]}
- 404 Not found returned for bad endpoint
- 400 Bad Request for space in search term, or no q parameter
Add tweet [FE to BE]
- POST /tweets
- {"tweet": "#hello i am a #tweet", "hashtags":["hello", "tweet"]}
- 201 Created for valid request
Search data store
- GET /tweets?q=searchterm&v=versionnum
- Response for up to date
- Response for out of date
- 200 Ok
- body: {"q": "searchterm", "v": versionnum, "tweets": ["tw1", "tw2"]}