I need to get Google Drive review history. I visited the Drive developers website and I saw that you can do this with several languages. I want to do with Java and use NetBeans and the history I want is that of Google Docs. The code is ready to pick up the history but it needs to have the library. I downloaded the library in this link .
And then I add in NetBeans (I already added the library and the jar
files). I did as they say to do but nothing worked. How to do this? The code that gives error by not having the library are these 3 lines:
import com.google.api.services.drive.Drive;
import com.google.api.services.drive.model.Revision;
import com.google.api.services.drive.model.RevisionList;
The error is as follows:
package [name] doesnt exist
What do I need to do?
obs: The rest of the programming is as follows (removed directly from the google developers website in the revision item & list):
package javaapplication8;
import com.google.api.services.drive.Drive;
import com.google.api.services.drive.model.Revision;
import com.google.api.services.drive.model.RevisionList;
import java.io.IOException;
import java.util.List;
public class MyClass {
private static List<Revision> retrieveRevisions(Drive service,
String fileId) {
fileId = "1XpNdeTFBr2KygyfPtlowBvkpcaJJzjgLckrGjp5oOhg0";
try {
RevisionList revisions = service.revisions().list(fileId).execute();
return revisions.getItems();
} catch (IOException e) {
System.out.println("An error occurred: " + e);
}
return null;
}
}