示例#1
0
        public async Task <ResponseModel <User> > Login(LoginModel loginModel)
        {
            HunterAPI hunterAPI = new HunterAPI(context);
            var       result    = await hunterAPI.Authenticate(loginModel);

            return(result);
        }
示例#2
0
        public async Task <ResponseModel <Tasks[]> > GetDeviceTasks()
        {
            ResponseModel <Tasks[]> responseModel = new ResponseModel <Tasks[]>();
            HunterAPI hunterAPI = new HunterAPI(context);

            responseModel = await hunterAPI.GetDeviceTasks();

            if (responseModel.Entity != null & responseModel.Entity.Length > 0)
            {
                File.WriteAllText(path, JsonConvert.SerializeObject(responseModel.Entity));
            }

            return(responseModel);
        }
示例#3
0
 public async Task PostTasksData(TaskData taskData)
 {
     HunterAPI hunterAPI = new HunterAPI(context);
     await hunterAPI.PostTasksData(taskData);
 }