public string PushNotifiCall(ApiHeader apiHeader, string id)
        {
            var url    = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.PushNotifiCall, id);
            var result = Restful.Get(url, apiHeader);

            return(result["callId"].ToString());
        }
Example #2
0
        public UserModel CheckExpiredAndGetUser(string email, string hash)
        {
            var data = Restful.Get(ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.CheckExpired, hash, email));
            var user = data.Get <UserModel>(ApiKeyData.Profile);

            return(user);
        }
Example #3
0
        public ApiHeader ActiveUser(ApiHeader apiHeader, CreateNewPasswordModel model)
        {
            var       url    = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.ActiveClinic, model.Hash, model.Email);
            var       data   = Restful.Get(url, apiHeader);
            ApiHeader header = data.Get <ApiHeader>();

            CreatePassword(header, model);
            return(header);
        }
Example #4
0
        public HospitalModel GetClinicInforForPartner(string lang, string hospitalId)
        {
            var       url       = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.GetClinicInforForPartner, hospitalId);
            ApiHeader apiHeader = new ApiHeader();

            apiHeader.Lang  = lang;
            apiHeader.Token = GlobalConstant.TokenForParner;
            return(Restful.Get(url, apiHeader).Get <HospitalModel>(ApiKeyData.Hospital));
        }
Example #5
0
        public UserModel GetProfile(ApiHeader apiHeader, string id)
        {
            var       url    = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.GetUserProfile, id);
            var       data   = Restful.Get(url, apiHeader);
            UserModel result = data.Get <UserModel>(ApiKeyData.User);

            result.AppointmentCount = (string)data["appointmentCount"];
            return(result);
        }
        public IList <AppointmentResult> Get(ApiHeader apiHeader, string hospitalId, string doctorId, string status,
                                             long?startDate, long?endDate, int start, int lenght, string keyword, bool searchExactly, SortField orderBy, SortType sortType)
        {
            var url = ApiUrl.Default.RootApi +
                      string.Format(ApiUrl.Default.ListAppointment, hospitalId, doctorId, status, startDate, endDate,
                                    start, lenght, keyword, searchExactly, orderBy.DescriptionAttr(), sortType.DescriptionAttr());
            var data = Restful.Get(url, apiHeader);

            _total = data["total"].ToObject <int>();
            return(data.GetList <AppointmentResult>(ApiKeyData.ListAppointment));
        }
Example #7
0
        public IList <HospitalModel> ListHospitals(ApiHeader apiHeader, string status = "all", string signUpStatus = null,
                                                   int start     = GlobalConstant.StartIndex, int length = GlobalConstant.Length, bool showAdmin = false,
                                                   string search = null, bool searchExactly              = true)
        {
            var url = ApiUrl.Default.RootApi +
                      string.Format(ApiUrl.Default.ListHospital, status, signUpStatus, start, length, showAdmin, searchExactly, search);
            var data = Restful.Get(url, apiHeader);

            _total = data["total"].ToObject <int>();
            return(data.GetList <HospitalModel>(ApiKeyData.ListHospital));
        }
Example #8
0
        public void ConfirmInviteUser(ApiHeader apiHeader, string hash, string email)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.ConfirmInvitationUser, hash, email);

            Restful.Get(url, apiHeader);
        }
        public AppointmentResult GetById(ApiHeader apiHeader, string id)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.GetAppointmentById, id);

            return(Restful.Get(url, apiHeader).Get <AppointmentResult>(ApiKeyData.Appointment));
        }
Example #10
0
        public UserModel GetUserDetails(string id)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.GetUserDetails, id);

            return(Restful.Get(url, null).Get <UserModel>(ApiKeyData.Doctor));
        }
Example #11
0
        public IList <DoctorResult> GetDoctorsByClinic(string clinicId)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.GetDoctorsByClinic, clinicId);

            return(Restful.Get(url, null).GetList <DoctorResult>(ApiKeyData.ListDoctor));
        }
Example #12
0
        public void ResendActiveEmail(ApiHeader apiHeader, string email)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.ResendActiveEmail, email);

            Restful.Get(url, apiHeader);
        }
Example #13
0
        public void ReOpenAccount(ApiHeader apiHeader, string userId, string hospitalId)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.ReOpenAccount, userId, hospitalId);

            Restful.Get(url, apiHeader);
        }
Example #14
0
        public HospitalModel GetById(ApiHeader apiHeader, string id)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.GetClinic, id);

            return(Restful.Get(url, apiHeader).Get <HospitalModel>(ApiKeyData.Hospital));
        }
Example #15
0
        public void ForgotPassword(string email)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.ForgotPassword, email);

            Restful.Get(url);
        }
Example #16
0
        public ClinicResult GetDetails(string id)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.GetClinicDetails, id);

            return(Restful.Get(url, null).Get <ClinicResult>());
        }
Example #17
0
        public void ApproveClinic(ApiHeader apiHeader, string id)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.ApproveClinic, id);

            Restful.Get(url, apiHeader);
        }
Example #18
0
        public BankModel GetBankAccount(string clinicId)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.GetBankAccount, clinicId);

            return(Restful.Get(url, null).Get <BankModel>(ApiKeyData.BankAccount));
        }
Example #19
0
        public IList <PriceModel> Get(string clinicId)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.ListPricing, clinicId);

            return(Restful.Get(url, null).GetList <PriceModel>(ApiKeyData.Pricing));
        }
Example #20
0
        public void CheckExpired(ApiHeader apiHeader, string hash, string email)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.CheckExpired, hash, email);

            Restful.Get(url, apiHeader);
        }
Example #21
0
        public void FinishCall(ApiHeader apiHeader, string id, int status)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.CallStatus, id, status);

            Restful.Get(url, apiHeader);
        }
Example #22
0
        public PatientModel GetById(ApiHeader apiHeader, string id)
        {
            var url = ApiUrl.Default.RootApi + string.Format(ApiUrl.Default.GetUserProfile, id);

            return(Restful.Get(url, apiHeader).Get <PatientModel>(ApiKeyData.Patient));
        }