gdata-api

Google Translator Toolkit API Error (“Multipart must have Atom and media part”)

≯℡__Kan透↙ 提交于 2019-12-23 17:53:25
问题 I try upload document (srt subtitles) to Google Translator Toolkit via API. But I get an error: "Multipart must have Atom and media part". What's wrong? My request: POST /toolkit/feeds/documents HTTP/1.1 Host: translate.google.com GData-Version: 1.0 Authorization: GoogleLogin Auth=[myauth] Content-Length: 404 Content-Type: multipart/related; boundary=SKYqYanmBJWCtDU Slug: test.srt --SKYqYanmBJWCtDU Content-Type: application/atom+xml; charset=UTF-8 <?xml version='1.0' encoding='UTF-8'?> <entry

Batch request in Google Calendar V3 REST API

假装没事ソ 提交于 2019-12-23 09:04:07
问题 How to get/add/update Google Calendar Events using batch request through V3 REST API? I've tried and but not works. According to the docs (https://developers.google.com/google-apps/calendar/batch) it should be possible to send a batch request by posting a multipart/mixed content type message to the API. An example of a working HTTP POST would be great. Thanks, Riyaz 回答1: The following batch request, gets the eventId1, updates the eventId2 and creates a new event under calender that is

Google data (gdata) in eclipse with app engine, java

做~自己de王妃 提交于 2019-12-23 02:58:34
问题 Ive had a similar question as this one before, and when that solved this came. So here we go again. The content of doGet pretty much works but when I try it as a part of a servlet that eclipse created for me I get errors. Its looks a bit like I don't have the appropriate files referenced in the library, but I think I do. The java code looks like this: package picasatest; import java.io.IOException; import java.net.URL; import javax.servlet.http.*; import com.google.gdata.client.photos

TypeError when trying to upload Pictures from Google App Engine to Picasa with the GData API

孤人 提交于 2019-12-22 11:22:12
问题 I'm trying to write a small tool to upload Pictures from Google App Engine to Picasa. Fetching the image works, but when i try to upload it i get the error " TypeError: stat() argument 1 must be (encoded string without NULL bytes), not str " The Code basically looks like this: def getfile(url): result = urlfetch.fetch(url) if result.status_code == 200: return (result.content) logging.error ("[-] Error fetching URL: %s" % url) def uploadpicture(comment,pic): album_url = '/data/feed/api/user/%s

Google Spreadsheet API: memory exceeded

╄→гoц情女王★ 提交于 2019-12-22 09:39:32
问题 Don't know if anyone has experience with the Google Spreadsheets API or the Zend_GData classes but it's worth a go: When I try to insert a value in a 750 row spreadsheet, it takes ages and then throws an error that my memory limit (which is 128 MB!) was exceeded. I also got this when querying all records of this spreadsheet but this I can imaging because it's quite a lot of data. But why does this happen when inserting a row? That's not too complex, is it? Here's the code I used: public

Google Calendar feed api deleted events

岁酱吖の 提交于 2019-12-22 07:05:02
问题 I'm syncing the Google Calendar with my application (I store events in a database). When an event is updated I can easily find the last updates by sorting the event feed on the 'updated' order. However, if an event is removed / deleted, how can I track this update from the feed? 回答1: Try to add showdeleted=true to your query feed and then check for EventStatus.CANCELED on retrieved entries. Check this thread for further information. 回答2: I did exactly the thing you want to do (see this post:

something wrong in my program by using GData xmlsupport

淺唱寂寞╮ 提交于 2019-12-21 17:04:15
问题 I'm new here ,i don't know how to use this...here is my code : NSString *strParse=@"url"; NSURL *urlParse=[NSURL URLWithString:strParse]; NSString *content=[[NSString alloc] initWithContentsOfURL:urlParse]; NSError *error; GDataXMLDocument *document=[[GDataXMLDocument alloc] initWithXMLString:content options:0 error:&error]; ----------------------xml----- <?xml version="1.0" encoding="UTF-8"?> <root> <head> <version>20100514103110</version> </head> <channels> <channel> <id>1</id> <name> <!

Best option for using the GData APIs on Android?

女生的网名这么多〃 提交于 2019-12-17 15:23:09
问题 What's the least painful and most size efficient way to use the Google Data APIs in an Android application? After a few quick searches t seems that there is an android-gdata project on Google Code that seems to be the work of a single author. I didn't find any documentation for it and don't even know if it's production ready yet. An older option, the com.google.wireless.gdata package seems to have been removed from the SDK. It's still available in the GIT repository. Before I invest too much

Add comment to youtube video

时光毁灭记忆、已成空白 提交于 2019-12-13 07:18:39
问题 My webpage is developed in .net and i am trying to add comment to a youtube video using following code. string lsDeveloperKey = "myDeveloperKey"; //This will ask user to login to accounts.google for posting comment if (!Request.QueryString.AllKeys.Contains("token")) { string lsUserName = "myusername"; string lsPassword = "mypassword"; YouTubeRequestSettings loSettings = new YouTubeRequestSettings(Keys.PortalName, lsDeveloperKey, lsUserName, lsPassword); YouTubeRequest loRequest = new

Accessing Google Docs Metadata feed with gdata-objectivec-client

北慕城南 提交于 2019-12-13 03:04:06
问题 What's the simplest why to access/parse Google Docs Metadata feed with gdata-objectivec-client? 回答1: Somehow I overlooked this from the example: GDataServiceGoogleDocs *service = [self docsService]; NSURL *entryURL = [GDataServiceGoogleDocs metadataEntryURLForUserID:kGDataServiceDefaultUser]; GDataServiceTicket *ticket; ticket = [service fetchEntryWithURL:entryURL delegate:self didFinishSelector:@selector(metadataFeedTicket:finishedWithEntry:error:)]; 来源: https://stackoverflow.com/questions