//File upload in google drive DocumentListEntry uploadFile = new DocumentListEntry(); uploadFile.setTitle(new PlainTextConstruct("FILE_NAME_DISPLAY_IN_DRIVE")); uploadFile.setFile(new File("FILE_PATH"), "MIME_TYPE_OF_FILE"); uploadFile = docsService.insert(GOOGLE_DRIVE_FEED_URL, uploadFile);
DocsService docsService = new DocsService("MySampleApplication-v3"); docsService.setUserCredentials(USERNAME, PASSWORD); URL GOOGLE_DRIVE_FEED_URL = new URL("https://docs.google.com/feeds/default/private/full/"); DocumentListEntry documentListEntry = new com.google.gdata.data.docs.SpreadsheetEntry(); documentListEntry.setTitle(new PlainTextConstruct("Spreadsheet_name")); documentListEntry = docsService.insert(GOOGLE_DRIVE_FEED_URL, documentListEntry);
/** * Construct a new plain text content with the given text. */ public static TextConstruct plainText(String text) { return new PlainTextConstruct(text); }
/** * Construct a new plain text content with the given text. */ public static TextConstruct plainText(String text) { return new PlainTextConstruct(text); }
/** * Construct a new plain text content with the given text. */ public static TextConstruct plainText(String text) { return new PlainTextConstruct(text); }
public Workspace addWorkspace(String title) { Workspace workspace = new Workspace(new PlainTextConstruct(title)); workspaces.add(workspace); return workspace; }
public Workspace addWorkspace(String title) { Workspace workspace = new Workspace(new PlainTextConstruct(title)); workspaces.add(workspace); return workspace; }
public Collection addCollection(String collectionUri, String title, String... acceptedTypes) { Collection collection = new Collection(collectionUri, new PlainTextConstruct(title), acceptedTypes); addCollection(collection); return collection; }
public Collection addCollection(String collectionUri, String title, String... acceptedTypes) { Collection collection = new Collection(collectionUri, new PlainTextConstruct(title), acceptedTypes); addCollection(collection); return collection; }
/** * Adds an optional comment to the complaint. * * @param comment optional comment of the complaint */ public void setComment(String comment) { setContent(comment == null ? null : new PlainTextConstruct(comment)); }
/** * Adds an optional comment to the complaint. * * @param comment optional comment of the complaint */ public void setComment(String comment) { setContent(comment == null ? null : new PlainTextConstruct(comment)); }
@Override public void consumeAttributes(AttributeHelper attrHelper) throws ParseException { if (coreVersion.isCompatible(Service.Versions.V1)) { String titleAttr = attrHelper.consume("title", true); title = new PlainTextConstruct(titleAttr); } }
@Override public void consumeAttributes(AttributeHelper attrHelper) throws ParseException { if (coreVersion.isCompatible(Service.Versions.V1)) { String titleAttr = attrHelper.consume("title", true); title = new PlainTextConstruct(titleAttr); } }
@Override public void consumeAttributes(AttributeHelper attrHelper) throws ParseException { if (coreVersion.isCompatible(Service.Versions.V1)) { String titleAttr = attrHelper.consume("title", true); title = new PlainTextConstruct(titleAttr); } }
PicasawebService myService = new PicasawebService("exampleCo-exampleApp-1"); // just id myService.setUserCredentials( "liz@gmail.com", "mypassword"); // your mailaddress, password // change "username", "albumid" and "photoid" URL feedUrl = new URL( "https://picasaweb.google.com/data/feed/api/" + "user/username/albumid/albumid/photoid/photoid"); CommentEntry myComment = new CommentEntry(); myComment.setContent( new PlainTextConstruct("great photo!")); // there is comment myService.insert(feedUrl, myComment);
@Override public void consumeAttributes(AttributeHelper attrHelper) throws ParseException { href = attrHelper.consume("href", true); if (coreVersion.isCompatible(Service.Versions.V1)) { String titleAttr = attrHelper.consume("title", true); title = new PlainTextConstruct(titleAttr); } }
// Create a new Document Entry in Documents // It is up to you to use OAuth or username password authentication // I have used the OAuth way, you can look it up in the link I have provided above. DocsService service = new DocsService("Test-Doc-Service"); service.setOAuthCredentials(oauthParameters, new OAuthHmacSha1Signer()); URL feedUrl = new URL("https://docs.google.com/feeds/default/private/full/"); String title = "Doc Create Test"; DocumentListEntry newEntry = new DocumentEntry(); newEntry.setTitle(new PlainTextConstruct(title)); // newEntry = service.insert(feedUrl, newEntry);
@Override public void consumeAttributes(AttributeHelper attrHelper) throws ParseException { href = attrHelper.consume("href", true); if (coreVersion.isCompatible(Service.Versions.V1)) { String titleAttr = attrHelper.consume("title", true); title = new PlainTextConstruct(titleAttr); } }
@Override public void consumeAttributes(AttributeHelper attrHelper) throws ParseException { href = attrHelper.consume("href", true); if (coreVersion.isCompatible(Service.Versions.V1)) { String titleAttr = attrHelper.consume("title", true); title = new PlainTextConstruct(titleAttr); } }
@Override protected SpreadsheetWorksheet createWorksheet(final SpreadsheetWorksheetMetadata metadata) throws Exception { final WorksheetEntry worksheetEntry = new WorksheetEntry(); worksheetEntry.setTitle(new PlainTextConstruct(metadata.getName())); worksheetEntry.setColCount(GSConstants.DEFAULT_WORKSHEET_COLS); worksheetEntry.setRowCount(GSConstants.DEFAULT_WORKSHEET_ROWS); return new GSWorksheet(this, worksheetEntry, false); }