Ejemplo n.º 1
0
 public void RequestData()
 {
     currentState =
         (JawboneState)WebClientHelper.RequestJSONData(typeof(JawboneState),
                                                       this.location + "bandevents",
                                                       jawboneKey);
     if (StateChanged != null)
     {
         StateChanged(this, new DeviceStateChangedEventArgs(currentState));
     }
 }
Ejemplo n.º 2
0
        public void RequestData()
        {
            GreenIQConfigurationResponse resp =
                (GreenIQConfigurationResponse)WebClientHelper.RequestJSONData(typeof(GreenIQConfigurationResponse),
                                                                              this.location + "get_valves_state_and_config.php?access_token=" + accessKey, null);
            GreenIQHubState state = new GreenIQHubState();

            state.PortsConfiguration = resp.data;
            currentState             = state;
            this.StateChanged(this, new DeviceStateChangedEventArgs(state));
        }