Skip to content

Commit

Permalink
Add support for creating public boards
Browse files Browse the repository at this point in the history
  • Loading branch information
tangledhelix committed Aug 20, 2016
1 parent 953eae2 commit f6fe04f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions trello/trelloclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,14 @@ def get_board(self, board_id):
obj = self.fetch_json('/boards/' + board_id)
return Board.from_json(self, json_obj=obj)

def add_board(self, board_name, source_board=None, organization_id=None):
def add_board(self, board_name, source_board=None, organization_id=None, permission_level='private'):
"""Create board
:param board_name: Name of the board to create
:param source_board: Optional Board to copy
:param permission_level: Permission level, defaults to private
:rtype: Board
"""
post_args={'name': board_name}
post_args={'name': board_name, 'prefs_permissionLevel': permission_level}
if source_board is not None:
post_args['idBoardSource'] = source_board.id
if organization_id is not None:
Expand Down

0 comments on commit f6fe04f

Please sign in to comment.