SmartDroidDeveloper / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

Unable to get ListFeed link rel from worksheet metadata #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Version of google-api-java-client (e.g. 1.2.1-alpha)?

1.2.1-alpha

Java environment (e.g. Java 6, Android 2.2, App Engine 1.3.7)?

Java 6, App Engine 1.4.0

Describe the problem.

I'm trying to access a worksheet's list feed using the Google API Java client 
(v1.2.1-alpha).  I'm successfully authenticated to a google apps account via 
OAuth from a google app engine application.  

I'm currently unable to retrieve a link to the listfeed from the worksheet 
feed, but only when I do so via my app engine dev environment. I am able to see 
(what I believe) is the listfeed link when I use curl from the command line.  
The doc doesn't clearly state how to determine the list feed, but from: 
https://code.google.com/apis/spreadsheets/data/3.0/developers_guide.html#ListFee
ds, it says the following:

To determine the URL of a list-based feed for a given worksheet, get the 
worksheets metafeed and examine the <content> element in which src is the list 
feed's URI.

I do not see a "src" in the content element but from the worksheet metafeed I 
see the following link rel: 
http://schemas.google.com/spreadsheets/2006#listfeed with this href: 

https://spreadsheets.google.com/feeds/list/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRV
T2c4TVE/od7/private/full.  This matches the next line in the doc that states 
that the listfeed URI:

GET https://spreadsheets.google.com/feeds/list/key/worksheetId/private/full

I've attached the output of a command curl HTTP GET for the worksheet feed URL 
(worksheetListFeed.txt).  In there you can see the simple spreadsheet with 2 
worksheets (Sheet1, Sheet2) and the #listfeed link rels.  

The problem I'm seeing is that when I try to access the exact same 
feeds/entries via the Java API, it doesn't find the #listfeed.  Following some 
of the samples, I have a method that simply searches the link elements of an 
entry:

public String getListFeedLink() {
      return Link.find(links, "http://schemas.google.com/spreadsheets/2006#listfeed");
  }

I am able to get other links from the sheet: 

Link rel: [http://schemas.google.com/spreadsheets/2006#cellsfeed] 
Link rel: [http://schemas.google.com/visualization/2008#visualizationApi] 
Link rel: [self] 
Link rel: [edit] 

but for some reason, not the one I want: #listfeed.

If I manually construct the list feed URL in the Java API using the #listfeed 
href from the command line, I can make subsequent requests to view row data in 
each sheet.

Is there anything that would prevent access to it from the Java API?  It looks 
like there are some visibility constraints for the Table Feed but I don't 
remember reading anything about the List Feed.  

-> Vic Fryzel confirmed that he is seeing the same behavior.

How would you expect it to be fixed?

Updated library

Original issue reported on code.google.com by seanhor...@gmail.com on 17 Dec 2010 at 4:49

Attachments:

GoogleCodeExporter commented 9 years ago
Google Spreadsheet API group discussion: 
http://groups.google.com/forum/#!topic/google-spreadsheets-api/A0OcMLH3b-M

Original comment by seanhor...@gmail.com on 17 Dec 2010 at 4:51

GoogleCodeExporter commented 9 years ago
Just noting for my own reference that the feed links appear to be in the wrong 
positions (as content links) and are not given as links with the appropriate 
rel.

Original comment by vicfry...@google.com on 17 Dec 2010 at 9:25

GoogleCodeExporter commented 9 years ago
This is something I will have to fix in the core API though, this isn't 
controlled by the client library here.

@Yaniv, please close, as I'm moving this issue here:
http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=2356

Original comment by vicfry...@google.com on 17 Dec 2010 at 9:29

GoogleCodeExporter commented 9 years ago
Closing as requested because the bug is not in the client library itself.  
Thanks for reporting the problem.

Original comment by yan...@google.com on 17 Dec 2010 at 10:02