Water-Monitoring-System icon indicating copy to clipboard operation
Water-Monitoring-System copied to clipboard

API endpoints for the Hardware devices

Open ramanaditya opened this issue 4 years ago • 4 comments

Creating API endpoints for Hardware model The hardware devices will need to communicate with the server, so for that we require API endpoints to get the specific results in the JSON format. There will be hardware devices associated with their Hardware id, check the models.py file inside hardware app for better understanding

Requirements of the Product

  • Getting a list of Hardware device
  • Getting the information of single Hardware Device
  • Creating an Hardware using POST method and linking it with user model
  • Updating the information of hardware device using their id.
  • Fetching the list of hardware devices registered with users using user id. (Beware of cyclic imports)

To make the code standard please use the following parameters

  • serializers.py for dumping data in JSON
  • views.py for creating all kinds of endpoints
  • Use class viewsets.ModelViewSet
  • All the API endpoints related to the Hardware model should be present inside same class

Where to write the file

  • Branch : https://github.com/vinitshahdeo/Water-Monitoring-System/tree/feature/backend-django
  • Where to find user folder : Water-Monitoring-System/water_monitoring_system/water_monitoring_system/hardware/
  • Files and class names are already created for your convenience, you need to override the methods.
  • All the changes to brought inside api folder

Note

  • Well commented code(required).
  • Don't delete the applied migrations
  • Don't push your database file
  • Don't push your local settings file
  • Write the test cases properly
  • Use Postman for checking the API endpoints (not required but suggested)

ramanaditya avatar Mar 02 '20 13:03 ramanaditya

can you assigned for me this issue ?

Aju100 avatar Mar 02 '20 16:03 Aju100

can u assigned me this issue?

payal-98 avatar Mar 12 '20 08:03 payal-98

The issue has been assigned to @Aju100 and @payal-98 , work on this and make a PR

ramanaditya avatar Mar 16 '20 17:03 ramanaditya

I did not comprehend well the requirement

EZENGESH avatar Feb 18 '24 16:02 EZENGESH