Exemplo n.º 1
0
        /// <inheritdoc />
        public async Task <INanoLeaf> CreateNanoLeafAsync()
        {
            var authorizationToken = await CreateAuthorizationTokenAsync();

            var apiContext = new NanoLeafApiContext(authorizationToken, _httpClient);

            return(new NanoLeaf(apiContext));
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public NanoLeafState(NanoLeafApiContext apiContext)
 {
     _apiContext = apiContext ?? throw new ArgumentNullException(nameof(apiContext));
 }
Exemplo n.º 4
0
 public NanoLeafPanelLayout(NanoLeafApiContext apiContext)
 {
     _apiContext = apiContext ?? throw new ArgumentNullException(nameof(apiContext));
 }
Exemplo n.º 5
0
        /// <inheritdoc />
        public INanoLeaf CreateNanoLeaf(string authorizationToken)
        {
            var apiContext = new NanoLeafApiContext(authorizationToken, _httpClient);

            return(new NanoLeaf(apiContext));
        }