class Trello::Action
Action
represents some event that occurred. For instance, when a card is created.
@!attribute [r] id
@return [String]
@!attribute [r] creator_id
@return [String]
@!attribute [r] data
@return [Hash]
@!attribute [r] type
@return [String]
@!attribute [r] date
@return [Datetime]
@!attribute [r] limits
@return [Hash]
@!attribute [r] app_creator
@return [String]
@!attribute [r] display
@return [Hash]
@!attribute [w] text
@return [String]
Public Class Methods
find(id, params = {})
click to toggle source
Locate a specific action and return a new Action
object.
# File lib/trello/action.rb, line 43 def find(id, params = {}) client.find(:action, id, params) end
search(query, opts = {})
click to toggle source
# File lib/trello/action.rb, line 47 def search(query, opts = {}) response = client.get("/search/", { query: query }.merge(opts)) parse_json(response).except("options").each_with_object({}) do |(key, data), result| klass = "Trello::#{key.singularize.capitalize}".constantize result[key] = klass.from_json(data) end end
Public Instance Methods
board()
click to toggle source
Returns the board this action occurred on.
# File lib/trello/action.rb, line 57 def board Board.from_response client.get("/actions/#{id}/board") end
card()
click to toggle source
Returns the card the action occurred on.
# File lib/trello/action.rb, line 62 def card Card.from_response client.get("/actions/#{id}/card") end
list()
click to toggle source
Returns the list the action occurred on.
# File lib/trello/action.rb, line 67 def list List.from_response client.get("/actions/#{id}/list") end
member_creator()
click to toggle source
Returns the list the action occurred on.
# File lib/trello/action.rb, line 72 def member_creator Member.from_response client.get("/actions/#{id}/memberCreator") end