How to us v20 rest api for oanda

Please I am a beginner in writing program. I like to use the java rest api v20 to automate my trade. How do I go about it. I have a trading strategy and would appreciate it if I could build a robot for it. It’s a very simple function how to buy or sell a certain amount of unit at ever 5 pips. Thanks