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; }
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>"; }
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>"; }
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."; }
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() }; }
protected void BtnTestBonus_Click(object sender, EventArgs e) { AmtService myService = new AmtService(false); LitTestBonus.Text = myService.CheckBonus("2NTX3V0FK0COAYEQIPYPPK9OW5PGNS", "ABCD").ToString(); }
protected void BtnGetBalance_Click(object sender, EventArgs e) { AmtService myService = new AmtService(true); LitGetBalance.Text = myService.GetAccountBalance(); }
protected void BtnExtendHit_Click(object sender, EventArgs e) { AmtService myService = new AmtService(true); myService.ExtendHit("336OE47KI2L0EIRGL15BOPV77FJVWO", 10, 10000); }
protected void BtnCreateHit_Click(object sender, EventArgs e) { AmtService myService = new AmtService(true); myService.CreateHit(0); LitCreateHit.Text = "Hit created!"; }
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."); }