API that allows the segmentation of users according to custom filters.
Ruby. Grape. MongoDB.
sudo apt-get install mongodb
rvm install "ruby-2.4.0"
gem install bundler
bundle install
bundle exec rackup config.ru -p 9999
bundle exec rake
curl -v http://localhost:9999/api/v1/users/annie
curl -v -H "Content-Type: application/json" -X POST -d '{"_id": "annie", "email":"annie@email.com", "name":"Annie A.", "age": 30, "state": "SC", "job": "dev"}' http://localhost:9999/api/v1/users
curl -v -H "Content-Type: application/json" -X PUT -d '{"_id": "annie", "email":"annie@email.com", "name":"Annie B.", "age": 30, "state": "SC", "job": "dev"}' http://localhost:9999/api/v1/users/annie
curl -v -X "DELETE" http://localhost:9999/api/v1/users/annie
curl -v http://localhost:9999/api/v1/users
curl -v "http://localhost:9999/api/v1/users?state=SC&age=30"
curl -v "http://localhost:9999/api/v1/users?state=SC&age=30&logic_op=or"
curl -v "http://localhost:9999/api/v1/users?state=SC&age=30&logic_op=or&age_op=gte"
curl -v "http://localhost:9999/api/v1/users?job_regex=dev\z"