Exemplo n.º 1
0
    def serialized(self):
        comment = {
            "id": self.id,
            "sender": dump_sender(self.sender)
        }
        if self.content:
            comment["content"] = self.content

        return comment
Exemplo n.º 2
0
    def serialized(self):
        tweet = {"id": self.id, "sender": dump_sender(self.sender)}
        if self.content:
            tweet["content"] = self.content
        if self.comments:
            tweet["comments"] = dump_comments(self.comments)
        if self.images:
            tweet["images"] = dump_images(self.images)

        return tweet
Exemplo n.º 3
0
    def serialized(self):
        tweet = {
            "id": self.id,
            "sender": dump_sender(self.sender)
        }
        if self.content:
            tweet["content"] = self.content
        if self.comments:
            tweet["comments"] = dump_comments(self.comments)
        if self.images:
            tweet["images"] = dump_images(self.images)

        return tweet
Exemplo n.º 4
0
    def serialized(self):
        comment = {"id": self.id, "sender": dump_sender(self.sender)}
        if self.content:
            comment["content"] = self.content

        return comment