Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

40 Commits

Repository files navigation

BalikoBotSharp

BalikoBot .NET Standard 2.0 (netstandard2.0). By BalikoBot documentation 1.876.

Supports

  • Dependency injection by Factory pattern BalikoBotFactory
  • Use Add function error messages and general Status codes of API
  • All common API functions by reference

Config

Implement IBalikoBotConfiguration to your config file or use More in BalikoBot.Tests project, file: TestOptions.cs.

publicclassTestOptions:IBalikoBotConfiguration{publicstringUsername{get;set;}publicstringPassword{get;set;}}

Start

Use IBalikoBotConfiguration and IHttpClientFactory for common constructor call.

_balikoBot=newBalikoBotClientFactory(options,clientFactory);

With Dependency injection

More in BalikoBot.Tests project, file: TestFixture.cs and BasicTest.cs.

// DI configurationservices.AddSingleton<IBalikoBotConfiguration>(Options);services.AddScoped<BalikoBotClientFactory>();services.AddHttpClient();// in constructor_balikoBot=test.Services.GetRequiredService<BalikoBotClientFactory>();

Add package to the front. With address, cost of delivery (COD), sizes and weight and all possible API parameters (by API documentation).

vardata=newBalikoBotData(DateTime.Now.ToString("yyyyMMddHHmmss"),"8").AddDoruceni("john@carter.com","+420777555666","John Carter","Hlavni 12","Praha 9","19000","CZ").AddCena(1450m).AddRozmeryHmotnost(40.5m,60m,30m,2.5m).AddSafe(BalikoBotData.REC_FIRM,"Moje s.r.o.");await_balikoBot.PplClient.Add(data);

Check do everything checks as Add.

await_balikoBot.PplClient.Check(data)

Drop package from front.

await_balikoBot.CpClient.Drop(r1.PackageId);

Overview method to get list of packages in the front (added by Add method).

await_balikoBot.CpClient.Overview();

Package returns all package data from API.

await_balikoBot.CpClient.Package(packageId);

Labels create link of Labels PDF for given packages.

await_balikoBot.CpClient.Labels(packageId);

Order order carrier for package.

await_balikoBot.CpClient.Order(packageId);

OrderView get list of ordered packages.

await_balikoBot.CpClient.OrderView(orderId);

Track method to get list of tracking information.

await_balikoBot.CpClient.Track(carrierId);

TrackStatus get last tracking status.

await_balikoBot.CpClient.TrackStatus(carrierId);

Other

  • await _balikoBot.CpClient.Services(); - list of all carier services
  • await _balikoBot.CpClient.Countries4service(serviceType); - list of all countries for service
  • await _balikoBot.PplClient.ZipCodes(serviceType); - list of all ZIP codes for service
  • await _balikoBot.ZasilkovnaClient.Branches(serviceType); - list of all Branches for service

Releases

Packages

Used by

Contributors

Languages