Create the service with Angular's HttpClient.
Angular HttpClient used for all HTTP requests.
Add a movie to a user's favorites.
Username to update.
Movie ObjectId to add.
Observable updated user object.
Delete a user by username.
Username to delete.
Observable server response.
Edit user profile data.
Username to update.
Fields to update.
Observable updated user object.
Get all movies.
Observable array of movies.
Get a director by name.
Director's name.
Observable director object.
Get the user's favorite movies.
Username whose favorites to fetch.
Observable of favorite movie IDs or movie objects (depending on API).
Get a genre by name.
Genre name.
Observable genre object.
Get a movie by title.
Movie title to fetch.
Observable single movie.
Get a user by username.
Username to fetch.
Observable user object.
Remove a movie from favorites.
Username to update.
Movie ObjectId to remove.
Observable updated user object.
Log in an existing user.
Object with login credentials (username, password).
Observable with { user, token } on success.
Register a new user.
Object with registration fields (e.g., username, password, email).
Observable of server response or created user.
Service that wraps all HTTP requests to the myFlix API. Returns RxJS Observables so components can subscribe to results.