customElementDictionary returns an empty NSDictionary for a public Spreadsheet List Entry

31 views
Skip to first unread message

Iulian Corcoja

unread,
Mar 9, 2014, 10:18:11 PM3/9/14
to gdata-objec...@googlegroups.com
I've been struggling this for hours and still can't get it working. The idea is that I have a public Spreadsheet with a link: https://spreadsheets.google.com/feeds/list/0Au***2c/od6/public/basic. What I am trying to do, is to fetch, without any authentication, all it's row entries via list feed:

GDataServiceBase *service = [[GDataServiceBase alloc] init];

[service fetchPublicFeedWithURL:url feedClass:[GDataFeedSpreadsheetList class] completionHandler:^(GDataServiceTicketBase *ticket, GDataFeedBase *feed, NSError *error) {

NSLog(@"feed: %@ [%d]", feed, feed.entries);

// The feed object is a class of GDataFeedSpreadsheetList and the count of entries is ok (= count of rows)


// Return row entries

// completionHandler(feed.entries, error);

}];


So, when I'm trying to access data of an entry: [feed.entries[0] customElementDictionary]it returns me nothing but an empty NSDictionary.

Output of feed.entries[0] is:

GDataEntrySpreadsheetList 0x1db59d10: {extensions:(category,content,id,link,title,updated)}


I've tested fetching row entries with an authenticated GDataServiceBase and it works like a charm, but I can't get it working without any authentication...

Any ideas or suggestions?

Thanks in advance.


Greg Robbins

unread,
Mar 11, 2014, 9:51:22 PM3/11/14
to gdata-objec...@googlegroups.com
Why use GDataServiceBase instead of the spreadsheet service?

If you turn on http logging, does it show the expected response XML?


Iulian Corcoja

unread,
Mar 12, 2014, 10:38:20 PM3/12/14
to gdata-objec...@googlegroups.com
Well I've tested it with both types (GDataServiceGoogleSpreadsheet *) and neither of them works.

And here's the log:

<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gsx='http://schemas.google.com/spreadsheets/2006/extended' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/&quot;C0cFRHo_cCt7ImA9Wh9XFUQ.&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>Sheet1</title><link rel='alternate' type='text/html' href='https://spreadsheets.google.com/pub?key=0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic'/><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic'/><author><name>picapapaya</name><email>pic*****@gmail.com</email></author><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><entry gd:etag='&quot;FlBFLz4nZCt7ImA9BExbFkhf&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/cn6ca</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>21.30895</title><content>longitude: -157.826182, status: 1, name: Scot Nelson, e-mail: sn*****@hawaii.edu, date: 5 Mar 2014, tel: (808) 956-6741, gustestresult: 0</content><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic/cn6ca'/></entry><entry gd:etag='&quot;VVAfDUQHHSt7ImBrUU8.&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/cokwr</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>21.3859</title><content>longitude: -157.930927, status: 0</content><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic/cokwr'/></entry><entry gd:etag='&quot;DRBKWx8BEyt7ImBmAUc.&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/cpzh4</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>21.32455</title><content>longitude: -158.083156, status: 1</content><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic/cpzh4'/></entry><entry gd:etag='&quot;FBxeHFoQICt7ImA9BkEL&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/cre1l</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>21.35</title><content>longitude: -157.72535, status: 1</content><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic/cre1l'/></entry><entry gd:etag='&quot;D0pMDEVQEit7ImBkDxY.&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/chk2m</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>21.4092</title><content>longitude: -157.799084, status: 0</content><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic/chk2m'/></entry><entry gd:etag='&quot;CExEXBUDQyt7ImBuWk8.&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/ciyn3</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>34.086159</title><content>longitude: -118.375984, status: 0</content><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic/ciyn3'/></entry><entry gd:etag='&quot;TREIHAEYdyt7ImA9A0QI&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/ckd7g</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>40.408562</title><content>longitude: -82.952734, status: 0</content><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic/ckd7g'/></entry><entry gd:etag='&quot;BURFDhkCGit7ImBoGUk.&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/clrrx</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>35.823119</title><content>longitude: -105.919542, status: 1</content><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic/clrrx'/></entry><entry gd:etag='&quot;R0lVG1BBeit7ImA9CkgK&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/cyevm</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>19.473546</title><content>longitude: -154.920268, status: 0</content><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic/cyevm'/></entry><entry gd:etag='&quot;FBYCQwwTdit7ImA9DVZW&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/cztg3</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>21.97481</title><content>longitude: -159.365576, status: 1</content><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic/cztg3'/></entry><entry gd:etag='&quot;BE1MWE4FGyt7ImA9A0I.&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/d2mkx</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>43.7818</title><content>longitude: -79.2589, status: 1</content><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic/d2mkx'/></entry><entry gd:etag='&quot;UlAcVx8MQSt7ImB8AEM.&quot;'><id>https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/cssly</id><updated>2014-03-12T02:23:35.448Z</updated><category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/><title>21.3061</title><content>longitude: -157.817, status: 0</content><link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AuTOUzXRQfAOdGZVWnhyLUphSjI1OTJrUDBhVU5pM2c/od6/public/basic/cssly'/></entry></feed>


