Class: Fathom::Recording

Inherits:
Resource show all
Defined in:
lib/fathom/resources/recording.rb

Instance Attribute Summary

Attributes inherited from Resource

#attributes, #rate_limit_info

Class Method Summary collapse

Methods inherited from Resource

#[], #[]=, client, create, #delete, #id, #initialize, #inspect, #method_missing, #reload, resource_name, #respond_to_missing?, search, #to_h, #to_json, #update

Constructor Details

This class inherits a constructor from Fathom::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Fathom::Resource

Class Method Details

.all(_params = {}) ⇒ Object

Recordings don’t have a standard list endpoint

Raises:

  • (NotImplementedError)


30
31
32
33
# File 'lib/fathom/resources/recording.rb', line 30

def self.all(_params = {})
  raise NotImplementedError,
        "Recording.all is not supported. Recordings are accessed via Meeting#recording_id"
end

.get_summary(recording_id, destination_url: nil) ⇒ Hash

Get summary for a recording

Parameters:

  • recording_id (Integer)

    The recording ID

  • destination_url (String, nil) (defaults to: nil)

    Optional webhook URL for async delivery

Returns:

  • (Hash)

    Summary data or destination confirmation



11
12
13
14
15
16
# File 'lib/fathom/resources/recording.rb', line 11

def self.get_summary(recording_id, destination_url: nil)
  params = destination_url ? { destination_url: } : {}
  response = client.get("#{resource_path}/#{recording_id}/summary", params)

  response["summary"] || response
end

.get_transcript(recording_id, destination_url: nil) ⇒ Hash

Get transcript for a recording

Parameters:

  • recording_id (Integer)

    The recording ID

  • destination_url (String, nil) (defaults to: nil)

    Optional webhook URL for async delivery

Returns:

  • (Hash)

    Transcript data or destination confirmation



22
23
24
25
26
27
# File 'lib/fathom/resources/recording.rb', line 22

def self.get_transcript(recording_id, destination_url: nil)
  params = destination_url ? { destination_url: } : {}
  response = client.get("#{resource_path}/#{recording_id}/transcript", params)

  response["transcript"] || response
end

.resource_pathObject



5
# File 'lib/fathom/resources/recording.rb', line 5

def self.resource_path = "recordings"

.retrieve(_id) ⇒ Object

Recordings don’t have a standard retrieve endpoint Use get_summary or get_transcript instead

Raises:

  • (NotImplementedError)


37
38
39
40
# File 'lib/fathom/resources/recording.rb', line 37

def self.retrieve(_id)
  raise NotImplementedError,
        "Recording.retrieve is not supported. Use Recording.get_summary(id) or Recording.get_transcript(id)"
end