Beispiel #1
0
 public static void RequestsLibraryLink(Guid transactionId, Guid libraryId, Guid userId,
                                        Guid targetLibraryId)
 {
     command =
         WhenCommand(new RequestLink(transactionId, libraryId, userId, targetLibraryId));
     command.IsPOSTedTo($"/libraries/{libraryId}/links/request");
 }
Beispiel #2
0
 public static void RemovesBookFromLibrary(Guid transactionId, Guid libraryId, Guid userId, string title, string author,
                                           string isbn, int publishYear)
 {
     command =
         WhenCommand(new RemoveBookFromLibrary(transactionId, libraryId, userId, title, author, isbn,
                                               publishYear));
     command.IsPOSTedTo($"/libraries/{libraryId}/books/remove");
 }
Beispiel #3
0
 public static void AddsBookToLibrary(Guid transactionId, Guid libraryId, Guid userId, string title, string author,
                                      string isbn, int publishYear)
 {
     command =
         WhenCommand(new AddBookToLibrary(transactionId, libraryId, userId, title, author, isbn,
                                          publishYear));
     command.IsPOSTedTo($"/libraries/{libraryId}/books/add");
 }
 public static PostCallBuilder WhenCommand(AuthenticatedCommand command)
 {
     whenPostCallBuilder = new PostCallBuilder(client, GetTokeniser(), command, false);
     return(whenPostCallBuilder);
 }
Beispiel #5
0
 public static void OpensLibrary(Guid processId, Guid userId, string name)
 {
     command = WhenCommand(new OpenLibrary(processId, userId, userId, name));
     command.IsPOSTedTo("/libraries");
 }
Beispiel #6
0
 public static void AcceptsLibraryLink(Guid transactionId, Guid libraryId, Guid userId, Guid requestingLibraryId)
 {
     command =
         WhenCommand(new AcceptLink(transactionId, libraryId, userId, requestingLibraryId));
     command.IsPOSTedTo($"/libraries/{libraryId}/links/accept");
 }