Ejemplo n.º 1
0
 protected void BtnGetHitInfo_Click(object sender, EventArgs e)
 {
     AmtService myService = new AmtService(false);
     var hitInfo = myService.GetHit(312);
     var json = JsonConvert.SerializeObject(hitInfo);
     LitGetHitInfo.Text = json;
 }
Ejemplo n.º 2
0
 protected void BtnGetStats_Click(object sender, EventArgs e)
 {
     AmtService myService = new AmtService(false);
     var stats = myService.RequesterStatistics();
     var json = JsonConvert.SerializeObject(stats, Formatting.Indented);
     LitStats.Text = "<pre>" + json + "</pre>";
 }
Ejemplo n.º 3
0
 protected void BtnCreateQualification_Click(object sender, EventArgs e)
 {
     AmtService myService = new AmtService(true);
     var qualType = myService.CreateQualificationType("Test Qualification", "Test, Qualification, Anything", "You must have this qualification to become happy.");
     var json = JsonConvert.SerializeObject(qualType, Formatting.Indented);
     LitStats.Text = "<pre>" + json + "</pre>";
 }
Ejemplo n.º 4
0
 protected void BtnNotifyWorkers_Click(object sender, EventArgs e)
 {
     AmtService myService = new AmtService(false);
     var workers = new List<string>();
     workers.Add("ABCD");
     myService.NotifyWorkers("Hello", "This is just a test message.", workers);
     LitNotifyWorkers.Text = "Message has been sent. Check your mail.";
 }
Ejemplo n.º 5
0
        public AmtServiceResponse GetBalance(AmtServiceRequest request)
        {
            // Check input
            request.Operation = "GetBalance";

            // Check authorization
            if (!IsAuthorized(request.ApiKey)) return NotAuthorized(request);

            AmtService myService = new AmtService(request.Sandbox);
            return new AmtServiceResponse { Operation = "GetAccountBalance", Result = myService.GetAccountBalance() };
        }
Ejemplo n.º 6
0
 protected void BtnTestBonus_Click(object sender, EventArgs e)
 {
     AmtService myService = new AmtService(false);
     LitTestBonus.Text = myService.CheckBonus("2NTX3V0FK0COAYEQIPYPPK9OW5PGNS", "ABCD").ToString();
 }
Ejemplo n.º 7
0
 protected void BtnGetBalance_Click(object sender, EventArgs e)
 {
     AmtService myService = new AmtService(true);
     LitGetBalance.Text = myService.GetAccountBalance();
 }
Ejemplo n.º 8
0
 protected void BtnExtendHit_Click(object sender, EventArgs e)
 {
     AmtService myService = new AmtService(true);
     myService.ExtendHit("336OE47KI2L0EIRGL15BOPV77FJVWO", 10, 10000);
 }
Ejemplo n.º 9
0
 protected void BtnCreateHit_Click(object sender, EventArgs e)
 {
     AmtService myService = new AmtService(true);
     myService.CreateHit(0);
     LitCreateHit.Text = "Hit created!";
 }
Ejemplo n.º 10
0
 protected void BtnAssignQualification_Click(object sender, EventArgs e)
 {
     AmtService myService = new AmtService(true);
     //myService.AssignQualification("39CRKCMYSX0544OHRWQE8IJFOJSSO8", "ABCD", 100, true);
     //myService.RevokeQualification("39CRKCMYSX0544OHRWQE8IJFOJSSO8", "ABCD", "Sorry, you are too stupid.");
 }