Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access actions for cards, list, boards, etc #129

Open
Larusso opened this issue Mar 24, 2015 · 2 comments
Open

Access actions for cards, list, boards, etc #129

Larusso opened this issue Mar 24, 2015 · 2 comments

Comments

@Larusso
Copy link
Collaborator

Larusso commented Mar 24, 2015

One can access a list of actions (optional filtered) for cards, boards etc.
It would be super helpfull to implement that as well. The main problem is the different information stored in Trello::Action.
This is the payload for a commentCard action.

{
    "id": "bla",
    "idMemberCreator": "bla",
    "data": {
      "list": {
        "name": "Done",
        "id": "bla"
      },
      "board": {
        "shortLink": "bla",
        "name": "Test Board",
        "id": "bla"
      },
      "card": {
        "shortLink": "bla",
        "idShort": 63,
        "name": "task 1",
        "id": "bla"
      },
      "text": "lalalal"
    },
    "type": "commentCard",
    "date": "2015-03-24T16:26:59.726Z",
    "memberCreator": {
      "id": "bla",
      "avatarHash": "bla",
      "fullName": "Manfred Endres",
      "initials": "ME",
      "username": "manfredendres"
    }

The imortant part is in the data field (text). Right now we lose this information because we only map the generic information from the payload. The problem is also that there is a lot of different action types:


    addAttachmentToCard
    addChecklistToCard
    addMemberToBoard
    addMemberToCard
    addMemberToOrganization
    addToOrganizationBoard
    commentCard
    convertToCardFromCheckItem
    copyBoard
    copyCard
    copyCommentCard
    createBoard
    createCard
    createList
    createOrganization
    deleteAttachmentFromCard
    deleteBoardInvitation
    deleteCard
    deleteOrganizationInvitation
    disablePowerUp
    emailCard
    enablePowerUp
    makeAdminOfBoard
    makeNormalMemberOfBoard
    makeNormalMemberOfOrganization
    makeObserverOfBoard
    memberJoinedTrello
    moveCardFromBoard
    moveCardToBoard
    moveListFromBoard
    moveListToBoard
    removeChecklistFromCard
    removeFromOrganizationBoard
    removeMemberFromCard
    unconfirmedBoardInvitation
    unconfirmedOrganizationInvitation
    updateBoard
    updateCard
    updateCard:closed
    updateCard:desc
    updateCard:idList
    updateCard:name
    updateCheckItemStateOnCard
    updateChecklist
    updateList
    updateList:closed
    updateList:name
    updateMember
    updateOrganization

each one differs in the payload. We need a way to access these information. This will also help to work with webhooks. Are there any sugestions? I`m willing to implement. I created custom subclasses in my current project (just three or four) But this is no solution for all types.

@Larusso
Copy link
Collaborator Author

Larusso commented Mar 24, 2015

I just saw the has_actions.rb macro. There is still the issue with the different types though.

@jeremytregunna
Copy link
Owner

@Larusso Would you have any ideas on what would be a good way to handle this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants