+
+ def like(self, post_id):
+ """This function likes a post
+
+ :param post_id: id of the post to like.
+ :type post_id: str
+ :returns: dict -- json formatted like object.
+
+ """
+ r = self._session.get(self._pod + "/stream")
+ token = self._token_regex.search(r.text).group(1)
+
+ data = {'authenticity_token': token}
+
+ r = self._session.post(self._pod + "/posts/" +
+ post_id + "/likes", data=data, headers={'accept': 'application/json'})
+ return r.json()
+
+ def rmlike(self, post_id, like_id):
+ """This function removes a like from a post
+
+ :param post_id: id of the post to remove the like from.
+ :type post_id: str
+ :param like_id: id of the like to remove.
+ :type like_id: str
+
+ """
+ r = self._session.get(self._pod + "/stream")
+ token = self._token_regex.search(r.text).group(1)
+
+ data = {'authenticity_token': token}
+
+ r = self._session.delete(self._pod + "/posts/" +
+ post_id + "/likes/" +
+ like_id,
+ data=data)