Exemplo n.º 1
0
        public async Task <dynamic> AuthenticateUser(string Email, string Password)
        {
            string jsonResult = await _connection.PostData("User/GetByCredentials", String.Empty,
                                                           HttpSimpleParameters.Of("Email", Email),
                                                           HttpSimpleParameters.Of("Password", Password));

            return(JObject.Parse(jsonResult));
        }
Exemplo n.º 2
0
        public async Task <bool> DeleteCompany(string companyId)
        {
            string jsonResult = await _connection.PostData("DeleteCompany",
                                                           HttpSimpleParameters.Of("Id", companyId));

            dynamic result = JObject.Parse(jsonResult);

            return(result.Success);
        }
Exemplo n.º 3
0
        public async Task <bool> CreateCompany(Company company)
        {
            string jsonResult = await _connection.PostData("CreateCompany",
                                                           HttpSimpleParameters.Of("ShortName", company.ShortName),
                                                           HttpSimpleParameters.Of("LongName", company.LongName),
                                                           HttpSimpleParameters.Of("OwnerClient", company.OwnerClient),
                                                           HttpSimpleParameters.Of("RegisterTime", company.RegisterTime.ToString()));

            dynamic result = JObject.Parse(jsonResult);

            return(result.Success);
        }
Exemplo n.º 4
0
        public async Task <dynamic> EditBlockUserText(string SiteId, string Text, string Token)
        {
            string jsonResult = await _connection.SimplePostData("Site/EditBlockUserText", Token, HttpSimpleParameters.Of("_id", SiteId), HttpSimpleParameters.Of("Text", Text));

            return(JObject.Parse(jsonResult));
        }
Exemplo n.º 5
0
        public async Task <dynamic> DeleteSite(string SiteId, string Token)
        {
            string jsonResult = await _connection.SimplePostData("Site/Delete", Token, HttpSimpleParameters.Of("_id", SiteId));

            return(JObject.Parse(jsonResult));
        }
Exemplo n.º 6
0
        public async Task <dynamic> BlockUser(string SocketId, string Token)
        {
            string jsonResult = await _connection.SimplePostData("Ip/BlockUser", Token, HttpSimpleParameters.Of("SocketId", SocketId));

            return(JObject.Parse(jsonResult));
        }
Exemplo n.º 7
0
        public async Task <dynamic> CheckIfHasNoPaymentMethodByUserId(string UserId, string Token)
        {
            string jsonResult = await _connection.SimplePostData("Payment/CheckIfHasNoPaymentMethodByUserId", Token, HttpSimpleParameters.Of("UserId", UserId));

            return(JObject.Parse(jsonResult));
        }
Exemplo n.º 8
0
        public async Task <dynamic> DeleteUser(string UserId, string Token)
        {
            string jsonResult = await _connection.SimplePostData("User/DeleteByUserId", Token, HttpSimpleParameters.Of("UserId", UserId));

            return(JObject.Parse(jsonResult));
        }
Exemplo n.º 9
0
        public async Task <dynamic> DeleteNotification(string NotificationId, string Token)
        {
            string jsonResult = await _connection.SimplePostData("Notification/Delete", Token, HttpSimpleParameters.Of("_id", NotificationId));

            return(JObject.Parse(jsonResult));
        }
Exemplo n.º 10
0
        public async Task <dynamic> VerifyVoucher(string VoucherId)
        {
            string jsonResult = await _connection.SimplePostData("/Payment/Voucher/VerifyVoucher", String.Empty, HttpSimpleParameters.Of("VoucherId", VoucherId));

            return(JObject.Parse(jsonResult));
        }