EndlessStreamingServiceV2.viaToken constructor

EndlessStreamingServiceV2.viaToken(
  1. String typeToken,
  2. String token, {
  3. required String projectId,
  4. String? cloudSpeechEndpoint,
  5. String? location,
})

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

Implementation

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