public void RequestData()
 {
     currentState =
         (JawboneState)WebClientHelper.RequestJSONData(typeof(JawboneState),
                                                       this.location + "bandevents",
                                                       jawboneKey);
     if (StateChanged != null)
     {
         StateChanged(this, new DeviceStateChangedEventArgs(currentState));
     }
 }
Exemple #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));
        }