def save(self):
        """
        Saves or updates the current object instance depending on the
        presence of `object.id`.
        """
        params = self.to_params()
        if 'tweet_id' in params:
            params['tweet_ids'] = [params['tweet_id']]
            del params['tweet_id']

        if self.id:
            raise HTTPError("Method PUT not allowed.")

        resource = self.RESOURCE_COLLECTION.format(account_id=self.account.id)
        response = Request(self.account.client, 'post', resource, params=params).perform()
        return self.from_response(response.body['data'][0])
def save ( self ) : params = self . to_params ( ) if 'tweet_id' in params : params [ 'tweet_ids' ] = [ params [ 'tweet_id' ] ] del params [ 'tweet_id' ] if self . id : raise HTTPError ( "Method PUT not allowed." ) resource = self . RESOURCE_COLLECTION . format ( account_id = self . account . id ) response = Request ( self . account . client , 'post' , resource , params = params ) . perform ( ) return self . from_response ( response . body [ 'data' ] [ 0 ] )
Saves or updates the current object instance depending on the
        presence of `object.id`.