The following API usage examples assume httpie but curl
or wget
works just as well
http GET 'http://localhost:4000/ping'
http GET 'http://localhost:4000/api/users'
http GET 'http://localhost:4000/api/users/1'
http DELETE 'http://localhost:4000/api/users/1'
http --json POST 'http://localhost:4000/api/users' \
'Content-Type':'application/json; charset=utf-8' \
email="maria@service.com" \
fullname="maria" \
time_preference="7"
http --json PATCH 'http://localhost:4000/api/users/1' \
'Content-Type':'application/json; charset=utf-8' \
email="email@service.com" \
active="true" \
time_preference="1" \
fullname="foobar"
http GET 'http://localhost:4000/api/subscriptions'
http --json POST 'http://localhost:4000/api/users/1/subs' \
'Content-Type':'application/json; charset=utf-8' \
url="https://www.reddit.com/r/worldnews/" \
subreddit="worldnews"
http GET 'http://localhost:4000/api/subreddits'
http --json PATCH 'http://localhost:4000/api/subreddits/1/tops' \
'Content-Type':'application/json; charset=utf-8' \
tops="[{}, {}, {}]"