Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create the ViewModel for the DishesScreen #3

Open
Kardelio opened this issue Oct 1, 2021 · 5 comments
Open

Create the ViewModel for the DishesScreen #3

Kardelio opened this issue Oct 1, 2021 · 5 comments
Assignees

Comments

@Kardelio
Copy link
Owner

Kardelio commented Oct 1, 2021

Note: Please raise your PR against the main branch when you are ready!

This issue relates to this issue: #2

This Issue:

For this issue you need to create the ViewModel class for the DishesScreen. This ViewModel will be similar to the CategoryViewModel but will instead return a list of dishes instead of categories

For help or information you can check out the already existing CategoryViewModel as a starting point app/src/main/java/com/example/disher/category/viewmodel/CategoryViewModel

Extra Points:

  • Send some state to the UI (maybe fake data) that the UI listens to and reacts to
@Hiteshpatel10
Copy link

I can work on this, can you tell which API method I use to get list of all dishes.

@Kardelio
Copy link
Owner Author

Kardelio commented Oct 4, 2021

@Hiteshpatel10 you certainly can!
Ill assign it to you now...

So the API you will need to use is this:
www.themealdb.com/api/json/v1/1/filter.php?c=____

So in the service you need to add the filter endpoint (/filter.php?c=____) and where you see the missing text (the blank line) that needs to be the strCategory from the screen before that the user has selected, which should be being passed into the composable already...

Let me know if you need any help :)

@Hiteshpatel10
Copy link

I have also build the use case and repository for Dishes Screen in order to build the Dishes screen viewModel. So, should I make a PR for the use case and repository in this #4 or in the current issue #3

@Kardelio
Copy link
Owner Author

Kardelio commented Oct 5, 2021

@Hiteshpatel10 thats perfect too! yeh just make a PR against #3 and make a note in the PR comment that you addressed #4 as well and when the PR gets merged ill close 4 :)

@Hiteshpatel10
Copy link

can you review my PR and suggest changes if any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants