- validateConfig(config) ⇒
Array.<String>
Validates the configuration object.
Kind: global class
- TrelloBoards
- new TrelloBoards(trelloClient)
- .searchFor(searchTerm)
- .create(data, force) ⇒
Promise.<Array.<{name:String, idOrganization:String, id:String, lists:Array}>>
- .delete(boardId)
- .clone(fromBoard, toBoard)
- .getById(idBoard)
- .update(board) ⇒
Promise.<*>
- .getLists(idBoards)
- .getCustomFields(idBoards)
- .getByName(idOrganization, boardName)
Params
- trelloClient
TrelloClient
Kind: instance method of TrelloBoards
Params
- searchTerm
String
trelloBoards.create(data, force) ⇒ Promise.<Array.<{name:String, idOrganization:String, id:String, lists:Array}>>
Create a board if it does not exist.
Kind: instance method of TrelloBoards
Params
- data
object
- .name
String
- .idOrganization
String
- .lists
Array
- .name
- force
Boolean
- force list creation
TODO: Delete an existing board
Kind: instance method of TrelloBoards
Params
- boardId
string
TODO: Delete an existing board
Kind: instance method of TrelloBoards
Params
- fromBoard
object
- [.name]
string
- This must be set if id is not defined - [.id]
string
- This must be set if name is not defined
- [.name]
- toBoard
object
- .name
String
- .lists
Array
- .name
Get board by ID
Kind: instance method of TrelloBoards
Params
- idBoard
string
This method allow us to update a board definition. If the board id is not present or not valid properties exist to be updated, an error is thrown.
Kind: instance method of TrelloBoards
Params
- board
object
- Board object to be updated- [.id]
string
- [.name]
string
- [.id]
Create a board if it does not exist.
Kind: instance method of TrelloBoards
Params
- idBoards
String
Get custom fields assigned to a board.
Kind: instance method of TrelloBoards
Params
- idBoards
String
Get a board by name
Kind: instance method of TrelloBoards
Params
- idOrganization
String
- boardName
String
Kind: global class
Params
- trelloClient
TrelloClient
Update a card
Kind: instance method of TrelloCards
Params
- idCard
String
- parameters
Object
- valid options can be found here https://developers.trello.com/reference#cardsid-1
Get a cards details
Kind: instance method of TrelloCards
Params
- idCard
String
- parameters
Object
- valid options can be found here https://developers.trello.com/reference#cardsid
Get a custom field on a card by name
Kind: instance method of TrelloCards
Params
- idCard
String
- customFieldName
String
Kind: global class
- TrelloLists
- new TrelloLists(trelloClient)
- .create(data, force) ⇒
Promise.<{name:String, idBoard:String, id:String}>
- .setPosition(idList, position) ⇒
Promise.<*>
- .getByName(idBoard, listName, allowMultiple) ⇒
PromiseLike.<T>
- .rotateLeft(idBoard, count)
- .rotateRight(idBoard, count)
- .archiveAllCardsOnList(listId)
- .archiveList(listId, options)
- .moveList(toBoardId, fromListId, toListName, pos)
- .copyList(toBoardId, fromListId, toListName, pos)
- .moveCards(toBoardId, listId, toListId)
- .update(list) ⇒
Promise.<*>
Params
- trelloClient
TrelloClient
Create a list if it does not exist.
Kind: instance method of TrelloLists
Params
- data
object
- .name
string
- .idBoard
string
- [.pos]
String
|Number
- The position to place the list, possible values are "top", "bottom", or a positive floating point number
- .name
- force
Boolean
- force list creation
This method sets a list position.
Kind: instance method of TrelloLists
Params
- idList
String
- List Id. - position
String
|Number
- List Position
This method is used to search for a list By name in a Board.
The board is identified by a idBoard
.
Kind: instance method of TrelloLists
Params
- idBoard
String
- Board Identifier - listName
String
- List Name to search for - allowMultiple
Boolean
- If this is set to true, an array of lists will be returned, otherwise only one list will be returned or an error thown if the number of found list !==1
Apply a Rotate Left Operation to all lists inside a board.
Operation:
+------------------------------------+
| +---+---+---+---+---+---+---+ |
+-- | 1 | 2 | 3 | . | . | . | n | <--+
+---+---+---+---+---+---+---+
Outcome:
+---+---+---+---+---+---+---+
| 2 | 3 | . | . | . | n | 1 |
+---+---+---+---+---+---+---+
Kind: instance method of TrelloLists
Params
- idBoard
String
- Board Identifier - count
Number
- number of items to be rotated
Apply a Rotate Right Operation to all lists inside a board.
Operation:
+------------------------------------+
| +---+---+---+---+---+---+---+ |
+--> | 1 | 2 | 3 | . | . | . | n | --+
+---+---+---+---+---+---+---+
Outcome:
+---+---+---+---+---+---+---+
| n | 1 | 2 | . | . | . |n-1|
+---+---+---+---+---+---+---+
Kind: instance method of TrelloLists
Params
- idBoard
String
- Board Identifier - count
Number
- number of items to be rotated
Archive all cards on a list
Kind: instance method of TrelloLists
Params
- listId
String
Archive a list
Kind: instance method of TrelloLists
Params
- listId
String
- options
Object
- .archiveCards
Boolean
- If this is set to true, all cards on the list will be archived before the list is archived
- .archiveCards
Move a list
Kind: instance method of TrelloLists
Params
- toBoardId
String
- Board Identifier to move the list to - fromListId
String
- ID of the list to be moved - toListName
String
- New name of the list - pos
String
|Number
= bottom
- The position to place the list, possible values are "top", "bottom", or a positive floating point number
copy a list
Kind: instance method of TrelloLists
Params
- toBoardId
String
- Board Identifier to copy the list to - fromListId
String
- ID of the list to be copied - toListName
String
- Name of the cloned list - pos
String
|Number
= bottom
- The position to place the list, possible values are "top", "bottom", or a positive floating point number
Move all cards to list
Kind: instance method of TrelloLists
Params
- toBoardId
String
- Board Identifier of the board containing the list to move the cards to - listId
String
- ID of the list cards should be move to - toListId
String
- ID of the list to move the cards to
This method allow us to update a list definition. If the list id is not present or not valid properties exist to be updated, an error is thrown.
Kind: instance method of TrelloLists
Params
- list
object
- List object to be updated- [.id]
string
- [.name]
string
- [.id]
Kind: global class
- TrelloOrganizations
- new TrelloOrganizations(trelloClient)
- .searchFor(searchTerm) ⇒
Promise.<Array.<Object>>
- .create(data, force) ⇒
Promise.<*>
- .delete(data, deleteBoards) ⇒
Promise.<*>
- .getById(idOrganization) ⇒
Promise.<{*}>
Params
- trelloClient
TrelloClient
This method allow us to search for an organization given a 'searchTerm' String
Kind: instance method of TrelloOrganizations
Returns: Promise.<Array.<Object>>
- Array containing organizations
Params
- searchTerm
String
This method allow us to create an organization if it doesn't exist or force the creation of it if another organization with the same name already exists. If the organization contains boards, then they are created.
Kind: instance method of TrelloOrganizations
Params
- data
Object
- force
Boolean
= false
- Force the organization creation even if it already exists another with the same name.
Deletes an organization and inner structure (boards) if the deleteBoards
is set to true.
At least the organization id or name must be provided.
Kind: instance method of TrelloOrganizations
Params
- data
Object
- deleteBoards
Boolean
= false
- When true, deletes all inner boards.
Gets an organization for a given Id
Kind: instance method of TrelloOrganizations
Returns: Promise.<{*}>
- Object that describes an organization wrapped inside a promise
Params
- idOrganization
String
Kind: global class
Params
- config
Object
- .key
String
- .token
String
- .baseUrl
String
- .key
trelloClient.board ⇒ TrelloBoards
Returns a board object containing all board operations
Kind: instance property of TrelloClient
Lazy:
trelloClient.organization ⇒ TrelloOrganizations
Returns a organization object containing all organization operations
Kind: instance property of TrelloClient
Lazy:
trelloClient.card ⇒ TrelloCards
Returns a card object containing all card operations
Kind: instance property of TrelloClient
Lazy:
trelloClient.list ⇒ TrelloLists
Returns a list object containing all list operations
Kind: instance property of TrelloClient
Lazy:
Validates the configuration object.
Kind: global function
Params
- config
Object
- .key
String
- .token
String
- .key