public void Heartbeat(WebClient agent, StationDetail detail)
        {
            Dictionary <object, object> parameters = new Dictionary <object, object>
            {
                { CloudServer.PARAM_SESSION_TOKEN, this.Token },
                { CloudServer.PARAM_STATION_ID, this.Id },
                { CloudServer.PARAM_API_KEY, CloudServer.APIKey },
                { CloudServer.PARAM_DETAIL, detail.ToFastJSON() }
            };

            StationHeartbeatResponse res =
                CloudServer.requestPath <StationHeartbeatResponse>(agent, "stations/heartbeat", parameters);
        }
        public StationLogOnResponse LogOn(WebClient agent, StationDetail detail)
        {
            Dictionary <object, object> parameters = new Dictionary <object, object>
            {
                { CloudServer.PARAM_SESSION_TOKEN, this.Token },
                { CloudServer.PARAM_STATION_ID, this.Id },
                { CloudServer.PARAM_API_KEY, CloudServer.APIKey },
                { CloudServer.PARAM_DETAIL, detail.ToFastJSON() }
            };

            StationLogOnResponse res =
                CloudServer.requestPath <StationLogOnResponse>(agent, "stations/logOn", parameters);

            this.Token = res.session_token;
            return(res);
        }
        public static StationLogOnResponse LogOn(WebClient agent, string stationId, string email, string passwd, StationDetail detail)
        {
            Dictionary <object, object> param = new Dictionary <object, object>
            {
                { CloudServer.PARAM_EMAIL, email },
                { CloudServer.PARAM_PASSWORD, passwd },
                { CloudServer.PARAM_STATION_ID, stationId },
                { CloudServer.PARAM_API_KEY, CloudServer.APIKey },
                { CloudServer.PARAM_DETAIL, detail.ToFastJSON() }
            };

            StationLogOnResponse res = CloudServer.requestPath <StationLogOnResponse>(agent, "stations/logOn", param);

            return(res);
        }