private ApiContext() { appConfig = onedrive.ReadConfig <AqaraConfiguration>("aqaraCloud"); tokenConfig = onedrive.ReadConfig <Token>("aqaraCloud.token"); api = new AqaraClient(appConfig); api.SetCredentials(tokenConfig.AccessToken); }
public void Initialize() { instance = ApiContext.Api; config = ApiContext.Config; }