This can also be tested using Postman.
-
Clone the repo https://github.com/realkibetgilbert/CaterpillarControlAPI.git
-
Make sure you have followed the above steps to install .NET 6 and visual studio on your machine
-
Navigate to the .sln file and click on it it will open the solution on visual studio
-
Restore the dependencies
-
Start the application the application will migrate on starup and . Navigate to your URL/swagger and you will have the UI documenting the API
You will first login to get the access token Use rider@gmail.com as email and !!rider@ as password
Authorize the caterpillar endpoint using the Bearer the token you generated on login for example Bearer LCK1AsfBL4JVHPc8u8toyfkeUz2KkotLu40R004OVSfKk2iK1Zd3vvfwV4gXilGD
Once you login you can view the existing caterpillar details using the endpoint /api/Caterpillar/get-caterpillars
You can change the caterpillar position using the endpoint api/Caterpillar/move/1
You can grow and shrink caterpillar length using the endpoint /api/Caterpillar/grow-shrink/1
GilbertKibet: kibetgilly354@gmail.com