Skip to content

The official .NET wrapper for the BlackProxies API.

License

Notifications You must be signed in to change notification settings

Laiteux/BlackProxiesSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlackProxiesSharp Latest release License

The official .NET wrapper for the BlackProxies API.

  • Task<PackageModel> GetAsync()
  • Task<PackageModel> StartAsync(IEnumerable<string> ips)
  • Task<IEnumerable<string>> GetProxiesAsync(string format = "host:port")
  • Task<PackageModel> PauseAsync()
  • Task<PackageModel> ResumeAsync()
  • Task<PackageModel> RefreshPoolAsync()
  • Task<PackageModel> UpdateWhitelistedIPsAsync(IEnumerable<string> ips)

Example usage:

var package = new PackageApi("c212010f-aaa6-4ab4-a6cc-0e8485fedb4c");

IEnumerable<string> proxies = await package.GetProxiesAsync();

await File.WriteAllLinesAsync("Proxies.txt", proxies);

The above code will retrieve a package proxy list and save it to a Proxies.txt file.

  • Task<ResellerModel> GetAsync()
  • Task<string> DepositAsync(double amount)
  • Task<string> PurchasePackageAsync(int planId, int additionalTrafficGB = 0)
  • Task<string> PurchasePackageAsync(PlanModel plan, int additionalTrafficGB = 0)

Example usage:

var reseller = new ResellerApi("f2c5b80f-d57f-4403-82b2-c35bd7d4506b");

List<PlanModel> plans = (await reseller.GetAsync()).Plans;
PlanModel trialPlan = plans.Single(p => p.Billing == BillingType.Hourly);

string package = await reseller.PurchasePackageAsync(trialPlan);
Console.WriteLine($"Purchased trial plan. Package ID: {package}");

The above code will retrieve a reseller plan list and make a purchase for the trial (hourly) plan.