Skip to content

Instantly share code, notes, and snippets.

@scottbyrns
Created August 17, 2014 02:45
Show Gist options
  • Save scottbyrns/d0d8c946ad55796727f7 to your computer and use it in GitHub Desktop.
Save scottbyrns/d0d8c946ad55796727f7 to your computer and use it in GitHub Desktop.
public void sendMessage(Message message) {
try {
Gson gson = new Gson();
new AccountServiceImpl().login("GroG", "password");
RobotService service = new RobotServiceImpl();
Robot robot = service.list().get(0);
com.goodrobots.Log log = new com.goodrobots.Log();
log.setMessage(gson.toJson(message));
new LoggingServiceImpl().create(robot, log);
} catch (Exception e) {
Logging.logException(e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment