Skip to content

Iran bus driving system (Safar724) for DotNet (Api-WebService)

Notifications You must be signed in to change notification settings

keyone2693/IRBusDotNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IRBusDotNet

Iran Bus Service Package

Webservice package for iran bus api on safar724 website

Development

Before posting new issues: Test samples

Note that: you should register on safar724 website and get your username and password to using this package

Build status NuGet

Current version: 2.0.x [Stable]

Overview

Cross-platform by design

you can use it in both .net core and .net framework its use .net standard

Easy to install

Use library as dll, reference from nuget or just use this in package manager console

Install-Package IRBusDotNet

Features

Currently the library supports following method:


  • [*] Getcode
  • [*] GetToken
  • [*] ValidateToken
  • [*] GetCities
  • [*] GetServices
  • [*] GetBusService
  • [*] BuyTicket
  • [*] InfoBuyTicket
  • [*] RefundOverviewTicket
  • [*] RefundTicket
  • [*] GetTokenAsync
  • [*] GetCitiesAsync
  • [*] GetServicesAsync
  • [*] GetBusServiceAsync
  • [*] BuyTicketAsync
  • [*] InfoBuyTicketAsync
  • [*] RefundOverviewTicketAsync
  • [*] RefundTicketAsync

Easy to use

Get Token (save it in database)

IIRBusApi api = new IRBusApi();        
var token = api.GetToken("Username","Password");       
Note: the grant_type is password by default

Validate Token

bool flag = api.ValidateToken(token.Created,token.ExpireIn);

GetCities:

This method lists all of the cities with a specific ID. Provided ID is required for further methods.Since list of cities rarely changes, caching the list for feature use is highly recommended:
IBusApi _api = new BusApi(token.AccessToken);
var cities = _api.GetCities();

GetServices:

Output Array of the Bus Summary object

GetBusService:

Get a specific service
This method returns detailed information of the specific bus

BuyTicket:

this method books a ticket from the specific service and returns aticket ID.
If online payment method is selected, this method also will returna payment endpoint.
To finalize the booking processfor the online payment method,
user must be redirected to the provided endpoint and should complete payment process within 10 minutes,
then ticket issuccessfully booked and ticket number isissued

InfoBuyTicket:

Get a specific ticket
This method returns detailed information of the specific ticket

RefundOverviewTicket:

Get refund overview of a ticket
This method returns detailed information about a ticket which is subjectto refund

RefundTicket:

This method actually refunds the ticket

License

MIT

About

Iran bus driving system (Safar724) for DotNet (Api-WebService)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages