Skip to content

Latest commit

 

History

History
54 lines (30 loc) · 1.72 KB

README.md

File metadata and controls

54 lines (30 loc) · 1.72 KB

#REMINDERS

##Description

This app serves as a reminders-api which can serve as a backend for a potential application. It provides:

  • endpoints to handle reminders (create, read)
  • a poller which polls Liberty Global schedule-api for schedule data about created reminders

To use the code you need to have java 8 installed and maven 3+.

##Archetype

The app was generated using a maven archetype for dropwizard apps, prepared by liberty-global. To use it, just type in

mvn archetype:generate -DarchetypeGroupId=pl.najda -DarchetypeArtifactId=dw-archetype -DarchetypeVersion=1.1

or just

mvn archetype:generate

and then choose the proper archetype (called dw-archetype)

##Usage

  • Building the app

mvn clean install

  • Starting app

java -jar {path_to_jar} server {path_to_conf_file}

should be something like this:

java -jar reminders-service/target/reminders-service-1.0-SNAPSHOT.jar server conf/config.yml

  • Create a reminder for a user

curl -X POST -v -H "Content-type:application/json" localhost:8082/users/{userId}/reminders/ -d "{ \"title\" : \"TEST\" }"

  • Get user reminders

curl -X GET -v localhost:8082/users/{userId}/reminders

  • Get specific reminder

curl -XGET -v localhost:8082/users/{userId}/reminders/{reminderId}

##Useful links