EndlessStreamingServiceBeta.viaToken constructor

EndlessStreamingServiceBeta.viaToken(
  1. String typeToken,
  2. String token, {
  3. String? cloudSpeechEndpoint,
})

Creates a EndlessStreamingService interface using a token. You are responsible for updating the token when it expires.

Implementation

factory EndlessStreamingServiceBeta.viaToken(String typeToken, String token,
        {String? cloudSpeechEndpoint}) =>
    EndlessStreamingServiceBeta._(
        CallOptions(metadata: {'authorization': '$typeToken $token'}),
        cloudSpeechEndpoint: cloudSpeechEndpoint);