Method: Twilio::REST::Chat::V2::ServiceContext::UserContext::UserChannelList#list

Defined in:
lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb

#list(limit: nil, page_size: nil) ⇒ Array

Lists UserChannelInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:

  • limit (Integer) (defaults to: nil)

    Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit

  • page_size (Integer) (defaults to: nil)

    Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)

Returns:

  • (Array)

    Array of up to limit results



49
50
51
52
53
54
# File 'lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb', line 49

def list(limit: nil, page_size: nil)
    self.stream(
        limit: limit,
        page_size: page_size
    ).entries
end