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.



131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/nylas/resources/notetakers.rb', line 131

def cancel(notetaker_id:, identifier: nil)
  path = if identifier
           "#{api_uri}/v3/grants/#{identifier}/notetakers/#{notetaker_id}/cancel"
         else
           "#{api_uri}/v3/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.



57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/nylas/resources/notetakers.rb', line 57

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

  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.



95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/nylas/resources/notetakers.rb', line 95

def download_media(notetaker_id:, identifier: nil, query_params: nil)
  path = if identifier
           "#{api_uri}/v3/grants/#{identifier}/notetakers/#{notetaker_id}/media"
         else
           "#{api_uri}/v3/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.



39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/nylas/resources/notetakers.rb', line 39

def find(notetaker_id:, identifier: nil, query_params: nil)
  path = if identifier
           "#{api_uri}/v3/grants/#{identifier}/notetakers/#{notetaker_id}"
         else
           "#{api_uri}/v3/grants/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.



113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/nylas/resources/notetakers.rb', line 113

def leave(notetaker_id:, identifier: nil)
  path = if identifier
           "#{api_uri}/v3/grants/#{identifier}/notetakers/#{notetaker_id}/leave"
         else
           "#{api_uri}/v3/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
28
29
30
31
# File 'lib/nylas/resources/notetakers.rb', line 20

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

  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.



76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/nylas/resources/notetakers.rb', line 76

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

  patch(
    path: path,
    request_body: request_body
  )
end