Skip to content

Get started

iAlexeyProkhorov edited this page Mar 4, 2021 · 1 revision

We try create most simple for understanding library model. You need to do few steps to start working with client:

  • Create your personal 'Nova Poshta' account and generate your Api key. Detailed how to do this you can find here.
  • You need to create class implementing interface INovaPoshtaGateway. Or you can use our default class DefaultNovaPoshtaGateway. Copy your API key created at first step and paste it in ApiKey parameter or your gateway instance like here:

using Baroque.NovaPoshta.Client;

var gateway = new DefaultNovaPoshtaGateway("yourkey");

  • Great! You create instance of Nova Poshta gateway. Now you can use API services, which are located in namespace Baroque.NovaPoshta.Client.Services. For example you can try get CommonService.

using Baroque.NovaPoshta.Client.Services.Common;

void Run() { var gateway = new DefaultNovaPoshtaGateway("yourkey"); var commonService = new CommonService(gateway); }

  • All other services connect by same way.
  • Now you can use all other services in your application.
Clone this wiki locally