Skip to content

TID #002 REST-API: Added post request to feed cat now#2

Merged
loerac merged 3 commits into
trunkfrom
TID002-add-feed-url
Aug 29, 2020
Merged

TID #002 REST-API: Added post request to feed cat now#2
loerac merged 3 commits into
trunkfrom
TID002-add-feed-url

Conversation

@loerac
Copy link
Copy Markdown
Owner

@loerac loerac commented Aug 25, 2020

Synopsis:

Send request to feed the cat now rather than wait for a specific time to feed the cat.

Description:

Instead of your cat starving until it's time to be fed, send a request to feed the cat now. Added a new REST API called /feedNow which will turn activate the motor to feed the cat. Currently, the servo motor isn't completed yet so there is a place holder that says to update once TID #3 is complete.

TID #009 created to update this once ready

Test:

This can be done with curl currently.

In one shell, run the cat-feeder, and in another shell run the curl command

cURL shell

curl -X POST http://localhost:6969/feedNow

Cat-feeder shell

Not time to feed cats
Place holder to feed cat now, will update once TID003 is complete
Not time to feed cats

Comment thread catfeeder-machine/rest-api.go Outdated
@loerac loerac merged commit 889ec74 into trunk Aug 29, 2020
@loerac loerac deleted the TID002-add-feed-url branch August 29, 2020 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants