SmartDroidDeveloper / google-api-java-client

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

FeedURLFactory.getSpreadsheetKeyFromUrl not recognizing a valid URL #124

Closed GoogleCodeExporter closed 9 years ago

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

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

Describe the problem.
I am using the follwing URL: 
https://spreadsheets.google.com/ccc?key=0AulArDet_f7TdEUxcDNiMkZ5bHNZcGFqRThqQWp
6eHc&hl=en#gid=0

When I try to obtain the spreadsheet key with the method 
FeedURLFactory.getSpreadsheetKeyFromUrl, I get the following error:
Exception in thread "main" java.lang.IllegalArgumentException: Uknown URL 
format.

How would you expect it to be fixed?
The method should return the key of the spreadsheet 
(0AulArDet_f7TdEUxcDNiMkZ5bHNZcGFqRThqQWp6eHc). I reviewed the code of the 
script and it looks like the key format has chanted since this method was 
developed, since the key doesn't start with "p" and it doesn't contain any 
period.

See the source of the method at: 
http://code.google.com/p/gdata-java-client/source/browse/trunk/java/src/com/goog
le/gdata/client/spreadsheet/FeedURLFactory.java

Thanks.

Original issue reported on code.google.com by dle...@gmail.com on 15 Feb 2011 at 10:39

GoogleCodeExporter commented 9 years ago
Indeed that seems like a bug.  But please file this Issue at the proper project 
site:
http://code.google.com/p/gdata-java-client/issues/entry

Original comment by yan...@google.com on 15 Feb 2011 at 3:42