tacokit 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +4 -0
- data/.travis.yml +3 -0
- data/Gemfile +2 -1
- data/README.md +140 -47
- data/Rakefile +13 -0
- data/bin/_guard-core +16 -0
- data/bin/console +14 -0
- data/bin/guard +16 -0
- data/bin/rake +16 -0
- data/bin/rspec +16 -0
- data/bin/rubocop +16 -0
- data/bin/setup +7 -0
- data/lib/tacokit/authorization.rb +8 -9
- data/lib/tacokit/client.rb +14 -20
- data/lib/tacokit/client/actions.rb +30 -14
- data/lib/tacokit/client/boards.rb +112 -16
- data/lib/tacokit/client/cards.rb +251 -72
- data/lib/tacokit/client/checklists.rb +25 -14
- data/lib/tacokit/client/labels.rb +11 -4
- data/lib/tacokit/client/lists.rb +66 -13
- data/lib/tacokit/client/members.rb +118 -42
- data/lib/tacokit/client/notifications.rb +29 -2
- data/lib/tacokit/client/organizations.rb +13 -5
- data/lib/tacokit/client/searches.rb +17 -2
- data/lib/tacokit/client/tokens.rb +8 -2
- data/lib/tacokit/client/types.rb +4 -2
- data/lib/tacokit/client/webhooks.rb +17 -4
- data/lib/tacokit/collection.rb +6 -5
- data/lib/tacokit/configuration.rb +10 -2
- data/lib/tacokit/middleware.rb +16 -0
- data/lib/tacokit/resource.rb +7 -6
- data/lib/tacokit/transform.rb +2 -4
- data/lib/tacokit/utils.rb +7 -4
- data/lib/tacokit/version.rb +2 -1
- data/tacokit.gemspec +4 -4
- metadata +17 -273
- data/spec/cassettes/Tacokit_Client/_connection/authorized_GET_request_with_app_key_and_token_params.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action/returns_a_token_authorized_action.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action/returns_oauth_authorized_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_board/returns_action_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_card/returns_action_card.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_entities/returns_action_entities.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_action_list/returns_action_list.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_delete_action/deletes_an_action.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_update_action/updates_an_action.json +0 -1
- data/spec/cassettes/Tacokit_Client_Actions/_update_action_text/updates_an_action.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_add_board_member/adds_invites_member_to_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board/returns_a_token_authorized_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board/returns_oauth_authorized_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_actions/returns_board_actions.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_cards/returns_board_cards.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_checklists/returns_board_checklists.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_labels/returns_board_labels.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_lists/returns_board_lists.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_members/returns_board_members.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_organization/returns_board_organization.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_preferences/returns_preferences_for_a_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_board_stars/returns_board_stars.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_update_board/updates_a_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_update_board/updates_nested_resource.json +0 -1
- data/spec/cassettes/Tacokit_Client_Boards/_update_board_member/updates_member.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_add_comment/creates_a_comment.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_add_label/adds_label_to_card.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_add_member_to_card/adds_member_to_card.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_archive_card/archives_card.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_archive_card/restore_card.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_attachments/returns_an_attachment.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_attachments/returns_attachments.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card/returns_a_card_by_card_resource.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card/returns_a_card_by_id.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card/returns_a_card_by_short_link.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_actions/returns_card_actions.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_board/returns_card_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_list/returns_a_list.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_members/returns_members.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_card_members/returns_members_voted.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_checklists/returns_check_item_states.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_checklists/returns_checklists.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_create_card/creates_a_card.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_create_card_attachment/attaches_external_url.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_create_card_attachment/uploads_local_file.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_delete_card/deletes_a_card.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_delete_comment/deletes_comment.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_a_new_position.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_another_board_list.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_list.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_move_card/raises_error_if_missing_options.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_start_checklist/adds_new_checklist_by_name.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_start_checklist/copies_a_checklist_by_id.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_stickers/returns_stickers.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_update_card/updates_a_card.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_update_checklist_item/updates_checklist_item.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_update_comment/updates_a_comment.json +0 -1
- data/spec/cassettes/Tacokit_Client_Cards/_vote/adds_a_member_s_vote_to_card.json +0 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_check_items/adds_a_checklist_check_item.json +0 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_check_items/retrieves_checklist_check_items.json +0 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_checklist/returns_a_checklist_by_id.json +0 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_create_checklist/creates_a_checklist.json +0 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_delete_checklist/deletes_a_checklist.json +0 -1
- data/spec/cassettes/Tacokit_Client_Checklists/_update_checklist/updates_a_checklist.json +0 -1
- data/spec/cassettes/Tacokit_Client_Labels/_create_label/creates_a_label.json +0 -1
- data/spec/cassettes/Tacokit_Client_Labels/_delete_label/deletes_a_label.json +0 -1
- data/spec/cassettes/Tacokit_Client_Labels/_label/returns_a_label_by_id.json +0 -1
- data/spec/cassettes/Tacokit_Client_Labels/_update_label/updates_a_label.json +0 -1
- data/spec/cassettes/Tacokit_Client_Lists/_archive_list_cards/should_archive_cards_in_list.json +0 -1
- data/spec/cassettes/Tacokit_Client_Lists/_create_list/creates_a_list.json +0 -1
- data/spec/cassettes/Tacokit_Client_Lists/_list/returns_a_list_by_id.json +0 -1
- data/spec/cassettes/Tacokit_Client_Lists/_list_actions/returns_list_actions.json +0 -1
- data/spec/cassettes/Tacokit_Client_Lists/_list_board/returns_list_board.json +0 -1
- data/spec/cassettes/Tacokit_Client_Lists/_list_cards/returns_list_cards.json +0 -1
- data/spec/cassettes/Tacokit_Client_Lists/_move_list_cards/should_move_cards_in_list.json +0 -1
- data/spec/cassettes/Tacokit_Client_Lists/_update_list/updates_a_list.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_actions/returns_member_actions.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_boards/returns_for_me_with_options_as_first_arg.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_boards/returns_member_boards.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_cards/returns_member_cards.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member/accepts_a_resource.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member/authenticated/returns_self.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member/returns_a_member.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member/returns_self.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_member/supports_query_fields_as_string_or_array.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_notifications/returns_member_notifications.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_organizations/returns_member_organizations.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_tokens/returns_member_tokens.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_update_member/updates_a_member.json +0 -1
- data/spec/cassettes/Tacokit_Client_Members/_update_member/updates_nested_resource.json +0 -1
- data/spec/cassettes/Tacokit_Client_Notifications/_notification/returns_a_notification_by_id.json +0 -1
- data/spec/cassettes/Tacokit_Client_Notifications/_update_notification/updates_a_notification.json +0 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_create_organization/creates_a_organization.json +0 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_delete_organization/deletes_a_organization.json +0 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_organization/returns_an_organization_by_id.json +0 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_organization_resource/returns_organization_actions.json +0 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_organization_resource/returns_organization_boards.json +0 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_organization_resource/returns_organization_members.json +0 -1
- data/spec/cassettes/Tacokit_Client_Organizations/_update_organization/updates_a_organization.json +0 -1
- data/spec/cassettes/Tacokit_Client_Searches/_search/returns_search_result.json +0 -1
- data/spec/cassettes/Tacokit_Client_Tokens/_delete_token/deletes_a_token.json +0 -1
- data/spec/cassettes/Tacokit_Client_Tokens/_token/returns_a_token_for_token_string.json +0 -1
- data/spec/cassettes/Tacokit_Client_Tokens/_token_resource/returns_token_member.json +0 -1
- data/spec/cassettes/Tacokit_Client_Tokens/_token_resource/returns_token_webhooks.json +0 -1
- data/spec/cassettes/Tacokit_Client_Types/_type/returns_a_type_by_id.json +0 -1
- data/spec/cassettes/Tacokit_Client_Webhooks/_create_webhook/creates_a_webhook.json +0 -1
- data/spec/cassettes/Tacokit_Client_Webhooks/_delete_webhook/deletes_a_webhook.json +0 -1
- data/spec/cassettes/Tacokit_Client_Webhooks/_update_webhook/updates_a_webhook.json +0 -1
- data/spec/cassettes/Tacokit_Client_Webhooks/_webhook/returns_a_webhook_by_short_link.json +0 -1
- data/spec/fixtures/taco.png +0 -0
- data/spec/spec_helper.rb +0 -171
- data/spec/tacokit/authorization_spec.rb +0 -47
- data/spec/tacokit/client/actions_spec.rb +0 -137
- data/spec/tacokit/client/boards_spec.rb +0 -171
- data/spec/tacokit/client/cards_spec.rb +0 -446
- data/spec/tacokit/client/checklists_spec.rb +0 -89
- data/spec/tacokit/client/labels_spec.rb +0 -62
- data/spec/tacokit/client/lists_spec.rb +0 -131
- data/spec/tacokit/client/members_spec.rb +0 -145
- data/spec/tacokit/client/notifications_spec.rb +0 -25
- data/spec/tacokit/client/organizations_spec.rb +0 -79
- data/spec/tacokit/client/searches_spec.rb +0 -11
- data/spec/tacokit/client/tokens_spec.rb +0 -33
- data/spec/tacokit/client/types_spec.rb +0 -11
- data/spec/tacokit/client/webhooks_spec.rb +0 -61
- data/spec/tacokit/client_spec.rb +0 -28
- data/spec/tacokit/configuration_spec.rb +0 -50
- data/spec/tacokit/middleware/raise_error_spec.rb +0 -34
- data/spec/tacokit/resource_spec.rb +0 -151
- data/spec/tacokit/transform_spec.rb +0 -133
- data/spec/tacokit_spec.rb +0 -14
@@ -1,15 +1,42 @@
|
|
1
1
|
module Tacokit
|
2
2
|
class Client
|
3
|
+
# Methods for the Notifications API
|
4
|
+
# @see https://developers.trello.com/advanced-reference/notification
|
3
5
|
module Notifications
|
4
6
|
# Retrieve a notification
|
5
|
-
#
|
7
|
+
# @param notification_id [String] the notification identifier
|
8
|
+
# @param options [Hash] options to fetch the notification with
|
9
|
+
# @return [Tacokit::Resource] the notification resource
|
10
|
+
# @example Retrieve a notification with its board
|
11
|
+
# Tacokit.notification("aNotificationId", board: true) #=> Tacokit::Resource<Notification>
|
6
12
|
# @see https://developers.trello.com/advanced-reference/notification#get-1-notifications-idnotification
|
7
13
|
def notification(notification_id, options = nil)
|
8
14
|
get notification_path(notification_id), options
|
9
15
|
end
|
10
16
|
|
17
|
+
# Mark a notification as unread
|
18
|
+
# @param notification_id [String] the notification identifier
|
19
|
+
# @example Mark a notification as unread
|
20
|
+
# Tacokit.mark_notification_unread("aNotificationId") #=> Tacokit::Resource<Notification>
|
21
|
+
# @see https://developers.trello.com/advanced-reference/notification#put-1-notifications-idnotification
|
22
|
+
def mark_notification_unread(notification_id)
|
23
|
+
update_notification notification_id, unread: true
|
24
|
+
end
|
25
|
+
|
26
|
+
# Mark a notification as read
|
27
|
+
# @param notification_id [String] the notification identifier
|
28
|
+
# @example Mark a notification as read
|
29
|
+
# Tacokit.mark_notification_read("aNotificationId") #=> Tacokit::Resource<Notification>
|
30
|
+
# @see https://developers.trello.com/advanced-reference/notification#put-1-notifications-idnotification
|
31
|
+
def mark_notification_read(notification_id)
|
32
|
+
update_notification notification_id, unread: false
|
33
|
+
end
|
34
|
+
|
11
35
|
# Update read/unread status of notification
|
12
|
-
#
|
36
|
+
# @param notification_id [String] the notification identifier
|
37
|
+
# @param options [Hash] options to update the notification with
|
38
|
+
# @example Mark a notification as unread
|
39
|
+
# Tacokit.update_notification("aNotificationId", unread: true) #=> Tacokit::Resource<Notification>
|
13
40
|
# @see https://developers.trello.com/advanced-reference/notification#put-1-notifications-idnotification
|
14
41
|
def update_notification(notification_id, options = {})
|
15
42
|
put notification_path(notification_id), options
|
@@ -1,29 +1,37 @@
|
|
1
1
|
module Tacokit
|
2
2
|
class Client
|
3
|
+
# Methods for the Organizations API
|
4
|
+
# @see https://developers.trello.com/advanced-reference/organization
|
3
5
|
module Organizations
|
4
6
|
# Retrieve an organization
|
5
|
-
#
|
7
|
+
# @param org_id [String] the organization identifier
|
8
|
+
# @param options [Hash] options to fetch the organization with
|
9
|
+
# @return [Tacokit::Resource] the organization resource
|
6
10
|
# @see https://developers.trello.com/advanced-reference/organization
|
7
11
|
def organization(org_id, options = nil)
|
8
12
|
get organization_path(org_id), options
|
9
13
|
end
|
10
14
|
|
11
15
|
# Update an organization
|
12
|
-
#
|
16
|
+
# @param org_id [String] the organization identifier
|
17
|
+
# @param options [Hash] options to update the organization with
|
18
|
+
# @return [Tacokit::Resource] the organization resource
|
13
19
|
# @see https://developers.trello.com/advanced-reference/organization#put-1-organizations-idorg-or-name
|
14
20
|
def update_organization(org_id, options = {})
|
15
21
|
put organization_path(org_id), options
|
16
22
|
end
|
17
23
|
|
18
|
-
# Create
|
19
|
-
#
|
24
|
+
# Create an organization
|
25
|
+
# @param display_name [String] a name for the organization
|
26
|
+
# @param options [Hash] options to create the organization with
|
27
|
+
# @return [Tacokit::Resource] the organization resource
|
20
28
|
# @see https://developers.trello.com/advanced-reference/organization#post-1-organizations
|
21
29
|
def create_organization(display_name, options = {})
|
22
30
|
post "organizations", options.merge(display_name: display_name)
|
23
31
|
end
|
24
32
|
|
25
33
|
# Delete an organization
|
26
|
-
#
|
34
|
+
# @param org_id [String] the organization identifier
|
27
35
|
# @see https://developers.trello.com/advanced-reference/organization#delete-1-organizations-idorg-or-name
|
28
36
|
def delete_organization(org_id)
|
29
37
|
delete organization_path(org_id)
|
@@ -1,12 +1,27 @@
|
|
1
1
|
module Tacokit
|
2
2
|
class Client
|
3
|
+
# Methods for the Search API
|
4
|
+
# @see https://developers.trello.com/advanced-reference/search
|
3
5
|
module Searches
|
4
|
-
#
|
6
|
+
# Search across resources with a query
|
7
|
+
# @param query [String] the text of the search query
|
8
|
+
# @param options [Hash] options to retrieve the search results with
|
9
|
+
# @return the search results
|
10
|
+
# @example Search for any resource with query "technology"
|
11
|
+
# Tacokit.search("technology") #=> Tacokit::Collection
|
12
|
+
# @example Search for cards with query "music"
|
13
|
+
# Tacokit.search("music", model_types: "cards") #=> Tacokit::Collection
|
14
|
+
# @see https://developers.trello.com/advanced-reference/search#get-1-search
|
5
15
|
def search(query, options = {})
|
6
16
|
get search_path, options.merge(query: query)
|
7
17
|
end
|
8
18
|
|
9
|
-
#
|
19
|
+
# Search members with a query
|
20
|
+
# @param query [String] the text of the search query
|
21
|
+
# @param options [Hash] options to retrieve the search results with
|
22
|
+
# @return the search results
|
23
|
+
# @example Search for members with query "Marsha"
|
24
|
+
# Tacokit.search("Marsha") #=> Tacokit::Collection<Member>
|
10
25
|
def search_members(query, options = {})
|
11
26
|
get search_path("members"), options.merge(query: query)
|
12
27
|
end
|
@@ -1,15 +1,21 @@
|
|
1
1
|
module Tacokit
|
2
2
|
class Client
|
3
|
+
# Methods for the Tokens API
|
4
|
+
# @see https://developers.trello.com/advanced-reference/token
|
3
5
|
module Tokens
|
4
6
|
# Get an authorization token
|
5
|
-
#
|
7
|
+
# @param token [String] the token identifier
|
8
|
+
# @param options [Hash] options to fetch the token with
|
9
|
+
# @return [Tacokit::Resource] the token resource
|
6
10
|
# @see https://developers.trello.com/advanced-reference/token#get-1-tokens-token
|
7
11
|
def token(token, options = nil)
|
8
12
|
get token_path(token), options
|
9
13
|
end
|
10
14
|
|
11
15
|
# Delete an authorization token
|
12
|
-
#
|
16
|
+
# @param token [String] the token identifier
|
17
|
+
# @example Delete an authorization token
|
18
|
+
# Tacokit.delete_token("aToken")
|
13
19
|
# @see https://developers.trello.com/advanced-reference/token#delete-1-tokens-token
|
14
20
|
def delete_token(token)
|
15
21
|
delete token_path(token)
|
data/lib/tacokit/client/types.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
module Tacokit
|
2
2
|
class Client
|
3
|
+
# Methods for the Types API
|
4
|
+
# @see https://developers.trello.com/advanced-reference/type
|
3
5
|
module Types
|
4
|
-
# Get a resource type
|
5
|
-
#
|
6
|
+
# Get a resource type for a given identifier
|
7
|
+
# @param model_id [String] the resource identifier
|
6
8
|
# @see https://developers.trello.com/advanced-reference/type#get-1-types-id
|
7
9
|
def type(model_id)
|
8
10
|
get resource_path "types", model_id
|
@@ -1,17 +1,30 @@
|
|
1
1
|
module Tacokit
|
2
2
|
class Client
|
3
|
+
# Methods for the Webhooks API
|
4
|
+
# @see https://developers.trello.com/advanced-reference/webhook
|
3
5
|
module Webhooks
|
4
6
|
# Update a webhook
|
5
|
-
#
|
7
|
+
# @param webhook_id [String] the webhook identifier
|
8
|
+
# @param options [Hash] options to update the webhook with
|
9
|
+
# @return [Tacokit::Resource<Webhook>] the webhook resource
|
10
|
+
# @example Update webhook description
|
11
|
+
# Tacokit.update_webhook(webhook.id, desc: "Here's the real webhook description") #=> Tacokit::Resource<Webhook>
|
6
12
|
# @see https://developers.trello.com/advanced-reference/webhook#put-1-webhooks
|
7
13
|
def update_webhook(webhook_id, options = {})
|
8
14
|
put webhook_path(webhook_id), options
|
9
15
|
end
|
10
16
|
|
11
17
|
# Create a webhook
|
12
|
-
#
|
18
|
+
# @param model_id [String] the id of the model that should be webhooked
|
19
|
+
# @param callback_url [String] a url reachable with a HEAD request
|
20
|
+
# @param options [String] options to create the webhook with
|
21
|
+
# @return [Tacokit::Resource<Webhook>] the webhook resource
|
22
|
+
# @example Create a webhook for a board
|
23
|
+
# board = Tacokit.boards.first
|
24
|
+
# Tacokit.create_webhook(board.id, "https://example.com/board/callback",
|
25
|
+
# desc: "My first Trello webhook!") #=> Tacokit::Resource<Webhook>
|
13
26
|
# @see https://developers.trello.com/advanced-reference/webhook#post-1-webhooks
|
14
|
-
def create_webhook(
|
27
|
+
def create_webhook(model_id, callback_url, options = {})
|
15
28
|
options.update \
|
16
29
|
model_id: model_id,
|
17
30
|
callback_url: callback_url
|
@@ -19,7 +32,7 @@ module Tacokit
|
|
19
32
|
end
|
20
33
|
|
21
34
|
# Delete a webhook
|
22
|
-
#
|
35
|
+
# @param webhook_id [String] the webhook identifier
|
23
36
|
# @see https://developers.trello.com/advanced-reference/webhook#delete-1-webhooks-idwebhook
|
24
37
|
def delete_webhook(webhook_id)
|
25
38
|
delete webhook_path(webhook_id)
|
data/lib/tacokit/collection.rb
CHANGED
@@ -15,8 +15,9 @@ module Tacokit
|
|
15
15
|
@path = path
|
16
16
|
@options = options
|
17
17
|
|
18
|
-
@
|
19
|
-
@limit
|
18
|
+
@before = options.fetch(:before, nil)
|
19
|
+
@limit = options.fetch(:limit, 50)
|
20
|
+
@max = options.fetch(:max, MAX)
|
20
21
|
|
21
22
|
@collection = []
|
22
23
|
|
@@ -39,14 +40,14 @@ module Tacokit
|
|
39
40
|
private
|
40
41
|
|
41
42
|
def last?
|
42
|
-
@last_response_empty ||
|
43
|
+
@last_response_empty || @collection.length >= @max
|
43
44
|
end
|
44
45
|
|
45
46
|
def fetch_next_page
|
46
|
-
response = @client.send(@method, @path, @options.merge(
|
47
|
+
response = @client.send(@method, @path, @options.merge(before: @before, limit: @limit))
|
47
48
|
@last_response_empty = response.empty?
|
48
|
-
@page += 1
|
49
49
|
@collection += response
|
50
|
+
@before = response.last["id"] unless @last_response_empty
|
50
51
|
end
|
51
52
|
end
|
52
53
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module Tacokit
|
2
3
|
class Configuration
|
3
4
|
API_URL = "https://api.trello.com".freeze
|
@@ -13,7 +14,8 @@ module Tacokit
|
|
13
14
|
:oauth_token,
|
14
15
|
:oauth_secret,
|
15
16
|
:api_endpoint,
|
16
|
-
:web_endpoint
|
17
|
+
:web_endpoint,
|
18
|
+
:stack
|
17
19
|
]
|
18
20
|
end
|
19
21
|
|
@@ -32,7 +34,7 @@ module Tacokit
|
|
32
34
|
end
|
33
35
|
|
34
36
|
def user_credentials
|
35
|
-
{ consumer_key: app_key, token: oauth_token }.delete_if { |k, v| v.nil? }
|
37
|
+
{ consumer_key: app_key, consumer_secret: app_secret, token: oauth_token }.delete_if { |k, v| v.nil? }
|
36
38
|
end
|
37
39
|
|
38
40
|
def app_authenticated?
|
@@ -43,6 +45,12 @@ module Tacokit
|
|
43
45
|
{ key: app_key, token: app_token }.delete_if { |k, v| v.nil? }
|
44
46
|
end
|
45
47
|
|
48
|
+
def stack
|
49
|
+
@stack ||= Faraday::RackBuilder.new(&Middleware.default_stack(self))
|
50
|
+
yield @stack if block_given?
|
51
|
+
@stack
|
52
|
+
end
|
53
|
+
|
46
54
|
private
|
47
55
|
|
48
56
|
def defaults
|
data/lib/tacokit/middleware.rb
CHANGED
@@ -3,5 +3,21 @@ require "tacokit/middleware/raise_error"
|
|
3
3
|
module Tacokit
|
4
4
|
module Middleware
|
5
5
|
Faraday::Response.register_middleware raise_error: -> { Tacokit::Middleware::RaiseError }
|
6
|
+
|
7
|
+
module_function
|
8
|
+
|
9
|
+
def default_stack(config = Tacokit.configuration)
|
10
|
+
proc do |http|
|
11
|
+
http.request :json
|
12
|
+
http.request :multipart
|
13
|
+
http.request :url_encoded
|
14
|
+
|
15
|
+
http.response :json, content_type: /\bjson$/
|
16
|
+
http.response :raise_error
|
17
|
+
http.response :logger if ENV["DEBUG"]
|
18
|
+
|
19
|
+
http.adapter Faraday.default_adapter
|
20
|
+
end
|
21
|
+
end
|
6
22
|
end
|
7
23
|
end
|
data/lib/tacokit/resource.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "set"
|
2
3
|
require "time"
|
3
4
|
require "forwardable"
|
@@ -10,8 +11,8 @@ module Tacokit
|
|
10
11
|
SPECIAL_METHODS = Set.new(%w[fields])
|
11
12
|
attr_reader :_fields
|
12
13
|
attr_reader :attrs
|
13
|
-
|
14
|
-
|
14
|
+
alias to_hash attrs
|
15
|
+
alias to_h attrs
|
15
16
|
|
16
17
|
def_delegators :@_fields, :fetch, :keys, :any?
|
17
18
|
|
@@ -43,14 +44,14 @@ module Tacokit
|
|
43
44
|
def key?(key)
|
44
45
|
@_fields.include?(key)
|
45
46
|
end
|
46
|
-
|
47
|
-
|
47
|
+
alias has_key? key?
|
48
|
+
alias include? key?
|
48
49
|
|
49
50
|
def inspect
|
50
51
|
(to_attrs.respond_to?(:pretty_inspect) ? to_attrs.pretty_inspect : to_attrs.inspect)
|
51
52
|
end
|
52
53
|
|
53
|
-
|
54
|
+
alias to_s inspect
|
54
55
|
|
55
56
|
def to_attrs
|
56
57
|
hash = attrs.clone
|
@@ -129,7 +130,7 @@ module Tacokit
|
|
129
130
|
end
|
130
131
|
|
131
132
|
# rubocop:disable Metrics/LineLength
|
132
|
-
ISO8601 = %r{^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)?(Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$}
|
133
|
+
ISO8601 = %r{^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)?(Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$}
|
133
134
|
# rubocop:enable Metrics/LineLength
|
134
135
|
def cast_value_type(value)
|
135
136
|
case value
|
data/lib/tacokit/transform.rb
CHANGED
@@ -17,10 +17,8 @@ module Tacokit
|
|
17
17
|
private
|
18
18
|
|
19
19
|
def normalize_request_params(params)
|
20
|
-
{}.
|
21
|
-
|
22
|
-
norm[key] = normalize_param_value(value)
|
23
|
-
end
|
20
|
+
(params || {}).reject { |_k, v| v.nil? }.each_with_object({}) do |(key, value), norm|
|
21
|
+
norm[key] = normalize_param_value(value)
|
24
22
|
end
|
25
23
|
end
|
26
24
|
|
data/lib/tacokit/utils.rb
CHANGED
@@ -37,7 +37,7 @@ module Tacokit
|
|
37
37
|
def camel_path(path)
|
38
38
|
camelize(path.to_s, :lower)
|
39
39
|
end
|
40
|
-
|
40
|
+
alias camp camel_path
|
41
41
|
|
42
42
|
def camel_join(*paths)
|
43
43
|
path_join paths.map { |p| camel_path(p) }
|
@@ -48,9 +48,12 @@ module Tacokit
|
|
48
48
|
end
|
49
49
|
|
50
50
|
# Returns a resource path for a given resource name and id
|
51
|
-
def resource_path(resource_name,
|
52
|
-
|
53
|
-
|
51
|
+
def resource_path(resource_name, identifier, *paths)
|
52
|
+
path_join resource_name, resource_id(identifier), *paths
|
53
|
+
end
|
54
|
+
|
55
|
+
def resource_id(identifier)
|
56
|
+
identifier.respond_to?(:id) ? identifier.id : identifier
|
54
57
|
end
|
55
58
|
|
56
59
|
def constantize(class_name)
|
data/lib/tacokit/version.rb
CHANGED
data/tacokit.gemspec
CHANGED
@@ -13,12 +13,12 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "http://rossta.github.io/tacokit.rb"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
-
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.
|
18
|
-
spec.
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = "exe"
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "faraday"
|
21
|
+
spec.add_dependency "faraday", "0.9.1"
|
22
22
|
spec.add_dependency "faraday_middleware"
|
23
23
|
spec.add_dependency "simple_oauth"
|
24
24
|
spec.add_dependency "addressable"
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tacokit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ross Kaffenberger
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.9.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.9.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: faraday_middleware
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -125,6 +125,13 @@ files:
|
|
125
125
|
- LICENSE
|
126
126
|
- README.md
|
127
127
|
- Rakefile
|
128
|
+
- bin/_guard-core
|
129
|
+
- bin/console
|
130
|
+
- bin/guard
|
131
|
+
- bin/rake
|
132
|
+
- bin/rspec
|
133
|
+
- bin/rubocop
|
134
|
+
- bin/setup
|
128
135
|
- lib/tacokit.rb
|
129
136
|
- lib/tacokit/authorization.rb
|
130
137
|
- lib/tacokit/client.rb
|
@@ -152,138 +159,6 @@ files:
|
|
152
159
|
- lib/tacokit/utils.rb
|
153
160
|
- lib/tacokit/version.rb
|
154
161
|
- script/console
|
155
|
-
- spec/cassettes/Tacokit_Client/_connection/authorized_GET_request_with_app_key_and_token_params.json
|
156
|
-
- spec/cassettes/Tacokit_Client_Actions/_action/returns_a_token_authorized_action.json
|
157
|
-
- spec/cassettes/Tacokit_Client_Actions/_action/returns_oauth_authorized_board.json
|
158
|
-
- spec/cassettes/Tacokit_Client_Actions/_action_board/returns_action_board.json
|
159
|
-
- spec/cassettes/Tacokit_Client_Actions/_action_card/returns_action_card.json
|
160
|
-
- spec/cassettes/Tacokit_Client_Actions/_action_entities/returns_action_entities.json
|
161
|
-
- spec/cassettes/Tacokit_Client_Actions/_action_list/returns_action_list.json
|
162
|
-
- spec/cassettes/Tacokit_Client_Actions/_delete_action/deletes_an_action.json
|
163
|
-
- spec/cassettes/Tacokit_Client_Actions/_update_action/updates_an_action.json
|
164
|
-
- spec/cassettes/Tacokit_Client_Actions/_update_action_text/updates_an_action.json
|
165
|
-
- spec/cassettes/Tacokit_Client_Boards/_add_board_member/adds_invites_member_to_board.json
|
166
|
-
- spec/cassettes/Tacokit_Client_Boards/_board/returns_a_token_authorized_board.json
|
167
|
-
- spec/cassettes/Tacokit_Client_Boards/_board/returns_oauth_authorized_board.json
|
168
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_actions/returns_board_actions.json
|
169
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_cards/returns_board_cards.json
|
170
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_checklists/returns_board_checklists.json
|
171
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_labels/returns_board_labels.json
|
172
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_lists/returns_board_lists.json
|
173
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_members/returns_board_members.json
|
174
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_organization/returns_board_organization.json
|
175
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_preferences/returns_preferences_for_a_board.json
|
176
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_stars/returns_board_stars.json
|
177
|
-
- spec/cassettes/Tacokit_Client_Boards/_update_board/updates_a_board.json
|
178
|
-
- spec/cassettes/Tacokit_Client_Boards/_update_board/updates_nested_resource.json
|
179
|
-
- spec/cassettes/Tacokit_Client_Boards/_update_board_member/updates_member.json
|
180
|
-
- spec/cassettes/Tacokit_Client_Cards/_add_comment/creates_a_comment.json
|
181
|
-
- spec/cassettes/Tacokit_Client_Cards/_add_label/adds_label_to_card.json
|
182
|
-
- spec/cassettes/Tacokit_Client_Cards/_add_member_to_card/adds_member_to_card.json
|
183
|
-
- spec/cassettes/Tacokit_Client_Cards/_archive_card/archives_card.json
|
184
|
-
- spec/cassettes/Tacokit_Client_Cards/_archive_card/restore_card.json
|
185
|
-
- spec/cassettes/Tacokit_Client_Cards/_attachments/returns_an_attachment.json
|
186
|
-
- spec/cassettes/Tacokit_Client_Cards/_attachments/returns_attachments.json
|
187
|
-
- spec/cassettes/Tacokit_Client_Cards/_card/returns_a_card_by_card_resource.json
|
188
|
-
- spec/cassettes/Tacokit_Client_Cards/_card/returns_a_card_by_id.json
|
189
|
-
- spec/cassettes/Tacokit_Client_Cards/_card/returns_a_card_by_short_link.json
|
190
|
-
- spec/cassettes/Tacokit_Client_Cards/_card_actions/returns_card_actions.json
|
191
|
-
- spec/cassettes/Tacokit_Client_Cards/_card_board/returns_card_board.json
|
192
|
-
- spec/cassettes/Tacokit_Client_Cards/_card_list/returns_a_list.json
|
193
|
-
- spec/cassettes/Tacokit_Client_Cards/_card_members/returns_members.json
|
194
|
-
- spec/cassettes/Tacokit_Client_Cards/_card_members/returns_members_voted.json
|
195
|
-
- spec/cassettes/Tacokit_Client_Cards/_checklists/returns_check_item_states.json
|
196
|
-
- spec/cassettes/Tacokit_Client_Cards/_checklists/returns_checklists.json
|
197
|
-
- spec/cassettes/Tacokit_Client_Cards/_create_card/creates_a_card.json
|
198
|
-
- spec/cassettes/Tacokit_Client_Cards/_create_card_attachment/attaches_external_url.json
|
199
|
-
- spec/cassettes/Tacokit_Client_Cards/_create_card_attachment/uploads_local_file.json
|
200
|
-
- spec/cassettes/Tacokit_Client_Cards/_delete_card/deletes_a_card.json
|
201
|
-
- spec/cassettes/Tacokit_Client_Cards/_delete_comment/deletes_comment.json
|
202
|
-
- spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_a_new_position.json
|
203
|
-
- spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_another_board_list.json
|
204
|
-
- spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_board.json
|
205
|
-
- spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_list.json
|
206
|
-
- spec/cassettes/Tacokit_Client_Cards/_move_card/raises_error_if_missing_options.json
|
207
|
-
- spec/cassettes/Tacokit_Client_Cards/_start_checklist/adds_new_checklist_by_name.json
|
208
|
-
- spec/cassettes/Tacokit_Client_Cards/_start_checklist/copies_a_checklist_by_id.json
|
209
|
-
- spec/cassettes/Tacokit_Client_Cards/_stickers/returns_stickers.json
|
210
|
-
- spec/cassettes/Tacokit_Client_Cards/_update_card/updates_a_card.json
|
211
|
-
- spec/cassettes/Tacokit_Client_Cards/_update_checklist_item/updates_checklist_item.json
|
212
|
-
- spec/cassettes/Tacokit_Client_Cards/_update_comment/updates_a_comment.json
|
213
|
-
- spec/cassettes/Tacokit_Client_Cards/_vote/adds_a_member_s_vote_to_card.json
|
214
|
-
- spec/cassettes/Tacokit_Client_Checklists/_check_items/adds_a_checklist_check_item.json
|
215
|
-
- spec/cassettes/Tacokit_Client_Checklists/_check_items/retrieves_checklist_check_items.json
|
216
|
-
- spec/cassettes/Tacokit_Client_Checklists/_checklist/returns_a_checklist_by_id.json
|
217
|
-
- spec/cassettes/Tacokit_Client_Checklists/_create_checklist/creates_a_checklist.json
|
218
|
-
- spec/cassettes/Tacokit_Client_Checklists/_delete_checklist/deletes_a_checklist.json
|
219
|
-
- spec/cassettes/Tacokit_Client_Checklists/_update_checklist/updates_a_checklist.json
|
220
|
-
- spec/cassettes/Tacokit_Client_Labels/_create_label/creates_a_label.json
|
221
|
-
- spec/cassettes/Tacokit_Client_Labels/_delete_label/deletes_a_label.json
|
222
|
-
- spec/cassettes/Tacokit_Client_Labels/_label/returns_a_label_by_id.json
|
223
|
-
- spec/cassettes/Tacokit_Client_Labels/_update_label/updates_a_label.json
|
224
|
-
- spec/cassettes/Tacokit_Client_Lists/_archive_list_cards/should_archive_cards_in_list.json
|
225
|
-
- spec/cassettes/Tacokit_Client_Lists/_create_list/creates_a_list.json
|
226
|
-
- spec/cassettes/Tacokit_Client_Lists/_list/returns_a_list_by_id.json
|
227
|
-
- spec/cassettes/Tacokit_Client_Lists/_list_actions/returns_list_actions.json
|
228
|
-
- spec/cassettes/Tacokit_Client_Lists/_list_board/returns_list_board.json
|
229
|
-
- spec/cassettes/Tacokit_Client_Lists/_list_cards/returns_list_cards.json
|
230
|
-
- spec/cassettes/Tacokit_Client_Lists/_move_list_cards/should_move_cards_in_list.json
|
231
|
-
- spec/cassettes/Tacokit_Client_Lists/_update_list/updates_a_list.json
|
232
|
-
- spec/cassettes/Tacokit_Client_Members/_actions/returns_member_actions.json
|
233
|
-
- spec/cassettes/Tacokit_Client_Members/_boards/returns_for_me_with_options_as_first_arg.json
|
234
|
-
- spec/cassettes/Tacokit_Client_Members/_boards/returns_member_boards.json
|
235
|
-
- spec/cassettes/Tacokit_Client_Members/_cards/returns_member_cards.json
|
236
|
-
- spec/cassettes/Tacokit_Client_Members/_member/accepts_a_resource.json
|
237
|
-
- spec/cassettes/Tacokit_Client_Members/_member/authenticated/returns_self.json
|
238
|
-
- spec/cassettes/Tacokit_Client_Members/_member/returns_a_member.json
|
239
|
-
- spec/cassettes/Tacokit_Client_Members/_member/returns_self.json
|
240
|
-
- spec/cassettes/Tacokit_Client_Members/_member/supports_query_fields_as_string_or_array.json
|
241
|
-
- spec/cassettes/Tacokit_Client_Members/_notifications/returns_member_notifications.json
|
242
|
-
- spec/cassettes/Tacokit_Client_Members/_organizations/returns_member_organizations.json
|
243
|
-
- spec/cassettes/Tacokit_Client_Members/_tokens/returns_member_tokens.json
|
244
|
-
- spec/cassettes/Tacokit_Client_Members/_update_member/updates_a_member.json
|
245
|
-
- spec/cassettes/Tacokit_Client_Members/_update_member/updates_nested_resource.json
|
246
|
-
- spec/cassettes/Tacokit_Client_Notifications/_notification/returns_a_notification_by_id.json
|
247
|
-
- spec/cassettes/Tacokit_Client_Notifications/_update_notification/updates_a_notification.json
|
248
|
-
- spec/cassettes/Tacokit_Client_Organizations/_create_organization/creates_a_organization.json
|
249
|
-
- spec/cassettes/Tacokit_Client_Organizations/_delete_organization/deletes_a_organization.json
|
250
|
-
- spec/cassettes/Tacokit_Client_Organizations/_organization/returns_an_organization_by_id.json
|
251
|
-
- spec/cassettes/Tacokit_Client_Organizations/_organization_resource/returns_organization_actions.json
|
252
|
-
- spec/cassettes/Tacokit_Client_Organizations/_organization_resource/returns_organization_boards.json
|
253
|
-
- spec/cassettes/Tacokit_Client_Organizations/_organization_resource/returns_organization_members.json
|
254
|
-
- spec/cassettes/Tacokit_Client_Organizations/_update_organization/updates_a_organization.json
|
255
|
-
- spec/cassettes/Tacokit_Client_Searches/_search/returns_search_result.json
|
256
|
-
- spec/cassettes/Tacokit_Client_Tokens/_delete_token/deletes_a_token.json
|
257
|
-
- spec/cassettes/Tacokit_Client_Tokens/_token/returns_a_token_for_token_string.json
|
258
|
-
- spec/cassettes/Tacokit_Client_Tokens/_token_resource/returns_token_member.json
|
259
|
-
- spec/cassettes/Tacokit_Client_Tokens/_token_resource/returns_token_webhooks.json
|
260
|
-
- spec/cassettes/Tacokit_Client_Types/_type/returns_a_type_by_id.json
|
261
|
-
- spec/cassettes/Tacokit_Client_Webhooks/_create_webhook/creates_a_webhook.json
|
262
|
-
- spec/cassettes/Tacokit_Client_Webhooks/_delete_webhook/deletes_a_webhook.json
|
263
|
-
- spec/cassettes/Tacokit_Client_Webhooks/_update_webhook/updates_a_webhook.json
|
264
|
-
- spec/cassettes/Tacokit_Client_Webhooks/_webhook/returns_a_webhook_by_short_link.json
|
265
|
-
- spec/fixtures/taco.png
|
266
|
-
- spec/spec_helper.rb
|
267
|
-
- spec/tacokit/authorization_spec.rb
|
268
|
-
- spec/tacokit/client/actions_spec.rb
|
269
|
-
- spec/tacokit/client/boards_spec.rb
|
270
|
-
- spec/tacokit/client/cards_spec.rb
|
271
|
-
- spec/tacokit/client/checklists_spec.rb
|
272
|
-
- spec/tacokit/client/labels_spec.rb
|
273
|
-
- spec/tacokit/client/lists_spec.rb
|
274
|
-
- spec/tacokit/client/members_spec.rb
|
275
|
-
- spec/tacokit/client/notifications_spec.rb
|
276
|
-
- spec/tacokit/client/organizations_spec.rb
|
277
|
-
- spec/tacokit/client/searches_spec.rb
|
278
|
-
- spec/tacokit/client/tokens_spec.rb
|
279
|
-
- spec/tacokit/client/types_spec.rb
|
280
|
-
- spec/tacokit/client/webhooks_spec.rb
|
281
|
-
- spec/tacokit/client_spec.rb
|
282
|
-
- spec/tacokit/configuration_spec.rb
|
283
|
-
- spec/tacokit/middleware/raise_error_spec.rb
|
284
|
-
- spec/tacokit/resource_spec.rb
|
285
|
-
- spec/tacokit/transform_spec.rb
|
286
|
-
- spec/tacokit_spec.rb
|
287
162
|
- tacokit.gemspec
|
288
163
|
homepage: http://rossta.github.io/tacokit.rb
|
289
164
|
licenses:
|
@@ -305,140 +180,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
305
180
|
version: '0'
|
306
181
|
requirements: []
|
307
182
|
rubyforge_project:
|
308
|
-
rubygems_version: 2.
|
183
|
+
rubygems_version: 2.4.5.1
|
309
184
|
signing_key:
|
310
185
|
specification_version: 4
|
311
186
|
summary: A ruby toolkit for the Trello API.
|
312
|
-
test_files:
|
313
|
-
|
314
|
-
- spec/cassettes/Tacokit_Client_Actions/_action/returns_a_token_authorized_action.json
|
315
|
-
- spec/cassettes/Tacokit_Client_Actions/_action/returns_oauth_authorized_board.json
|
316
|
-
- spec/cassettes/Tacokit_Client_Actions/_action_board/returns_action_board.json
|
317
|
-
- spec/cassettes/Tacokit_Client_Actions/_action_card/returns_action_card.json
|
318
|
-
- spec/cassettes/Tacokit_Client_Actions/_action_entities/returns_action_entities.json
|
319
|
-
- spec/cassettes/Tacokit_Client_Actions/_action_list/returns_action_list.json
|
320
|
-
- spec/cassettes/Tacokit_Client_Actions/_delete_action/deletes_an_action.json
|
321
|
-
- spec/cassettes/Tacokit_Client_Actions/_update_action/updates_an_action.json
|
322
|
-
- spec/cassettes/Tacokit_Client_Actions/_update_action_text/updates_an_action.json
|
323
|
-
- spec/cassettes/Tacokit_Client_Boards/_add_board_member/adds_invites_member_to_board.json
|
324
|
-
- spec/cassettes/Tacokit_Client_Boards/_board/returns_a_token_authorized_board.json
|
325
|
-
- spec/cassettes/Tacokit_Client_Boards/_board/returns_oauth_authorized_board.json
|
326
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_actions/returns_board_actions.json
|
327
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_cards/returns_board_cards.json
|
328
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_checklists/returns_board_checklists.json
|
329
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_labels/returns_board_labels.json
|
330
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_lists/returns_board_lists.json
|
331
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_members/returns_board_members.json
|
332
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_organization/returns_board_organization.json
|
333
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_preferences/returns_preferences_for_a_board.json
|
334
|
-
- spec/cassettes/Tacokit_Client_Boards/_board_stars/returns_board_stars.json
|
335
|
-
- spec/cassettes/Tacokit_Client_Boards/_update_board/updates_a_board.json
|
336
|
-
- spec/cassettes/Tacokit_Client_Boards/_update_board/updates_nested_resource.json
|
337
|
-
- spec/cassettes/Tacokit_Client_Boards/_update_board_member/updates_member.json
|
338
|
-
- spec/cassettes/Tacokit_Client_Cards/_add_comment/creates_a_comment.json
|
339
|
-
- spec/cassettes/Tacokit_Client_Cards/_add_label/adds_label_to_card.json
|
340
|
-
- spec/cassettes/Tacokit_Client_Cards/_add_member_to_card/adds_member_to_card.json
|
341
|
-
- spec/cassettes/Tacokit_Client_Cards/_archive_card/archives_card.json
|
342
|
-
- spec/cassettes/Tacokit_Client_Cards/_archive_card/restore_card.json
|
343
|
-
- spec/cassettes/Tacokit_Client_Cards/_attachments/returns_an_attachment.json
|
344
|
-
- spec/cassettes/Tacokit_Client_Cards/_attachments/returns_attachments.json
|
345
|
-
- spec/cassettes/Tacokit_Client_Cards/_card/returns_a_card_by_card_resource.json
|
346
|
-
- spec/cassettes/Tacokit_Client_Cards/_card/returns_a_card_by_id.json
|
347
|
-
- spec/cassettes/Tacokit_Client_Cards/_card/returns_a_card_by_short_link.json
|
348
|
-
- spec/cassettes/Tacokit_Client_Cards/_card_actions/returns_card_actions.json
|
349
|
-
- spec/cassettes/Tacokit_Client_Cards/_card_board/returns_card_board.json
|
350
|
-
- spec/cassettes/Tacokit_Client_Cards/_card_list/returns_a_list.json
|
351
|
-
- spec/cassettes/Tacokit_Client_Cards/_card_members/returns_members.json
|
352
|
-
- spec/cassettes/Tacokit_Client_Cards/_card_members/returns_members_voted.json
|
353
|
-
- spec/cassettes/Tacokit_Client_Cards/_checklists/returns_check_item_states.json
|
354
|
-
- spec/cassettes/Tacokit_Client_Cards/_checklists/returns_checklists.json
|
355
|
-
- spec/cassettes/Tacokit_Client_Cards/_create_card/creates_a_card.json
|
356
|
-
- spec/cassettes/Tacokit_Client_Cards/_create_card_attachment/attaches_external_url.json
|
357
|
-
- spec/cassettes/Tacokit_Client_Cards/_create_card_attachment/uploads_local_file.json
|
358
|
-
- spec/cassettes/Tacokit_Client_Cards/_delete_card/deletes_a_card.json
|
359
|
-
- spec/cassettes/Tacokit_Client_Cards/_delete_comment/deletes_comment.json
|
360
|
-
- spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_a_new_position.json
|
361
|
-
- spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_another_board_list.json
|
362
|
-
- spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_board.json
|
363
|
-
- spec/cassettes/Tacokit_Client_Cards/_move_card/moves_card_to_list.json
|
364
|
-
- spec/cassettes/Tacokit_Client_Cards/_move_card/raises_error_if_missing_options.json
|
365
|
-
- spec/cassettes/Tacokit_Client_Cards/_start_checklist/adds_new_checklist_by_name.json
|
366
|
-
- spec/cassettes/Tacokit_Client_Cards/_start_checklist/copies_a_checklist_by_id.json
|
367
|
-
- spec/cassettes/Tacokit_Client_Cards/_stickers/returns_stickers.json
|
368
|
-
- spec/cassettes/Tacokit_Client_Cards/_update_card/updates_a_card.json
|
369
|
-
- spec/cassettes/Tacokit_Client_Cards/_update_checklist_item/updates_checklist_item.json
|
370
|
-
- spec/cassettes/Tacokit_Client_Cards/_update_comment/updates_a_comment.json
|
371
|
-
- spec/cassettes/Tacokit_Client_Cards/_vote/adds_a_member_s_vote_to_card.json
|
372
|
-
- spec/cassettes/Tacokit_Client_Checklists/_check_items/adds_a_checklist_check_item.json
|
373
|
-
- spec/cassettes/Tacokit_Client_Checklists/_check_items/retrieves_checklist_check_items.json
|
374
|
-
- spec/cassettes/Tacokit_Client_Checklists/_checklist/returns_a_checklist_by_id.json
|
375
|
-
- spec/cassettes/Tacokit_Client_Checklists/_create_checklist/creates_a_checklist.json
|
376
|
-
- spec/cassettes/Tacokit_Client_Checklists/_delete_checklist/deletes_a_checklist.json
|
377
|
-
- spec/cassettes/Tacokit_Client_Checklists/_update_checklist/updates_a_checklist.json
|
378
|
-
- spec/cassettes/Tacokit_Client_Labels/_create_label/creates_a_label.json
|
379
|
-
- spec/cassettes/Tacokit_Client_Labels/_delete_label/deletes_a_label.json
|
380
|
-
- spec/cassettes/Tacokit_Client_Labels/_label/returns_a_label_by_id.json
|
381
|
-
- spec/cassettes/Tacokit_Client_Labels/_update_label/updates_a_label.json
|
382
|
-
- spec/cassettes/Tacokit_Client_Lists/_archive_list_cards/should_archive_cards_in_list.json
|
383
|
-
- spec/cassettes/Tacokit_Client_Lists/_create_list/creates_a_list.json
|
384
|
-
- spec/cassettes/Tacokit_Client_Lists/_list/returns_a_list_by_id.json
|
385
|
-
- spec/cassettes/Tacokit_Client_Lists/_list_actions/returns_list_actions.json
|
386
|
-
- spec/cassettes/Tacokit_Client_Lists/_list_board/returns_list_board.json
|
387
|
-
- spec/cassettes/Tacokit_Client_Lists/_list_cards/returns_list_cards.json
|
388
|
-
- spec/cassettes/Tacokit_Client_Lists/_move_list_cards/should_move_cards_in_list.json
|
389
|
-
- spec/cassettes/Tacokit_Client_Lists/_update_list/updates_a_list.json
|
390
|
-
- spec/cassettes/Tacokit_Client_Members/_actions/returns_member_actions.json
|
391
|
-
- spec/cassettes/Tacokit_Client_Members/_boards/returns_for_me_with_options_as_first_arg.json
|
392
|
-
- spec/cassettes/Tacokit_Client_Members/_boards/returns_member_boards.json
|
393
|
-
- spec/cassettes/Tacokit_Client_Members/_cards/returns_member_cards.json
|
394
|
-
- spec/cassettes/Tacokit_Client_Members/_member/accepts_a_resource.json
|
395
|
-
- spec/cassettes/Tacokit_Client_Members/_member/authenticated/returns_self.json
|
396
|
-
- spec/cassettes/Tacokit_Client_Members/_member/returns_a_member.json
|
397
|
-
- spec/cassettes/Tacokit_Client_Members/_member/returns_self.json
|
398
|
-
- spec/cassettes/Tacokit_Client_Members/_member/supports_query_fields_as_string_or_array.json
|
399
|
-
- spec/cassettes/Tacokit_Client_Members/_notifications/returns_member_notifications.json
|
400
|
-
- spec/cassettes/Tacokit_Client_Members/_organizations/returns_member_organizations.json
|
401
|
-
- spec/cassettes/Tacokit_Client_Members/_tokens/returns_member_tokens.json
|
402
|
-
- spec/cassettes/Tacokit_Client_Members/_update_member/updates_a_member.json
|
403
|
-
- spec/cassettes/Tacokit_Client_Members/_update_member/updates_nested_resource.json
|
404
|
-
- spec/cassettes/Tacokit_Client_Notifications/_notification/returns_a_notification_by_id.json
|
405
|
-
- spec/cassettes/Tacokit_Client_Notifications/_update_notification/updates_a_notification.json
|
406
|
-
- spec/cassettes/Tacokit_Client_Organizations/_create_organization/creates_a_organization.json
|
407
|
-
- spec/cassettes/Tacokit_Client_Organizations/_delete_organization/deletes_a_organization.json
|
408
|
-
- spec/cassettes/Tacokit_Client_Organizations/_organization/returns_an_organization_by_id.json
|
409
|
-
- spec/cassettes/Tacokit_Client_Organizations/_organization_resource/returns_organization_actions.json
|
410
|
-
- spec/cassettes/Tacokit_Client_Organizations/_organization_resource/returns_organization_boards.json
|
411
|
-
- spec/cassettes/Tacokit_Client_Organizations/_organization_resource/returns_organization_members.json
|
412
|
-
- spec/cassettes/Tacokit_Client_Organizations/_update_organization/updates_a_organization.json
|
413
|
-
- spec/cassettes/Tacokit_Client_Searches/_search/returns_search_result.json
|
414
|
-
- spec/cassettes/Tacokit_Client_Tokens/_delete_token/deletes_a_token.json
|
415
|
-
- spec/cassettes/Tacokit_Client_Tokens/_token/returns_a_token_for_token_string.json
|
416
|
-
- spec/cassettes/Tacokit_Client_Tokens/_token_resource/returns_token_member.json
|
417
|
-
- spec/cassettes/Tacokit_Client_Tokens/_token_resource/returns_token_webhooks.json
|
418
|
-
- spec/cassettes/Tacokit_Client_Types/_type/returns_a_type_by_id.json
|
419
|
-
- spec/cassettes/Tacokit_Client_Webhooks/_create_webhook/creates_a_webhook.json
|
420
|
-
- spec/cassettes/Tacokit_Client_Webhooks/_delete_webhook/deletes_a_webhook.json
|
421
|
-
- spec/cassettes/Tacokit_Client_Webhooks/_update_webhook/updates_a_webhook.json
|
422
|
-
- spec/cassettes/Tacokit_Client_Webhooks/_webhook/returns_a_webhook_by_short_link.json
|
423
|
-
- spec/fixtures/taco.png
|
424
|
-
- spec/spec_helper.rb
|
425
|
-
- spec/tacokit/authorization_spec.rb
|
426
|
-
- spec/tacokit/client/actions_spec.rb
|
427
|
-
- spec/tacokit/client/boards_spec.rb
|
428
|
-
- spec/tacokit/client/cards_spec.rb
|
429
|
-
- spec/tacokit/client/checklists_spec.rb
|
430
|
-
- spec/tacokit/client/labels_spec.rb
|
431
|
-
- spec/tacokit/client/lists_spec.rb
|
432
|
-
- spec/tacokit/client/members_spec.rb
|
433
|
-
- spec/tacokit/client/notifications_spec.rb
|
434
|
-
- spec/tacokit/client/organizations_spec.rb
|
435
|
-
- spec/tacokit/client/searches_spec.rb
|
436
|
-
- spec/tacokit/client/tokens_spec.rb
|
437
|
-
- spec/tacokit/client/types_spec.rb
|
438
|
-
- spec/tacokit/client/webhooks_spec.rb
|
439
|
-
- spec/tacokit/client_spec.rb
|
440
|
-
- spec/tacokit/configuration_spec.rb
|
441
|
-
- spec/tacokit/middleware/raise_error_spec.rb
|
442
|
-
- spec/tacokit/resource_spec.rb
|
443
|
-
- spec/tacokit/transform_spec.rb
|
444
|
-
- spec/tacokit_spec.rb
|
187
|
+
test_files: []
|
188
|
+
has_rdoc:
|