Coder Social home page Coder Social logo

balikobotsharp's Introduction

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.

public class TestOptions : IBalikoBotConfiguration
{
	public string Username { get; set; }
	public string Password { get; set; }
}

Start

Use IBalikoBotConfiguration and IHttpClientFactory for common constructor call.

_balikoBot = new BalikoBotClientFactory(options, clientFactory);

With Dependency injection

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

// DI configuration
services.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).

var data = new BalikoBotData(DateTime.Now.ToString("yyyyMMddHHmmss"), "8")
	.AddDoruceni("[email protected]", "+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

balikobotsharp's People

Contributors

msigut avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.