Example #1
0
    def send_posts_to_contact(self, client, contact, now, date):
        '''
        Send microposts from last month to given contact.
        '''

        microposts = MicroPostManager.get_mine(
                startKey=date_util.get_db_date_from_date(now), 
                endKey=date_util.get_db_date_from_date(date))

        for micropost in microposts:
            body = micropost.toJson(localized=False)

            client.post(contact, MICROPOST_PATH, body, self.onContactResponse)
Example #2
0
def when_i_retrieve_my_last_posts(step):
    world.microposts = MicroPostManager.get_mine().all()