예제 #1
0
 def add_comment_to_card(self, card_id, comment, move_to_bottom=False):
     c = Card(self.client, card_id)
     c.addComments(comment)
     sys.stderr.write('card comment added\n')
     if move_to_bottom:
         c.updateCard({'pos': 'bottom'})
         sys.stderr.write('card moved to bottom of list\n')
예제 #2
0
 def create_card(self, card_json):
     """
     Create a Card object from JSON object
     """
     return Card(trello_client=self,
                 card_id=card_json['id'],
                 name=card_json['name'])
예제 #3
0
파일: tests.py 프로젝트: tjspross/Trolly
 def setUp(self):
     self.client = Client(api_key, user_auth_token)
     self.org = Organisation(self.client, organisation)
     self.board = Board(self.client, board_id)
     self.list = List(self.client, list_id)
     self.card = Card(self.client, card_id)
     self.checklist = Checklist(self.client, checklist_id)
     self.member = Member(self.client, member_id)
예제 #4
0
 def createCard( self, card_json ):
     """
     Create a Card object from JSON object
     """
     return Card(
             trello_client = self,
             card_id = card_json['id'].encode('utf-8'),
             name = card_json['name'].encode( 'utf-8' )
         )
예제 #5
0
def _notify(user, ticket, card_id):
    client = DoubanTrelloClient(user.trello_access_token['oauth_token'])
    card = Card(client, card_id)
    tmpl = "Attention: %s has submitted a Pull Request. %s"
    card.addComments(tmpl % (user.name, '%s%s' % (DOMAIN, ticket.url)))