So data is fetched correctly, but somehow the entries are not built correct within the GData client.
Here is some debug output:

(lldb) po feed

GDataFeedSpreadsheetList 0x192b23d0: {extensions:(author,category,gd:etag,id,link(3),openSearch:startIndex,openSearch:totalResults,title,updated)}


(lldb) po feed.entries

<__NSArrayM 0x192b2c30>(

GDataEntrySpreadsheetList 0x192f6d50: {extensions:(category,content,gd:etag,id,link,title,updated)},

GDataEntrySpreadsheetList 0x192f8ec0: {extensions:(category,content,gd:etag,id,link,title,updated)},

GDataEntrySpreadsheetList 0x192f93d0: {extensions:(category,content,gd:etag,id,link,title,updated)},

GDataEntrySpreadsheetList 0x192f9f70: {extensions:(category,content,gd:etag,id,link,title,updated)},

GDataEntrySpreadsheetList 0x192fa890: {extensions:(category,content,gd:etag,id,link,title,updated)},

GDataEntrySpreadsheetList 0x192fb400: {extensions:(category,content,gd:etag,id,link,title,updated)},

GDataEntrySpreadsheetList 0x192b4710: {extensions:(category,content,gd:etag,id,link,title,updated)},

GDataEntrySpreadsheetList 0x192cce40: {extensions:(category,content,gd:etag,id,link,title,updated)},

GDataEntrySpreadsheetList 0x192cd9b0: {extensions:(category,content,gd:etag,id,link,title,updated)},

GDataEntrySpreadsheetList 0x192ce520: {extensions:(category,content,gd:etag,id,link,title,updated)},

GDataEntrySpreadsheetList 0x192cf0b0: {extensions:(category,content,gd:etag,id,link,title,updated)},

GDataEntrySpreadsheetList 0x192d0200: {extensions:(category,content,gd:etag,id,link,title,updated)}

)


(lldb) po feed.entries[0]

GDataEntrySpreadsheetList 0x192f6d50: {extensions:(category,content,gd:etag,id,link,title,updated)}


(lldb) po [feed.entries[0] customElementDictionary]

{

}

Iulian Corcoja

unread,
Mar 16, 2014, 6:19:08 PM3/16/14
to gdata-objec...@googlegroups.com
anything?

Greg Robbins

unread,
Mar 19, 2014, 8:38:02 PM3/19/14
to gdata-objec...@googlegroups.com
I'm not aware if the Spreadsheet API supports unauthenticated access.

Questions about use of the Spreadsheet API are appropriate for the Discussions area at https://developers.google.com/google-apps/spreadsheets/

I do not know if any engineers currently support the Spreadsheet API, unfortunately.
Reply all
Reply to author
Forward
0 new messages