Is there a sample C# program?

Discussion in 'Control Panel API' started by Tonyg, Aug 25, 2018.

  1. Hello,

    Is there a sample API program available in C#?

    Thanks,
    Tony
     
  2. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Sample API to what exactly?
     
  3. Ray,

    Just something as simple as getting one users email address.

    Anything to see how a call is made.

    Thanks,
    Tony
     
  4. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

  5. OK. Pretty simple:
    Code:
    private void Form1_Load(object sender, EventArgs e)
              {
                   API.CustomerApi api = new API.CustomerApi();
                   bool verif = api.VerifyKey("MyVerifyKey");
                   int diskUsageQuotaTotal = api.DiskQuotaGetUsageTotal("MyVerifyKey");
              }
    Thanks Ray.

    Tony
     
    RayH likes this.
  6. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Thanks for posting the code, Tony. I'm sure it will help someone else down the road.
     

Share This Page