Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 803 Bytes

project_work3.md

File metadata and controls

57 lines (39 loc) · 803 Bytes

Simulation API Requirements

  • Change Authentication to Basic
  • Change API names to reflect simulator needs

/latest

Returns the latest element

return jsonify({"latest": LATEST})

/register

Registers a new user

if error:
	return jsonify({"status": 400, "error_msg": error}), 400
else:
	return "", 204

/msgs

returns all messages that is not flagged

return jsonify(filtered_msgs)

/msgs/

GET: returns all messages by a specific user that is not flagged

return jsonify(filtered_msgs)

POST: adds the message to the db and returns

return "", 204

/fllws/

GET:

POST: starts following or unfollowing the user

if error:
	return "", 204	
else:
	return jsonify(followers_response)