Class: Basecamp::Services::WormholesService

Inherits:
BaseService
  • Object
show all
Defined in:
lib/basecamp/generated/services/wormholes_service.rb

Overview

Service for Wormholes operations

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from Basecamp::Services::BaseService

Instance Method Details

#create(bucket_id:, card_table_id:, destination_recording_id:) ⇒ Hash

Create a wormhole linking this card table to a column on another card table.

Parameters:

  • bucket_id (Integer)

    bucket id ID

  • card_table_id (Integer)

    card table id ID

  • destination_recording_id (Integer)

    Id of the destination column (on another accessible card table) to link to.

Returns:

  • (Hash)

    response data



37
38
39
40
41
# File 'lib/basecamp/generated/services/wormholes_service.rb', line 37

def create(bucket_id:, card_table_id:, destination_recording_id:)
  with_operation(service: "wormholes", operation: "create", is_mutation: true, project_id: bucket_id, resource_id: card_table_id) do
    http_post("/buckets/#{bucket_id}/card_tables/#{card_table_id}/wormholes.json", body: compact_params(destination_recording_id: destination_recording_id)).json
  end
end

#delete(bucket_id:, wormhole_id:) ⇒ void

This method returns an undefined value.

Delete a wormhole

Parameters:

  • bucket_id (Integer)

    bucket id ID

  • wormhole_id (Integer)

    wormhole id ID



25
26
27
28
29
30
# File 'lib/basecamp/generated/services/wormholes_service.rb', line 25

def delete(bucket_id:, wormhole_id:)
  with_operation(service: "wormholes", operation: "delete", is_mutation: true, project_id: bucket_id, resource_id: wormhole_id) do
    http_delete("/buckets/#{bucket_id}/card_tables/wormholes/#{wormhole_id}")
    nil
  end
end

#update(bucket_id:, wormhole_id:, destination_recording_id:) ⇒ Hash

Update a wormhole's destination column

Parameters:

  • bucket_id (Integer)

    bucket id ID

  • wormhole_id (Integer)

    wormhole id ID

  • destination_recording_id (Integer)

    Id of the new destination column (on another accessible card table).

Returns:

  • (Hash)

    response data



15
16
17
18
19
# File 'lib/basecamp/generated/services/wormholes_service.rb', line 15

def update(bucket_id:, wormhole_id:, destination_recording_id:)
  with_operation(service: "wormholes", operation: "update", is_mutation: true, project_id: bucket_id, resource_id: wormhole_id) do
    http_put("/buckets/#{bucket_id}/card_tables/wormholes/#{wormhole_id}", body: compact_params(destination_recording_id: destination_recording_id)).json
  end
end