C# Класс OS2Indberetning.BuisnessLogic.APICaller

APICaller is responsible for handling API calling to the backend.
Показать файл Открыть проект

Открытые методы

Метод Описание
Couple ( string url, string username, string password ) : Task

Couples phone and user through a token id.

GetMunicipalityList ( ) : Task>

Fetches all possible Municipalitys

RefreshModel ( Authorization authorization, Municipality mun ) : Task

Fetches the UserInfoModel belonging to the token.

SubmitDrive ( DriveReport report, Authorization authorization, string munUrl ) : Task

Used to submit drivereport after finished drive.

Приватные методы

Метод Описание
APICaller ( ) : System
DeserializeError ( string jsonString ) : Error
IsValidJson ( string strInput ) : bool
RemoveTrailer ( UserInfoModel model ) : UserInfoModel

Removes Anhænger rate from UserInfoModel.Rates

Описание методов

Couple() публичный статический Метод

Couples phone and user through a token id.
public static Couple ( string url, string username, string password ) : Task
url string Url to post too.
username string
password string
Результат Task

GetMunicipalityList() публичный статический Метод

Fetches all possible Municipalitys
public static GetMunicipalityList ( ) : Task>
Результат Task>

RefreshModel() публичный статический Метод

Fetches the UserInfoModel belonging to the token.
public static RefreshModel ( Authorization authorization, Municipality mun ) : Task
authorization Authorization the token belonging to the user.
mun OS2Indberetning.Model.Municipality the Municipality the user belongs to.
Результат Task

SubmitDrive() публичный статический Метод

Used to submit drivereport after finished drive.
public static SubmitDrive ( DriveReport report, Authorization authorization, string munUrl ) : Task
report OS2Indberetning.Model.DriveReport the report of the drive.
authorization Authorization the token belonging to the user.
munUrl string the municipalicy url to be called
Результат Task