tacokit 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/Gemfile +3 -3
- data/README.md +62 -22
- data/lib/tacokit/authorization.rb +1 -1
- data/lib/tacokit/client/actions.rb +11 -11
- data/lib/tacokit/client/boards.rb +13 -13
- data/lib/tacokit/client/cards.rb +41 -40
- data/lib/tacokit/client/checklists.rb +10 -10
- data/lib/tacokit/client/labels.rb +4 -4
- data/lib/tacokit/client/lists.rb +8 -8
- data/lib/tacokit/client/members.rb +8 -8
- data/lib/tacokit/client/notifications.rb +2 -6
- data/lib/tacokit/client/organizations.rb +19 -47
- data/lib/tacokit/client/searches.rb +2 -0
- data/lib/tacokit/client/tokens.rb +12 -16
- data/lib/tacokit/client/types.rb +3 -1
- data/lib/tacokit/client/webhooks.rb +9 -14
- data/lib/tacokit/client.rb +2 -2
- data/lib/tacokit/collection.rb +4 -1
- data/lib/tacokit/configuration.rb +1 -1
- data/lib/tacokit/error.rb +3 -0
- data/lib/tacokit/middleware/{boom.rb → raise_error.rb} +3 -1
- data/lib/tacokit/middleware.rb +2 -2
- data/lib/tacokit/version.rb +1 -1
- data/spec/cassettes/Tacokit_Client/_connection/authorized_GET_request_with_app_key_and_token_params.json +1 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action/returns_a_token_authorized_action.json +1 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action/returns_oauth_authorized_board.json +1 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_board/returns_action_board.json +1 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_card/returns_action_card.json +1 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_entities/returns_action_entities.json +1 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_list/returns_action_list.json +1 -1
- data/spec/cassettes/Tacokit_Client_Actions/_delete_action/deletes_an_action.json +1 -1
- data/spec/cassettes/Tacokit_Client_Actions/_update_action/updates_an_action.json +1 -1
- data/spec/cassettes/Tacokit_Client_Actions/_update_action_text/updates_an_action.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_add_board_member/adds_invites_member_to_board.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board/returns_a_token_authorized_board.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board/returns_oauth_authorized_board.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_actions/returns_board_actions.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_cards/returns_board_cards.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_checklists/returns_board_checklists.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_labels/returns_board_labels.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_lists/returns_board_lists.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_members/returns_board_members.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_organization/returns_board_organization.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_preferences/returns_preferences_for_a_board.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_stars/returns_board_stars.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_update_board/updates_a_board.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_update_board/updates_nested_resource.json +1 -1
- data/spec/cassettes/Tacokit_Client_Boards/_update_board_member/updates_member.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_add_comment/creates_a_comment.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_add_label/adds_label_to_card.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_add_member_to_card/adds_member_to_card.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_archive_card/archives_card.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_archive_card/restore_card.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_attachments/returns_an_attachment.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_attachments/returns_attachments.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card/returns_a_card_by_card_resource.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card/returns_a_card_by_id.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card/returns_a_card_by_short_link.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_actions/returns_card_actions.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_board/returns_card_board.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_list/returns_a_list.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_members/returns_members.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_members/returns_members_voted.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_checklists/returns_check_item_states.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_checklists/returns_checklists.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_create_card/creates_a_card.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_create_card_attachment/attaches_external_url.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_create_card_attachment/uploads_local_file.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_delete_card/deletes_a_card.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_delete_comment/deletes_comment.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_a_new_position.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_another_board_list.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_board.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_list.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_move_card/raises_error_if_missing_options.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_start_checklist/adds_new_checklist_by_name.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_start_checklist/copies_a_checklist_by_id.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_stickers/returns_stickers.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_update_card/updates_a_card.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_update_checklist_item/updates_checklist_item.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_update_comment/updates_a_comment.json +1 -1
- data/spec/cassettes/Tacokit_Client_Cards/_vote/adds_a_member_s_vote_to_card.json +1 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_check_items/adds_a_checklist_check_item.json +1 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_check_items/retrieves_checklist_check_items.json +1 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_checklist/returns_a_checklist_by_id.json +1 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_create_checklist/creates_a_checklist.json +1 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_delete_checklist/deletes_a_checklist.json +1 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_update_checklist/updates_a_checklist.json +1 -1
- data/spec/cassettes/Tacokit_Client_Labels/_create_label/creates_a_label.json +1 -1
- data/spec/cassettes/Tacokit_Client_Labels/_delete_label/deletes_a_label.json +1 -1
- data/spec/cassettes/Tacokit_Client_Labels/_label/returns_a_label_by_id.json +1 -1
- data/spec/cassettes/Tacokit_Client_Labels/_update_label/updates_a_label.json +1 -1
- data/spec/cassettes/Tacokit_Client_Lists/_archive_list_cards/should_archive_cards_in_list.json +1 -1
- data/spec/cassettes/Tacokit_Client_Lists/_create_list/creates_a_list.json +1 -1
- data/spec/cassettes/Tacokit_Client_Lists/_list/returns_a_list_by_id.json +1 -1
- data/spec/cassettes/Tacokit_Client_Lists/_list_actions/returns_list_actions.json +1 -1
- data/spec/cassettes/Tacokit_Client_Lists/_list_board/returns_list_board.json +1 -1
- data/spec/cassettes/Tacokit_Client_Lists/_list_cards/returns_list_cards.json +1 -1
- data/spec/cassettes/Tacokit_Client_Lists/_move_list_cards/should_move_cards_in_list.json +1 -1
- data/spec/cassettes/Tacokit_Client_Lists/_update_list/updates_a_list.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_actions/returns_member_actions.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_boards/returns_for_me_with_options_as_first_arg.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_boards/returns_member_boards.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_cards/returns_member_cards.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_member/accepts_a_resource.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_member/authenticated/returns_self.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_member/returns_a_member.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_member/returns_self.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_member/supports_query_fields_as_string_or_array.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_notifications/returns_member_notifications.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_organizations/returns_member_organizations.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_tokens/returns_member_tokens.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_update_member/updates_a_member.json +1 -1
- data/spec/cassettes/Tacokit_Client_Members/_update_member/updates_nested_resource.json +1 -1
- data/spec/cassettes/Tacokit_Client_Notifications/_notification/returns_a_notification_by_id.json +1 -1
- data/spec/cassettes/Tacokit_Client_Notifications/_update_notification/updates_a_notification.json +1 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_create_organization/creates_a_organization.json +1 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_delete_organization/deletes_a_organization.json +1 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_organization/returns_an_organization_by_id.json +1 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_organization_resource/returns_organization_actions.json +1 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_organization_resource/returns_organization_boards.json +1 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_organization_resource/returns_organization_members.json +1 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_update_organization/updates_a_organization.json +1 -1
- data/spec/cassettes/Tacokit_Client_Searches/_search/returns_search_result.json +1 -1
- data/spec/cassettes/Tacokit_Client_Tokens/_delete_token/deletes_a_token.json +1 -1
- data/spec/cassettes/Tacokit_Client_Tokens/_token/returns_a_token_for_token_string.json +1 -1
- data/spec/cassettes/Tacokit_Client_Tokens/_token_resource/returns_token_member.json +1 -1
- data/spec/cassettes/Tacokit_Client_Tokens/_token_resource/returns_token_webhooks.json +1 -1
- data/spec/cassettes/Tacokit_Client_Types/_type/returns_a_type_by_id.json +1 -1
- data/spec/cassettes/Tacokit_Client_Webhooks/_create_webhook/creates_a_webhook.json +1 -1
- data/spec/cassettes/Tacokit_Client_Webhooks/_delete_webhook/deletes_a_webhook.json +1 -1
- data/spec/cassettes/Tacokit_Client_Webhooks/_update_webhook/updates_a_webhook.json +1 -1
- data/spec/cassettes/Tacokit_Client_Webhooks/_webhook/returns_a_webhook_by_short_link.json +1 -1
- data/spec/spec_helper.rb +3 -4
- data/spec/tacokit/client/actions_spec.rb +1 -1
- data/spec/tacokit/client/boards_spec.rb +5 -5
- data/spec/tacokit/client/cards_spec.rb +3 -3
- data/spec/tacokit/client/checklists_spec.rb +1 -1
- data/spec/tacokit/client/lists_spec.rb +5 -2
- data/spec/tacokit/client/members_spec.rb +1 -1
- data/spec/tacokit/client/notifications_spec.rb +3 -2
- data/spec/tacokit/client/webhooks_spec.rb +14 -15
- data/spec/tacokit/client_spec.rb +1 -1
- data/spec/tacokit/middleware/{boom_spec.rb → raise_error_spec.rb} +1 -1
- data/tacokit.gemspec +1 -0
- metadata +19 -132
- data/spec/cassettes/Tacokit_Client_Actions/_action_field/returns_a_hash.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_field/returns_a_resource.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_field/returns_a_value.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_resource/returns_action_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_resource/returns_action_entities.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_resource/returns_action_memberships.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_update_action/updates_a_action.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_field/returns_a_hash.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_field/returns_a_value.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_field/returns_an_array.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_resource/returns_board_actions.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_resource/returns_board_cards.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_resource/returns_board_members.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_create_board/creates_a_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_create_board_resource/creates_a_board_calendar_key.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_create_board_resource/creates_a_board_label.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_create_board_resource/creates_a_board_resource.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_member_board_stars/returns_board_stars.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_update_board_field/updates_a_board_field.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_attachments/returns_attachment.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_field/returns_a_hash.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_field/returns_a_value.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_field/returns_an_array.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_resource/returns_card_actions.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_resource/returns_card_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_resource/returns_card_check_item_states.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_stickers/returns_.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_create_card_comment/creates_a_comment.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_delete_card_resource/deletes_resource.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_list/returns_list.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_start_checklist/adds_a_checklist_item.json +0 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_checklist_field/returns_a_value.json +0 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_checklist_resource/returns_checklist_actions.json +0 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_checklist_resource/returns_checklist_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_checklist_resource/returns_checklist_prefs.json +0 -1
- data/spec/cassettes/Tacokit_Client_Labels/_label_resource/returns_a_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Labels/_labels/returns_a_label_by_id.json +0 -1
- data/spec/cassettes/Tacokit_Client_Lists/_list_field/returns_a_value.json +0 -1
- data/spec/cassettes/Tacokit_Client_Lists/_list_resource/returns_list_actions.json +0 -1
- data/spec/cassettes/Tacokit_Client_Lists/_list_resource/returns_list_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Lists/_list_resource/returns_list_cards.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_board_stars/returns_member_board_stars.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member_field/returns_a_hash.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member_field/returns_a_member_field.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member_field/returns_a_resource.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member_field/returns_a_value.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member_field/returns_an_array.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member_resource/returns_member_actions.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member_resource/returns_member_board_stars.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member_resource/returns_member_boards.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_tokens/returns_member_organizations.json +0 -1
- data/spec/cassettes/Tacokit_Client_Notifications/_notification_field/returns_a_hash.json +0 -1
- data/spec/cassettes/Tacokit_Client_Notifications/_notification_field/returns_a_resource.json +0 -1
- data/spec/cassettes/Tacokit_Client_Notifications/_notification_field/returns_a_value.json +0 -1
- data/spec/cassettes/Tacokit_Client_Notifications/_notification_resource/returns_action_entities.json +0 -1
- data/spec/cassettes/Tacokit_Client_Notifications/_notification_resource/returns_notification_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_organization_field/returns_a_hash.json +0 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_organization_field/returns_a_resource.json +0 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_organization_field/returns_a_value.json +0 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_organization_field/returns_an_array.json +0 -1
- data/spec/cassettes/Tacokit_Client_Tokens/_token_field/returns_a_value.json +0 -1
- data/spec/cassettes/Tacokit_Client_Tokens/_token_field/returns_an_array.json +0 -1
- data/spec/cassettes/Tacokit_Client_Webhooks/_webhook_field/returns_a_value.json +0 -1
data/lib/tacokit/client/cards.rb
CHANGED
@@ -4,25 +4,25 @@ module Tacokit
|
|
4
4
|
class Client
|
5
5
|
# Methods for the Cards API
|
6
6
|
#
|
7
|
-
# @see https://trello.com/
|
7
|
+
# @see https://developers.trello.com/advanced-reference/card
|
8
8
|
module Cards
|
9
9
|
# Retrieve a card by id or shortlink
|
10
10
|
#
|
11
|
-
# @see https://trello.com/
|
11
|
+
# @see https://developers.trello.com/advanced-reference/card#get-1-cards-card-id-or-shortlink
|
12
12
|
def card(card_id, options = nil)
|
13
13
|
get card_path(card_id), options
|
14
14
|
end
|
15
15
|
|
16
16
|
# Retrieve card actions
|
17
17
|
#
|
18
|
-
# @see https://trello.com/
|
18
|
+
# @see https://developers.trello.com/advanced-reference/card#get-1-cards-card-id-or-shortlink-actions
|
19
19
|
def card_actions(card_id, options = {})
|
20
20
|
paginated_card_resource(card_id, "actions", options)
|
21
21
|
end
|
22
22
|
|
23
23
|
# Retrieve card attachments
|
24
24
|
#
|
25
|
-
# @see https://trello.com/
|
25
|
+
# @see https://developers.trello.com/advanced-reference/card#get-1-cards-card-id-or-shortlink-attachments
|
26
26
|
def attachments(card_id, options = {})
|
27
27
|
card_resource(card_id, "attachments", options)
|
28
28
|
end
|
@@ -30,70 +30,71 @@ module Tacokit
|
|
30
30
|
|
31
31
|
# Retrieve a card attachment
|
32
32
|
#
|
33
|
-
# @see https://trello.com/
|
33
|
+
# @see https://developers.trello.com/advanced-reference/card#get-1-cards-card-id-or-shortlink-attachments-idattachment
|
34
34
|
def attachment(card_id, attachment_id, options = {})
|
35
35
|
card_resource(card_id, "attachments/#{attachment_id}", options)
|
36
36
|
end
|
37
37
|
|
38
38
|
# Retrieve a card board
|
39
39
|
#
|
40
|
-
# @see https://trello.com/
|
40
|
+
# @see https://developers.trello.com/advanced-reference/card#get-1-cards-card-id-or-shortlink-board
|
41
41
|
def card_board(card_id, options = {})
|
42
42
|
card_resource(card_id, "board", options)
|
43
43
|
end
|
44
44
|
|
45
45
|
# Retrieve card checklist item states
|
46
46
|
#
|
47
|
-
# @see https://trello.com/
|
47
|
+
# @see https://developers.trello.com/advanced-reference/card#get-1-cards-card-id-or-shortlink-board
|
48
48
|
def check_item_states(card_id, options = {})
|
49
49
|
card_resource(card_id, "check_item_states", options)
|
50
50
|
end
|
51
51
|
|
52
52
|
# Retrieve card checklists
|
53
53
|
#
|
54
|
-
# @see https://trello.com/
|
54
|
+
# @see https://developers.trello.com/advanced-reference/card#get-1-cards-card-id-or-shortlink-board
|
55
55
|
def checklists(card_id, options = {})
|
56
56
|
card_resource(card_id, "checklists", options)
|
57
57
|
end
|
58
58
|
|
59
59
|
# Retrive a card list
|
60
60
|
#
|
61
|
-
# @see https://trello.com/
|
61
|
+
# @see https://developers.trello.com/advanced-reference/card #get-1-cards-card-id-or-shortlink-list
|
62
|
+
# https://developers.trello.com/advanced-reference/card#get-1-cards-card-id-or-shortlink-list
|
62
63
|
def card_list(card_id, options = {})
|
63
64
|
card_resource(card_id, "list", options)
|
64
65
|
end
|
65
66
|
|
66
67
|
# Retrieve card members
|
67
68
|
#
|
68
|
-
# @see https://trello.com/
|
69
|
+
# @see https://developers.trello.com/advanced-reference/card#get-1-cards-card-id-or-shortlink-members
|
69
70
|
def card_members(card_id, options = {})
|
70
71
|
card_resource(card_id, "members", options)
|
71
72
|
end
|
72
73
|
|
73
74
|
# Retrieve members who voted on a card
|
74
75
|
#
|
75
|
-
# @see https://trello.com/
|
76
|
+
# @see https://developers.trello.com/advanced-reference/card#get-1-cards-card-id-or-shortlink-membersvoted
|
76
77
|
def card_members_voted(card_id, options = {})
|
77
78
|
card_resource(card_id, "members_voted", options)
|
78
79
|
end
|
79
80
|
|
80
81
|
# Retrieve card stickers
|
81
82
|
#
|
82
|
-
# @see https://trello.com/
|
83
|
+
# @see https://developers.trello.com/advanced-reference/card#get-1-cards-card-id-or-shortlink-stickers
|
83
84
|
def stickers(card_id, options = {})
|
84
85
|
card_resource(card_id, "stickers", options)
|
85
86
|
end
|
86
87
|
|
87
88
|
# Update card attributes
|
88
89
|
#
|
89
|
-
# @see https://trello.com/
|
90
|
+
# @see https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink
|
90
91
|
def update_card(card_id, options = {})
|
91
92
|
put card_path(card_id), options
|
92
93
|
end
|
93
94
|
|
94
95
|
# Update comment text
|
95
96
|
#
|
96
|
-
# @see https://trello.com/
|
97
|
+
# @see https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-actions-idaction-comments
|
97
98
|
def update_comment(card_id, comment_id, text, options = {})
|
98
99
|
update_card_resource(card_id, "actions", comment_id, "comments", options.merge(text: text))
|
99
100
|
end
|
@@ -101,29 +102,29 @@ module Tacokit
|
|
101
102
|
|
102
103
|
# Update checklist item text, position or state
|
103
104
|
#
|
104
|
-
# @see https://trello.com/
|
105
|
+
# @see https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-checklist-idchecklistcurrent-checkitem-idcheckitem
|
105
106
|
def update_check_item(card_id, checklist_id, check_item_id, options = {})
|
106
107
|
update_card_resource(card_id, "checklist", checklist_id, "checkItem", check_item_id, options)
|
107
108
|
end
|
108
109
|
|
109
110
|
# Archive a card
|
110
111
|
#
|
111
|
-
# @see https://trello.com/
|
112
|
+
# @see https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-closed
|
112
113
|
def archive_card(card_id)
|
113
114
|
update_card(card_id, closed: true)
|
114
115
|
end
|
115
116
|
|
116
117
|
# Restore an archived card
|
117
118
|
#
|
118
|
-
# @see https://trello.com/
|
119
|
+
# @see https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-closed
|
119
120
|
def restore_card(card_id)
|
120
121
|
update_card(card_id, closed: false)
|
121
122
|
end
|
122
123
|
|
123
124
|
# Move card to another position, board and/or list
|
124
125
|
#
|
125
|
-
# @see https://trello.com/
|
126
|
-
# @see https://trello.com/
|
126
|
+
# @see https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-idboard
|
127
|
+
# @see https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-idlist
|
127
128
|
def move_card(card_id, options)
|
128
129
|
unless options.is_a?(Hash) && ([:board_id, :list_id, :pos].any? { |key| options.key? key })
|
129
130
|
raise ArgumentError, "Required option: :pos, :board_id and/or :list_id"
|
@@ -133,21 +134,21 @@ module Tacokit
|
|
133
134
|
|
134
135
|
# Update card name
|
135
136
|
#
|
136
|
-
# @see https://trello.com/
|
137
|
+
# @see https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-name
|
137
138
|
def update_card_name(card_id, name)
|
138
139
|
put card_path(card_id, "name"), value: name
|
139
140
|
end
|
140
141
|
|
141
142
|
# Subscribe to card
|
142
143
|
#
|
143
|
-
# @see https://trello.com/
|
144
|
+
# @see https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-subscribed
|
144
145
|
def subscribe_to_card(card_id)
|
145
146
|
put card_path(card_id, "subscribed"), value: true
|
146
147
|
end
|
147
148
|
|
148
149
|
# Unubscribe from card
|
149
150
|
#
|
150
|
-
# @see https://trello.com/
|
151
|
+
# @see https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-subscribed
|
151
152
|
def unsubscribe_from_card(card_id)
|
152
153
|
put card_path(card_id, "subscribed"), value: false
|
153
154
|
end
|
@@ -160,14 +161,14 @@ module Tacokit
|
|
160
161
|
|
161
162
|
# Create a card
|
162
163
|
#
|
163
|
-
# @see https://trello.com/
|
164
|
+
# @see https://developers.trello.com/advanced-reference/card#post-1-cards
|
164
165
|
def create_card(list_id, name = nil, options = {})
|
165
166
|
post "cards", options.merge(name: name, list_id: list_id)
|
166
167
|
end
|
167
168
|
|
168
169
|
# Add a comment to a card
|
169
170
|
#
|
170
|
-
# @see https://trello.com/
|
171
|
+
# @see https://developers.trello.com/advanced-reference/card#post-1-cards-card-id-or-shortlink-actions-comments
|
171
172
|
def add_comment(card_id, text, options = {})
|
172
173
|
options.update text: text
|
173
174
|
create_card_resource card_id, "actions", "comments", options
|
@@ -176,7 +177,7 @@ module Tacokit
|
|
176
177
|
|
177
178
|
# Attach a file to a card
|
178
179
|
#
|
179
|
-
# @see https://trello.com/
|
180
|
+
# @see https://developers.trello.com/advanced-reference/card#post-1-cards-card-id-or-shortlink-attachments
|
180
181
|
def attach_file(card_id, url, mime_type = nil, options = {})
|
181
182
|
options = mime_type if mime_type.is_a?(Hash)
|
182
183
|
|
@@ -195,14 +196,14 @@ module Tacokit
|
|
195
196
|
|
196
197
|
# Convert a checklist item to a card
|
197
198
|
#
|
198
|
-
# @see https://trello.com/
|
199
|
+
# @see https://developers.trello.com/advanced-reference/card#post-1-cards-card-id-or-shortlink-checklist-idchecklist-checkitem-idcheckitem-converttocard
|
199
200
|
def convert_to_card(card_id, checklist_id, check_item_id)
|
200
201
|
create_card_resource(card_id, "checklist", checklist_id, "checkItem", check_item_id, "convertToCard")
|
201
202
|
end
|
202
203
|
|
203
204
|
# Start a new checklist on card
|
204
205
|
#
|
205
|
-
# @see https://trello.com/
|
206
|
+
# @see https://developers.trello.com/advanced-reference/card#post-1-cards-card-id-or-shortlink-checklists
|
206
207
|
def add_checklist(card_id, name)
|
207
208
|
create_card_resource(card_id, "checklists", name: name)
|
208
209
|
end
|
@@ -210,28 +211,28 @@ module Tacokit
|
|
210
211
|
|
211
212
|
# Copy another checklist to card
|
212
213
|
#
|
213
|
-
# @see https://trello.com/
|
214
|
+
# @see https://developers.trello.com/advanced-reference/card#post-1-cards-card-id-or-shortlink-checklists
|
214
215
|
def copy_checklist(card_id, checklist_id)
|
215
216
|
create_card_resource(card_id, "checklists", checklist_source_id: checklist_id)
|
216
217
|
end
|
217
218
|
|
218
219
|
# Add a member to a card
|
219
220
|
#
|
220
|
-
# @see https://trello.com/
|
221
|
+
# @see https://developers.trello.com/advanced-reference/card#post-1-cards-card-id-or-shortlink-idmembers
|
221
222
|
def add_member_to_card(card_id, member_id)
|
222
223
|
create_card_resource(card_id, "idMembers", value: member_id)
|
223
224
|
end
|
224
225
|
|
225
226
|
# Add label to card
|
226
227
|
#
|
227
|
-
# @see https://trello.com/
|
228
|
+
# @see https://developers.trello.com/advanced-reference/card#post-1-cards-card-id-or-shortlink-labels
|
228
229
|
def add_label(card_id, color, options = {})
|
229
230
|
create_card_resource(card_id, "labels", options.merge(color: color))
|
230
231
|
end
|
231
232
|
|
232
233
|
# Cast vote for card
|
233
234
|
#
|
234
|
-
# @see https://trello.com/
|
235
|
+
# @see https://developers.trello.com/advanced-reference/card#post-1-cards-card-id-or-shortlink-membersvoted
|
235
236
|
def vote(card_id, member_id)
|
236
237
|
create_card_resource(card_id, "membersVoted", value: member_id)
|
237
238
|
end
|
@@ -239,7 +240,7 @@ module Tacokit
|
|
239
240
|
|
240
241
|
# Add sticker to card
|
241
242
|
#
|
242
|
-
# @see https://trello.com/
|
243
|
+
# @see https://developers.trello.com/advanced-reference/card#post-1-cards-card-id-or-shortlink-stickers
|
243
244
|
def add_sticker(card_id, image_name, options = {})
|
244
245
|
defaults = { top: 0, left: 0, z_index: 1 }
|
245
246
|
create_card_resource(card_id, "stickers", defaults.merge(options.merge(image: image_name)))
|
@@ -255,14 +256,14 @@ module Tacokit
|
|
255
256
|
|
256
257
|
# DELETE cards/[card id or shortlink]
|
257
258
|
#
|
258
|
-
# @see https://trello.com/
|
259
|
+
# @see https://developers.trello.com/advanced-reference/card#delete-1-cards-card-id-or-shortlink
|
259
260
|
def delete_card(card_id)
|
260
261
|
delete card_path(card_id)
|
261
262
|
end
|
262
263
|
|
263
264
|
# Remove a comment
|
264
265
|
#
|
265
|
-
# @see https://trello.com/
|
266
|
+
# @see https://developers.trello.com/advanced-reference/card#post-1-cards-card-id-or-shortlink-labels
|
266
267
|
def remove_comment(card_id, comment_id)
|
267
268
|
delete_card_resource card_id, "actions", comment_id, "comments"
|
268
269
|
end
|
@@ -270,7 +271,7 @@ module Tacokit
|
|
270
271
|
|
271
272
|
# Remove an attachment
|
272
273
|
#
|
273
|
-
# @see https://trello.com/
|
274
|
+
# @see https://developers.trello.com/advanced-reference/card#delete-1-cards-card-id-or-shortlink-attachments-idattachment
|
274
275
|
def remove_attachment(card_id, attachment_id)
|
275
276
|
delete_card_resource card_id, "attachments", attachment_id
|
276
277
|
end
|
@@ -278,7 +279,7 @@ module Tacokit
|
|
278
279
|
|
279
280
|
# Remove checklist
|
280
281
|
#
|
281
|
-
# @see https://trello.com/
|
282
|
+
# @see https://developers.trello.com/advanced-reference/card#delete-1-cards-card-id-or-shortlink-checklists-idchecklist
|
282
283
|
def remove_checklist(card_id, checklist_id)
|
283
284
|
delete_card_resource card_id, "checklists", checklist_id
|
284
285
|
end
|
@@ -286,7 +287,7 @@ module Tacokit
|
|
286
287
|
|
287
288
|
# Remove a member from a card
|
288
289
|
#
|
289
|
-
# @see https://trello.com/
|
290
|
+
# @see https://developers.trello.com/advanced-reference/card#delete-1-cards-card-id-or-shortlink-idmembers-idmember
|
290
291
|
def remove_card_member(card_id, member_id)
|
291
292
|
delete_card_resource card_id, "idMembers", member_id
|
292
293
|
end
|
@@ -294,7 +295,7 @@ module Tacokit
|
|
294
295
|
|
295
296
|
# Remove label from card
|
296
297
|
#
|
297
|
-
# @see https://trello.com/
|
298
|
+
# @see https://developers.trello.com/advanced-reference/card#delete-1-cards-card-id-or-shortlink-labels-color
|
298
299
|
def remove_label(card_id, color)
|
299
300
|
delete_card_resource card_id, "labels", color
|
300
301
|
end
|
@@ -302,7 +303,7 @@ module Tacokit
|
|
302
303
|
|
303
304
|
# Remove a vote from a card
|
304
305
|
#
|
305
|
-
# @see https://trello.com/
|
306
|
+
# @see https://developers.trello.com/advanced-reference/card#delete-1-cards-card-id-or-shortlink-membersvoted-idmember
|
306
307
|
def remove_vote(card_id, member_id)
|
307
308
|
delete_card_resource card_id, "membersVoted", member_id
|
308
309
|
end
|
@@ -310,7 +311,7 @@ module Tacokit
|
|
310
311
|
|
311
312
|
# Remove a sticker from a card
|
312
313
|
#
|
313
|
-
# @see https://trello.com/
|
314
|
+
# @see https://developers.trello.com/advanced-reference/card#delete-1-cards-card-id-or-shortlink-membersvoted-idmember
|
314
315
|
def remove_sticker(card_id, sticker_id)
|
315
316
|
delete_card_resource card_id, "stickers", sticker_id
|
316
317
|
end
|
@@ -3,28 +3,28 @@ module Tacokit
|
|
3
3
|
module Checklists
|
4
4
|
# Retrieve a checklist
|
5
5
|
#
|
6
|
-
# @see https://trello.com/
|
6
|
+
# @see https://developers.trello.com/advanced-reference/checklist#get-1-checklists-idchecklist
|
7
7
|
def checklist(checklist_id, options = nil)
|
8
8
|
get checklist_path(checklist_id), options
|
9
9
|
end
|
10
10
|
|
11
11
|
# Retrieve the checklist's board
|
12
12
|
#
|
13
|
-
# @see https://trello.com/
|
13
|
+
# @see https://developers.trello.com/advanced-reference/checklist#get-1-checklists-idchecklist-board
|
14
14
|
def checklist_board(checklist_id, options = {})
|
15
|
-
checklist_resource "board", options
|
15
|
+
checklist_resource checklist_list_id, "board", options
|
16
16
|
end
|
17
17
|
|
18
18
|
# Retrieve a checklist's card
|
19
19
|
#
|
20
|
-
# @see https://trello.com/
|
20
|
+
# @see https://developers.trello.com/advanced-reference/checklist#get-1-checklists-idchecklist-cards
|
21
21
|
def checklist_card(checklist_id, options = {})
|
22
|
-
checklist_resource "card", options
|
22
|
+
checklist_resource checklist_id, "card", options
|
23
23
|
end
|
24
24
|
|
25
25
|
# Retrieve a checklist's check items
|
26
26
|
#
|
27
|
-
# @see https://trello.com/
|
27
|
+
# @see https://developers.trello.com/advanced-reference/checklist#get-1-checklists-idchecklist-checkitems
|
28
28
|
def check_items(checklist_id, options = {})
|
29
29
|
checklist_resource checklist_id, "check_items", options
|
30
30
|
end
|
@@ -32,7 +32,7 @@ module Tacokit
|
|
32
32
|
|
33
33
|
# Updates a checklist
|
34
34
|
#
|
35
|
-
# @see https://trello.com/
|
35
|
+
# @see https://developers.trello.com/advanced-reference/checklist#put-1-checklists-idchecklist
|
36
36
|
def update_checklist(checklist_id, options = {})
|
37
37
|
put checklist_path(checklist_id), options
|
38
38
|
end
|
@@ -40,7 +40,7 @@ module Tacokit
|
|
40
40
|
|
41
41
|
# Create a checklist
|
42
42
|
#
|
43
|
-
# @see https://trello.com/
|
43
|
+
# @see https://developers.trello.com/advanced-reference/checklist#post-1-checklists
|
44
44
|
def create_checklist(card_id, name, options = {})
|
45
45
|
options.update card_id: card_id, name: name
|
46
46
|
post "checklists", options
|
@@ -49,7 +49,7 @@ module Tacokit
|
|
49
49
|
|
50
50
|
# Add a checklist item to a checklist
|
51
51
|
#
|
52
|
-
# @see https://trello.com/
|
52
|
+
# @see https://developers.trello.com/advanced-reference/checklist#post-1-checklists-idchecklist-checkitems
|
53
53
|
def add_checklist_check_item(checklist_id, name, options = {})
|
54
54
|
post checklist_path(checklist_id, "checkItems"), options.merge(name: name)
|
55
55
|
end
|
@@ -58,7 +58,7 @@ module Tacokit
|
|
58
58
|
|
59
59
|
# Delete a checklist
|
60
60
|
#
|
61
|
-
# @see https://trello.com/
|
61
|
+
# @see https://developers.trello.com/advanced-reference/checklist#delete-1-checklists-idchecklist
|
62
62
|
def delete_checklist(checklist_id)
|
63
63
|
delete checklist_path(checklist_id)
|
64
64
|
end
|
@@ -3,21 +3,21 @@ module Tacokit
|
|
3
3
|
module Labels
|
4
4
|
# Retrieve a label
|
5
5
|
#
|
6
|
-
# @see https://trello.com/
|
6
|
+
# @see https://developers.trello.com/advanced-reference/label#get-1-labels-idlabel
|
7
7
|
def label(label_id, options = nil)
|
8
8
|
get label_path(label_id), options
|
9
9
|
end
|
10
10
|
|
11
11
|
# Update a label
|
12
12
|
#
|
13
|
-
# @see https://trello.com/
|
13
|
+
# @see https://developers.trello.com/advanced-reference/label#put-1-labels-idlabel
|
14
14
|
def update_label(label_id, options = {})
|
15
15
|
put label_path(label_id), options
|
16
16
|
end
|
17
17
|
|
18
18
|
# Create a label
|
19
19
|
#
|
20
|
-
# @see https://trello.com/
|
20
|
+
# @see https://developers.trello.com/advanced-reference/label#post-1-labels
|
21
21
|
def create_label(board_id, name, color)
|
22
22
|
post "labels",
|
23
23
|
board_id: board_id,
|
@@ -27,7 +27,7 @@ module Tacokit
|
|
27
27
|
|
28
28
|
# Delete a label
|
29
29
|
#
|
30
|
-
# @see https://trello.com/
|
30
|
+
# @see https://developers.trello.com/advanced-reference/label#delete-1-labels-idlabel
|
31
31
|
def delete_label(label_id)
|
32
32
|
delete label_path(label_id)
|
33
33
|
end
|
data/lib/tacokit/client/lists.rb
CHANGED
@@ -3,56 +3,56 @@ module Tacokit
|
|
3
3
|
module Lists
|
4
4
|
# Retrieve a list by id
|
5
5
|
#
|
6
|
-
# @see https://trello.com/
|
6
|
+
# @see https://developers.trello.com/advanced-reference/list#get-1-labels-idlabel-board
|
7
7
|
def list(list_id, options = nil)
|
8
8
|
get list_path(list_id), options
|
9
9
|
end
|
10
10
|
|
11
11
|
# Retrive a list's actions
|
12
12
|
#
|
13
|
-
# @see https://trello.com/
|
13
|
+
# @see https://developers.trello.com/advanced-reference/list#get-1-lists-idlist-actions
|
14
14
|
def list_actions(list_id, options = {})
|
15
15
|
paginated_list_resource list_id, "actions", options
|
16
16
|
end
|
17
17
|
|
18
18
|
# Retrive a list's board
|
19
19
|
#
|
20
|
-
# @see https://trello.com/
|
20
|
+
# @see https://developers.trello.com/advanced-reference/list#get-1-lists-idlist-board
|
21
21
|
def list_board(list_id, options = {})
|
22
22
|
list_resource list_id, "board", options
|
23
23
|
end
|
24
24
|
|
25
25
|
# Retrive a list's cards
|
26
26
|
#
|
27
|
-
# @see https://trello.com/
|
27
|
+
# @see https://developers.trello.com/advanced-reference/list#get-1-lists-idlist-cards
|
28
28
|
def list_cards(list_id, options = {})
|
29
29
|
paginated_list_resource list_id, "cards", options
|
30
30
|
end
|
31
31
|
|
32
32
|
# Update a list's attributes
|
33
33
|
#
|
34
|
-
# @see https://trello.com/
|
34
|
+
# @see https://developers.trello.com/advanced-reference/list#put-1-lists-idlis
|
35
35
|
def update_list(list_id, options = {})
|
36
36
|
put list_path(list_id), options
|
37
37
|
end
|
38
38
|
|
39
39
|
# Create a new list
|
40
40
|
#
|
41
|
-
# @see https://trello.com/
|
41
|
+
# @see https://developers.trello.com/advanced-reference/list#post-1-lists
|
42
42
|
def create_list(board_id, name, options = {})
|
43
43
|
post "lists", options.merge(name: name, board_id: board_id)
|
44
44
|
end
|
45
45
|
|
46
46
|
# Archive all cards in a list
|
47
47
|
#
|
48
|
-
# @see https://trello.com/
|
48
|
+
# @see https://developers.trello.com/advanced-reference/list#post-1-lists-idlist-moveallcards
|
49
49
|
def archive_list_cards(list_id)
|
50
50
|
post list_path(list_id, camp("archive_all_cards"))
|
51
51
|
end
|
52
52
|
|
53
53
|
# Move cards from one list to another
|
54
54
|
#
|
55
|
-
# @see https://trello.com/
|
55
|
+
# @see https://developers.trello.com/advanced-reference/list#post-1-lists-idlist-moveallcards
|
56
56
|
def move_list_cards(list_id, destination_list_id, board_id)
|
57
57
|
post list_path(list_id, camp("move_all_cards")),
|
58
58
|
list_id: destination_list_id, board_id: board_id
|
@@ -3,7 +3,7 @@ module Tacokit
|
|
3
3
|
module Members
|
4
4
|
# Retrieve a Trello member
|
5
5
|
#
|
6
|
-
# @see https://trello.com/
|
6
|
+
# @see https://developers.trello.com/advanced-reference/member#get-1-members-idmember-or-username
|
7
7
|
def member(username = "me", options = nil)
|
8
8
|
username, options = extract_member_args(username, options)
|
9
9
|
get member_path(username), options
|
@@ -11,7 +11,7 @@ module Tacokit
|
|
11
11
|
|
12
12
|
# Retrieve a member's actions
|
13
13
|
#
|
14
|
-
# @see https://trello.com/
|
14
|
+
# @see https://developers.trello.com/advanced-reference/member#get-1-members-idmember-or-username-actions
|
15
15
|
def actions(username = "me", options = {})
|
16
16
|
username, options = extract_member_args(username, options)
|
17
17
|
paginated_get member_path(username, "actions"), options
|
@@ -20,7 +20,7 @@ module Tacokit
|
|
20
20
|
|
21
21
|
# Retrieve a member's boards
|
22
22
|
#
|
23
|
-
# @see https://trello.com/
|
23
|
+
# @see https://developers.trello.com/advanced-reference/member#get-1-members-idmember-or-username-boards
|
24
24
|
def boards(username = "me", options = {})
|
25
25
|
username, options = extract_member_args(username, options)
|
26
26
|
get member_path(username, "boards"), options
|
@@ -28,7 +28,7 @@ module Tacokit
|
|
28
28
|
|
29
29
|
# Retrieve a member's cards
|
30
30
|
#
|
31
|
-
# @see https://trello.com/
|
31
|
+
# @see https://developers.trello.com/advanced-reference/member#get-1-members-idmember-or-username-cards
|
32
32
|
def cards(username = "me", options = {})
|
33
33
|
username, options = extract_member_args(username, options)
|
34
34
|
get member_path(username, "cards"), options
|
@@ -36,7 +36,7 @@ module Tacokit
|
|
36
36
|
|
37
37
|
# Retrieve a member's notifications
|
38
38
|
#
|
39
|
-
# @see https://trello.com/
|
39
|
+
# @see https://developers.trello.com/advanced-reference/member#get-1-members-idmember-or-username-notifications
|
40
40
|
def notifications(username = "me", options = {})
|
41
41
|
username, options = extract_member_args(username, options)
|
42
42
|
paginated_get member_path(username, "notifications"), options
|
@@ -44,7 +44,7 @@ module Tacokit
|
|
44
44
|
|
45
45
|
# Retrieve a member's organizations
|
46
46
|
#
|
47
|
-
# @see https://trello.com/
|
47
|
+
# @see https://developers.trello.com/advanced-reference/member#get-1-members-idmember-or-username-organizations
|
48
48
|
def organizations(username = "me", options = {})
|
49
49
|
username, options = extract_member_args(username, options)
|
50
50
|
get member_path(username, "organizations"), options
|
@@ -52,7 +52,7 @@ module Tacokit
|
|
52
52
|
|
53
53
|
# Retrieve a member's tokens
|
54
54
|
#
|
55
|
-
# @see https://trello.com/
|
55
|
+
# @see https://developers.trello.com/advanced-reference/member#get-1-members-idmember-or-username-tokens
|
56
56
|
def tokens(username = "me", options = {})
|
57
57
|
username, options = extract_member_args(username, options)
|
58
58
|
get member_path(username, "tokens"), options
|
@@ -60,7 +60,7 @@ module Tacokit
|
|
60
60
|
|
61
61
|
# Update a member
|
62
62
|
#
|
63
|
-
# @see https://trello.com/
|
63
|
+
# @see https://developers.trello.com/advanced-reference/member#put-1-members-idmember-or-username
|
64
64
|
def update_member(username, options = {})
|
65
65
|
put member_path(username), options
|
66
66
|
end
|
@@ -3,22 +3,18 @@ module Tacokit
|
|
3
3
|
module Notifications
|
4
4
|
# Retrieve a notification
|
5
5
|
#
|
6
|
-
# @see https://trello.com/
|
6
|
+
# @see https://developers.trello.com/advanced-reference/notification#get-1-notifications-idnotification
|
7
7
|
def notification(notification_id, options = nil)
|
8
8
|
get notification_path(notification_id), options
|
9
9
|
end
|
10
10
|
|
11
11
|
# Update read/unread status of notification
|
12
12
|
#
|
13
|
-
# @see https://trello.com/
|
13
|
+
# @see https://developers.trello.com/advanced-reference/notification#put-1-notifications-idnotification
|
14
14
|
def update_notification(notification_id, options = {})
|
15
15
|
put notification_path(notification_id), options
|
16
16
|
end
|
17
17
|
|
18
|
-
# PUT /1/notifications/[idNotification]/unread
|
19
|
-
|
20
|
-
# POST /1/notifications/all/read
|
21
|
-
|
22
18
|
private
|
23
19
|
|
24
20
|
def notification_resource(notification_id, resource, *paths)
|