PostReply

public class PostReply implements Postable, Putable

Created by Drew Gregory on 3/4/18.

Fields

author

public User author

id

public long id

networkId

public long networkId

parentId

public long parentId

replyDate

public String replyDate

replyText

public String replyText

userId

public long userId

Constructors

PostReply

public PostReply(long id, long parentId, long userId, long networkId, String replyDate, String replyText)

PostReply

public PostReply(JSONObject replyObj)

PostReply

public PostReply()

Methods

getAuthor

public User getAuthor()

getPostJson

public JSONObject getPostJson()

getPutJson

public JSONObject getPutJson()

toJSON

public JSONObject toJSON()

Generate a JSON describing the object. The JSON will conform to the following format:

{
               "id_parent": 0,
               "id_user": 0,
               "id_network": 0,
               "reply_text": "string"
           }

The resulting object is suitable for use with the /post/{postId}/reply POST or PUT endpoints.

Throws:
  • JSONException – Unclear when this would be thrown
Returns:

JSON representation of the object