예제 #1
0
    def get_list(self, list_id):
        """Get list

        :rtype: List
        """
        obj = self.client.fetch_json('/lists/' + list_id)
        return List.from_json(board=self, json_obj=obj)
예제 #2
0
파일: board.py 프로젝트: rnwolf/py-trello
    def get_list(self, list_id):
        """Get list

        :rtype: List
        """
        obj = self.client.fetch_json('/lists/' + list_id)
        return List.from_json(board=self, json_obj=obj)
예제 #3
0
    def get_list(self, list_id):
        """Get list

        :rtype: List
        """
        list_json = self.fetch_json('/lists/' + list_id)
        board = self.get_board(list_json['idBoard'])
        return List.from_json(board, list_json)
예제 #4
0
    def get_list(self, list_id):
        """Get list

        :rtype: List
        """
        list_json = self.fetch_json('/lists/' + list_id)
        board = self.get_board(list_json['idBoard'])
        return List.from_json(board, list_json)
예제 #5
0
    def get_card(self, card_id):
        '''Get card

        :rtype: Card
        '''
        card_json = self.fetch_json('/cards/' + card_id)
        list_json = self.fetch_json('/lists/' + card_json['idList'])
        board = self.get_board(card_json['idBoard'])
        return Card.from_json(List.from_json(board, list_json), card_json)
예제 #6
0
    def get_card(self, card_id):
        """Get card

        :rtype: Card
        """
        card_json = self.fetch_json('/cards/' + card_id)
        list_json = self.fetch_json('/lists/' + card_json['idList'])
        board = self.get_board(card_json['idBoard'])
        return Card.from_json(List.from_json(board, list_json), card_json)
예제 #7
0
    def get_card(self, card_id):
        """Get card

        :rtype: Card
        """
        card_json = self.fetch_json('/cards/' + card_id, query_params={'customFieldItems': 'true'})
        list_json = self.fetch_json('/lists/' + card_json['idList'])
        board = self.get_board(card_json['idBoard'])
        return Card.from_json(List.from_json(board, list_json), card_json)
예제 #8
0
    def get_lists(self, list_filter):
        """Get lists from filter

        :rtype: list of List
        """
        # error checking
        json_obj = self.client.fetch_json(
            '/boards/' + self.id + '/lists',
            query_params={'cards': 'none', 'filter': list_filter})
        return [List.from_json(board=self, json_obj=obj) for obj in json_obj]
예제 #9
0
파일: board.py 프로젝트: rnwolf/py-trello
    def get_lists(self, list_filter):
        """Get lists from filter

        :rtype: list of List
        """
        # error checking
        json_obj = self.client.fetch_json(
            '/boards/' + self.id + '/lists',
            query_params={'cards': 'none', 'filter': list_filter})
        return [List.from_json(board=self, json_obj=obj) for obj in json_obj]
예제 #10
0
    def add_list(self, name):
        """Add a list to this board

        :name: name for the list
        :return: the list
        :rtype: List
        """
        obj = self.client.fetch_json(
            '/lists',
            http_method='POST',
            post_args={'name': name, 'idBoard': self.id}, )
        return List.from_json(board=self, json_obj=obj)
예제 #11
0
파일: board.py 프로젝트: rnwolf/py-trello
    def add_list(self, name):
        """Add a list to this board

        :name: name for the list
        :return: the list
        :rtype: List
        """
        obj = self.client.fetch_json(
            '/lists',
            http_method='POST',
            post_args={'name': name, 'idBoard': self.id}, )
        return List.from_json(board=self, json_obj=obj)
예제 #12
0
	def add_list(self, name, pos=None):
		"""Add a list to this board

		:name: name for the list
		:pos: position of the list: "bottom", "top" or a positive number
		:return: the list
		:rtype: List
		"""
		arguments = {'name': name, 'idBoard': self.id}
		if pos:
			arguments["pos"] = pos
		obj = self.client.fetch_json(
				'/lists',
				http_method='POST',
				post_args=arguments, )
		return List.from_json(board=self, json_obj=obj)
예제 #13
0
    def add_list(self, name, pos=None):
        """Add a list to this board

        :name: name for the list
        :pos: position of the list: "bottom", "top" or a positive number
        :return: the list
        :rtype: List
        """
        arguments = {'name': name, 'idBoard': self.id}
        if pos:
            arguments["pos"] = pos
        obj = self.client.fetch_json(
            '/lists',
            http_method='POST',
            post_args=arguments, )
        return List.from_json(board=self, json_obj=obj)