Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RoomMembershipApi" /> class.
 /// See <see cref="Factories.PodApiFactory"/> for conveniently constructing
 /// an instance.
 /// </summary>
 /// <param name="authTokens">Authentication tokens.</param>
 /// <param name="configuration">Api configuration.</param>
 /// <param name="apiExecutor">Execution strategy.</param>
 public RoomMembershipApi(IAuthTokens authTokens, string baseUrl, HttpClient httpClient, IApiExecutor apiExecutor)
 {
     _roomMembershipApi = new Generated.OpenApi.PodApi.AdminClient(baseUrl, httpClient);
     _roomApi           = new Generated.OpenApi.PodApi.RoomClient(baseUrl, httpClient);
     _authTokens        = authTokens;
     _apiExecutor       = apiExecutor;
     _log = ApiLogging.LoggerFactory?.CreateLogger <RoomMembershipApi>();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StreamsApi" /> class.
        /// See <see cref="Factories.PodApiFactory"/> for conveniently constructing
        /// an instance.
        /// </summary>
        /// <param name="authTokens">Authentication tokens.</param>
        /// <param name="configuration">Api configuration.</param>
        /// <param name="apiExecutor">Execution strategy.</param>
        public StreamsApi(IAuthTokens authTokens, string baseUrl, HttpClient httpClient, IApiExecutor apiExecutor)
        {
            _streamsApi = new Generated.OpenApi.PodApi.StreamsClient(baseUrl, httpClient);
            _imApi      = new Generated.OpenApi.PodApi.ImClient(baseUrl, httpClient);
            _roomApi    = new RoomClient(baseUrl, httpClient);

            _authTokens  = authTokens;
            _apiExecutor = apiExecutor;

            _log = ApiLogging.LoggerFactory?.CreateLogger <StreamsApi>();
        }