open-rmf / fleet_adapter_ecobot

RMF Fleet adapter for integrating Gaussian Ecobot robots
7 stars 11 forks source link

V3.6.6 api update #6

Open JohnTGZ opened 2 years ago

JohnTGZ commented 2 years ago

This PR continues from where PR #1 left off.

Updated EcobotAPI class to accomodate API >= V3.6.6 while maintaining backward compatibility. Also did some minor refactoring to reduce boiler plate code for REST Requests.

Detailed breakdown of changes:

  1. Refactored to reduce boilerplate code for sending GET and POST requests.
  2. Added method to get current api version and check if it meets a specific semantic version
  3. For some methods, added toggling between different endpoints depending on the current api version
  4. Added optional argument in constructor to EcobotAPI to manually specify API version , in which case it would not query the robot for the API version
  5. Updated documentation for methods of EcobotAPI

Things to be done before merging: