Class: Nylas::Notetakers

Inherits:
Resource show all
Includes:
ApiOperations::Delete, ApiOperations::Get, ApiOperations::Patch, ApiOperations::Post, ApiOperations::Put
Defined in:
lib/nylas/resources/notetakers.rb

Overview

Nylas Notetaker API

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Nylas::Resource

Instance Method Details

#cancel(notetaker_id:, identifier: nil) ⇒ Array(TrueClass, String)

Cancel a scheduled notetaker.

Parameters:

  • notetaker_id (String)

    The id of the notetaker to cancel.

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

    Grant ID or email account from which to delete an object.

Returns:

  • (Array(TrueClass, String))

    True and the API Request ID for the cancel operation.



127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/nylas/resources/notetakers.rb', line 127

def cancel(notetaker_id:, identifier: nil)
  base_path = "#{api_uri}/v3"
  path = if identifier
           "#{base_path}/grants/#{identifier}/notetakers/#{notetaker_id}/cancel"
         else
           "#{base_path}/notetakers/#{notetaker_id}/cancel"
         end

  _, request_id = delete(
    path: path
  )

  [true, request_id]
end

#create(request_body:, identifier: nil) ⇒ Array(Hash, String)

Invite a notetaker to a meeting.

Parameters:

  • request_body (Hash)

    The values to create the notetaker with.

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

    Grant ID or email account in which to create the object.

Returns:

  • (Array(Hash, String))

    The created notetaker and API Request ID.



54
55
56
57
58
59
60
61
# File 'lib/nylas/resources/notetakers.rb', line 54

def create(request_body:, identifier: nil)
  path = identifier ? "#{api_uri}/v3/grants/#{identifier}/notetakers" : "#{api_uri}/v3/notetakers"

  post(
    path: path,
    request_body: request_body
  )
end

#download_media(notetaker_id:, identifier: nil, query_params: nil) ⇒ Array(Hash, String)

Download notetaker media.

Parameters:

  • notetaker_id (String)

    The id of the notetaker to download media from.

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

    Grant ID or email account to query.

  • query_params (Hash, nil) (defaults to: nil)

    Query params to pass to the request.

Returns:

  • (Array(Hash, String))

    The media data and API request ID.



89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/nylas/resources/notetakers.rb', line 89

def download_media(notetaker_id:, identifier: nil, query_params: nil)
  base_path = "#{api_uri}/v3"
  path = if identifier
           "#{base_path}/grants/#{identifier}/notetakers/#{notetaker_id}/media"
         else
           "#{base_path}/notetakers/#{notetaker_id}/media"
         end

  get(
    path: path,
    query_params: query_params
  )
end

#find(notetaker_id:, identifier: nil, query_params: nil) ⇒ Array(Hash, String)

Return a notetaker.

Parameters:

  • notetaker_id (String)

    The id of the notetaker to return.

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

    Grant ID or email account to query.

  • query_params (Hash, nil) (defaults to: nil)

    Query params to pass to the request.

Returns:

  • (Array(Hash, String))

    The notetaker and API request ID.



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/nylas/resources/notetakers.rb', line 35

def find(notetaker_id:, identifier: nil, query_params: nil)
  base_path = "#{api_uri}/v3"
  path = if identifier
           "#{base_path}/grants/#{identifier}/notetakers/#{notetaker_id}"
         else
           "#{base_path}/notetakers/#{notetaker_id}"
         end

  get(
    path: path,
    query_params: query_params
  )
end

#leave(notetaker_id:, identifier: nil) ⇒ Array(Hash, String)

Remove a notetaker from a meeting.

Parameters:

  • notetaker_id (String)

    The id of the notetaker to remove.

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

    Grant ID or email account to query.

Returns:

  • (Array(Hash, String))

    The response data and API request ID.



108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/nylas/resources/notetakers.rb', line 108

def leave(notetaker_id:, identifier: nil)
  base_path = "#{api_uri}/v3"
  path = if identifier
           "#{base_path}/grants/#{identifier}/notetakers/#{notetaker_id}/leave"
         else
           "#{base_path}/notetakers/#{notetaker_id}/leave"
         end

  post(
    path: path,
    request_body: {}
  )
end

#list(identifier: nil, query_params: nil) ⇒ Array(Array(Hash), String, String)

Return all notetakers.

Parameters:

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

    Grant ID or email account to query.

  • query_params (Hash, nil) (defaults to: nil)

    Query params to pass to the request.

Returns:

  • (Array(Array(Hash), String, String))

    The list of notetakers, API Request ID, and next cursor.



20
21
22
23
24
25
26
27
# File 'lib/nylas/resources/notetakers.rb', line 20

def list(identifier: nil, query_params: nil)
  path = identifier ? "#{api_uri}/v3/grants/#{identifier}/notetakers" : "#{api_uri}/v3/notetakers"

  get_list(
    path: path,
    query_params: query_params
  )
end

#update(notetaker_id:, request_body:, identifier: nil) ⇒ Array(Hash, String)

Update a scheduled notetaker.

Parameters:

  • notetaker_id (String)

    The id of the notetaker to update.

  • request_body (Hash)

    The values to update the notetaker with

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

    Grant ID or email account in which to update an object.

Returns:

  • (Array(Hash, String))

    The updated notetaker and API Request ID.



69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/nylas/resources/notetakers.rb', line 69

def update(notetaker_id:, request_body:, identifier: nil)
  base_path = "#{api_uri}/v3"
  path = if identifier
           "#{base_path}/grants/#{identifier}/notetakers/#{notetaker_id}"
         else
           "#{base_path}/notetakers/#{notetaker_id}"
         end

  patch(
    path: path,
    request_body: request_body
  )
end