Rest API to get Ticket Restaurant Nouvelle Calédonie account detail. It uses Tickets Restaurant Java SDK developed by @adriens.
The service is deployed on Heroku.
curl https://ticketresto-nc-rest.herokuapp.com/accounts/{identifier}/{password}/balance
curl https://ticketresto-nc-rest.herokuapp.com/accounts/{identifier}/{password}/detail
curl https://ticketresto-nc-rest.herokuapp.com/accounts/{identifier}/{password}/transactions/{ddMMyyyy}
curl https://ticketresto-nc-rest.herokuapp.com/accounts/{identifier}/{password}/transactions
curl https://ticketresto-nc-rest.herokuapp.com/partners
... to get them as a pdf
stream :
curl https://ticketresto-nc-rest.herokuapp.com/partners/pdf
A public postman documentation is maintained : you'll find code samples so you'll be able to use the api from you favourite language (cURL, jQuery, Ruby, Python, Node, PHP, Go).
Default port number is 8090, you can change it by editing the file application.properties
server.port = 8090
mvn clean package
java -jar target/ticketresto-nc-rest-{version}.jar
or even more straightforward start/stop :
Run it live :
mvn spring-boot:run
As a background process :
mvn spring-boot:start
and hence to stop it :
mvn spring-boot:stop
More details on maven spring-boot
goals here
curl http://localhost:8090/accounts/{identifier}/{password}/balance
curl http://localhost:8090/accounts/{identifier}/{password}/detail
curl https://localhost:8090/accounts/{identifier}/{password}/transactions/{ddMMyyyy}
curl https://localhost:8090/accounts/{identifier}/{password}/transactions
curl https://localhost:8090/partners
By default, you get json. To get xml
output, just add ?mediaType=xml
to the url and you're done.
mvn install dockerfile:build
docker container run -p 8090:8090 mbarre/ticketresto-nc-rest:latest
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c5f0eef3e3b7 mbarre/ticketresto-nc-rest:latest "java -Djava.secur..." 15 seconds ago Up 14 seconds 0.0.0.0:8090->8090/tcp gallant_mayer
API is published on RapidAPI.