A base class form the GameService service

Hierarchy

  • GameService

Constructors

Properties

Methods

Constructors

  • GameService constuctor

    Parameters

    • http: HttpClient

      HttpClient for sending and receiving HTTP requests

    Returns GameService

Properties

headers: {
    content-type: string;
} = ...

HTTP Headers for adding when sending requests to server

Type declaration

  • content-type: string
http: HttpClient

HttpClient for sending and receiving HTTP requests

Methods

  • Create a new Game object from passed values and send HTTP POST request to the server with the new Game as the body

    Returns

    Observable of the HTTP response

    Parameters

    • gameName: string

      New game name

    • gameGenre: string

      New game genre

    Returns Observable<any>

  • Send a HTTP GET request to the /game-stats endpoint of the server

    Returns

    Observable of the HTTP response

    Returns Observable<any>

  • Send a HTTP GET request to the /games endpoint of the server

    Returns

    Observable of the HTTP response

    Returns Observable<any>

Generated using TypeDoc