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#ListFeeds,
 
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/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/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.  

Thanks.

Sean
Note: gcurl is just a wrapper around curl that includes the oauth token and 
pipes to tidy

$ gcurl  
https://spreadsheets.google.com/feeds/worksheets/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/private/full
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4139    0  4139    0     0   7754      0 --:--:-- --:--:-- --:--:--  9925
<?xml version='1.0' encoding='utf-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:gs='http://schemas.google.com/spreadsheets/2006'>
  <id>
  
https://spreadsheets.google.com/feeds/worksheets/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/private/full</id>
  <updated>2010-12-15T21:28:43.478Z</updated>
  <category scheme='http://schemas.google.com/spreadsheets/2006'
  term='http://schemas.google.com/spreadsheets/2006#worksheet' />
  <title type='text'>TxRecord</title>
  <link rel='alternate' type='text/html'
  
href='https://spreadsheets.google.com/ccc?key=0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE'
 />
  <link rel='http://schemas.google.com/g/2005#feed'
  type='application/atom+xml'
  
href='https://spreadsheets.google.com/feeds/worksheets/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/private/full'
 />
  <link rel='http://schemas.google.com/g/2005#post'
  type='application/atom+xml'
  
href='https://spreadsheets.google.com/feeds/worksheets/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/private/full'
 />
  <link rel='self' type='application/atom+xml'
  
href='https://spreadsheets.google.com/feeds/worksheets/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/private/full'
 />
  <author>
    <name>admin</name>
    <email>[email protected]</email>
  </author>
  <openSearch:totalResults>2</openSearch:totalResults>
  <openSearch:startIndex>1</openSearch:startIndex>
  <entry>
    <id>
    
https://spreadsheets.google.com/feeds/worksheets/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/private/full/od6</id>
    <updated>2010-12-15T21:28:43.478Z</updated>
    <category scheme='http://schemas.google.com/spreadsheets/2006'
    term='http://schemas.google.com/spreadsheets/2006#worksheet' />
    <title type='text'>Sheet1</title>
    <content type='text'>Sheet1</content>
    <link rel='http://schemas.google.com/spreadsheets/2006#listfeed'
    type='application/atom+xml'
    
href='https://spreadsheets.google.com/feeds/list/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/od6/private/full'
 />
    <link rel='http://schemas.google.com/spreadsheets/2006#cellsfeed'
    type='application/atom+xml'
    
href='https://spreadsheets.google.com/feeds/cells/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/od6/private/full'
 />
    <link rel='http://schemas.google.com/visualization/2008#visualizationApi'
    type='application/atom+xml'
    
href='https://spreadsheets.google.com/tq?key=0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE&amp;sheet=od6'
 />
    <link rel='self' type='application/atom+xml'
    
href='https://spreadsheets.google.com/feeds/worksheets/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/private/full/od6'
 />
    <link rel='edit' type='application/atom+xml'
    
href='https://spreadsheets.google.com/feeds/worksheets/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/private/full/od6/cq4unkuhgw'
 />
    <gs:rowCount>100</gs:rowCount>
    <gs:colCount>20</gs:colCount>
  </entry>
  <entry>
    <id>
    
https://spreadsheets.google.com/feeds/worksheets/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/private/full/od7</id>
    <updated>2010-12-15T21:28:43.478Z</updated>
    <category scheme='http://schemas.google.com/spreadsheets/2006'
    term='http://schemas.google.com/spreadsheets/2006#worksheet' />
    <title type='text'>Sheet2</title>
    <content type='text'>Sheet2</content>
    <link rel='http://schemas.google.com/spreadsheets/2006#listfeed'
    type='application/atom+xml'
    
href='https://spreadsheets.google.com/feeds/list/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/od7/private/full'
 />
    <link rel='http://schemas.google.com/spreadsheets/2006#cellsfeed'
    type='application/atom+xml'
    
href='https://spreadsheets.google.com/feeds/cells/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/od7/private/full'
 />
    <link rel='http://schemas.google.com/visualization/2008#visualizationApi'
    type='application/atom+xml'
    
href='https://spreadsheets.google.com/tq?key=0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE&amp;sheet=od7'
 />
    <link rel='self' type='application/atom+xml'
    
href='https://spreadsheets.google.com/feeds/worksheets/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/private/full/od7'
 />
    <link rel='edit' type='application/atom+xml'
    
href='https://spreadsheets.google.com/feeds/worksheets/0ApGqokQEAmMddHR6S1pyUV85dXRvWkFVdGRVT2c4TVE/private/full/od7/0'
 />
    <gs:rowCount>100</gs:rowCount>
    <gs:colCount>20</gs:colCount>
  </entry>
</feed>

Reply via email to