DanyDin1801 / Product-Portal

0 stars 2 forks source link

Create an api endpoint for products #16

Open rhgksrua opened 8 years ago

rhgksrua commented 8 years ago

We should create a mock api endpoint to serve our products.

Then we can request to a URL (i.e www.locahost.com/mockapi?search=laptop) and return a JSON with only the products that we searched for.

Features

Our api doesn't have to have all the features that a real world api would have. But it should be able to do a simple search of our mock products.

JordyVlassembrouck commented 8 years ago

Why not immediately call a real API, and stick with that one?

rhgksrua commented 8 years ago

I though we were using our own product list before using any real api. Also, which real api are you talking about?

JordyVlassembrouck commented 8 years ago

I agree on using static JSON files in the beginning to mock data, but building a working API to build our application against, that's one bridge too far (I think). We'll see what the others think.

vinaypuppal commented 8 years ago

I would also suggest we should mock data and test our application after that we can connect to an real API endpoint. For mocking test data we can use Faker module.

arreche commented 8 years ago

@vinaypuppal Thanks for your suggestion. I'll consider using Faker for other project but actually It looks that it doesn't provide any option to fake products.

vinaypuppal commented 8 years ago

@arreche Faker provides fake data in general form. You can use these from Faker module to generate fake product list depending what we need to show in UI