public string CheckBookStatus(string title) { var status = BibliothecaClient.ExecuteGet <BookStatus?>($"books/{title}/check"); if (status.HasValue) { if (status.Value == BookStatus.Available) { return("Book is available for the taking"); } else { return("Book is already taken"); } } else { return("Book not found"); } }
public Book[] GetTakenBooks(int id) { return(BibliothecaClient.ExecuteGet <Book[]>($"accounts/{id}/books")); }
public Account GetAccount(int id) { return(BibliothecaClient.ExecuteGet <Account>($"accounts/{id}")); }
public Account[] GetAccounts() { return(BibliothecaClient.ExecuteGet <Account[]>("accounts")); }
public Book GetBook(int id) { return(BibliothecaClient.ExecuteGet <Book>($"books/{id}")); }
public Book[] GetBooks() { return(BibliothecaClient.ExecuteGet <Book[]>("books")); }