Exemple #1
0
        /// <inheritdoc />
        public async Task <INanoLeaf> CreateNanoLeafAsync()
        {
            var authorizationToken = await CreateAuthorizationTokenAsync();

            var apiContext = new NanoLeafApiContext(authorizationToken, _httpClient);

            return(new NanoLeaf(apiContext));
        }
Exemple #2
0
        internal NanoLeaf(NanoLeafApiContext apiContext)
        {
            _apiContext = apiContext ?? throw new ArgumentNullException(nameof(apiContext));

            State       = new NanoLeafState(_apiContext);
            Effects     = new NanoLeafEffects(_apiContext);
            PanelLayout = new NanoLeafPanelLayout(_apiContext);
            Rhythm      = new NanoLeafRhythm(_apiContext);
        }
Exemple #3
0
 public NanoLeafState(NanoLeafApiContext apiContext)
 {
     _apiContext = apiContext ?? throw new ArgumentNullException(nameof(apiContext));
 }
Exemple #4
0
 public NanoLeafPanelLayout(NanoLeafApiContext apiContext)
 {
     _apiContext = apiContext ?? throw new ArgumentNullException(nameof(apiContext));
 }
Exemple #5
0
        /// <inheritdoc />
        public INanoLeaf CreateNanoLeaf(string authorizationToken)
        {
            var apiContext = new NanoLeafApiContext(authorizationToken, _httpClient);

            return(new NanoLeaf(apiContext));
        }