myFlix Angular Client Documentation - v0.0.0
    Preparing search index...

    Class FetchApiDataService

    Service to handle all communication with the backend API.

    This service provides methods for user authentication, movie data retrieval, and user profile management (including favorite movies).

    Index

    Constructors

    Methods

    • Adds a movie to the user's list of favorites.

      Parameters

      • movieId: string

        The unique ID of the movie.

      Returns Observable<any>

      An Observable emitting the updated user object.

    • Deletes the current user's account from the database.

      Returns Observable<any>

      An Observable emitting a success message as text.

    • Updates the profile information of the current user.

      Parameters

      • updatedUser: any

        An object containing the new profile details.

      Returns Observable<any>

      An Observable emitting the updated user object.

    • Retrieves all movies from the database.

      Returns Observable<any>

      An Observable that emits an array of all movie objects.

    • Retrieves information about a specific director by name.

      Parameters

      • directorName: string

        The name of the director.

      Returns Observable<any>

      An Observable emitting the director's details (Name, Bio, Birth).

    • Retrieves the list of favorite movie IDs for the current user.

      Returns Observable<any>

      An Observable emitting an array of movie IDs.

    • Retrieves information about a specific genre by name.

      Parameters

      • genreName: string

        The name of the genre.

      Returns Observable<any>

      An Observable emitting the genre's details (Name, Description).

    • Retrieves a single movie by its title.

      Parameters

      • title: string

        The title of the movie to fetch.

      Returns Observable<any>

      An Observable that emits the requested movie object.

    • Retrieves the profile data for the current user.

      Parameters

      • username: string

        The username of the profile to fetch.

      Returns Observable<any>

      An Observable emitting the user's profile information.

    • Removes a movie from the user's list of favorites.

      Parameters

      • movieId: string

        The unique ID of the movie to remove.

      Returns Observable<any>

      An Observable emitting the updated user object.

    • Logs an existing user into the system.

      Parameters

      • userDetails: any

        An object containing the user's credentials (Username, Password).

      Returns Observable<any>

      An Observable that emits an object containing the user details and a JWT token.

    • Registers a new user in the system.

      Parameters

      • userDetails: any

        An object containing the new user's information (Username, Password, Email, Birthday).

      Returns Observable<any>

      An Observable that will emit the server's response upon completion.