Reputation: 21
How do we get reference to service object in the java example?
https://developers.google.com/glass/v1/reference/timeline/attachments/list
Upvotes: 1
Views: 124
Reputation: 50701
From the quickstart sample code at https://github.com/googleglass/mirror-quickstart-java (and, in particular https://github.com/googleglass/mirror-quickstart-java/blob/master/src/main/java/com/google/glassware/MirrorClient.java) you can get a Mirror object through the builder using code like
public static Mirror getMirror(Credential credential) {
return new Mirror.Builder(new NetHttpTransport(), new JacksonFactory(), credential)
.setApplicationName("PG Java Starter").build();
}
See also the JavaDoc at https://developers.google.com/resources/api-libraries/documentation/mirror/v1/java/latest/
Upvotes: 2