> Ah, I must've missed this in your first mail somehow. Perhaps I just
> read your mail too quickly.
> Anyways, the answer here is that we don't support getting all files.
> Instead, we support just getting all tags and then getting all the
> files associated with that tag. Perhaps the library should explicitly
> throw an exception upon this error, but as you found out, it doesn't
> currently.
> If you just loop on tags and build up an internal map of fileid =>
> file data, you should be okay.
> FYI: we do this for scalability concerns. In general, the number of
> tags a user has is an order of magnitude less than the number of
> files.
> Hope that helps!
> If you have any other questions, feel free to ask.
> Ian
> On 3/8/08, FatHat <dontbugm...@googlemail.com> wrote:
> > Thanks for the replay Ian!
> > This is what I get if I print out the response around line 573:
> > #<Net::HTTPInternalServerError:0x53c53c>
> > Server error: Prelude.read: no parse
> > I have no idea what this error means.
> > On Mar 8, 10:52 pm, "Ian Sefferman" <is...@iseff.com> wrote:
> > > Hrm, this works okay for our tests.
> > > Perhaps there's some XML that the parser isn't seeing correctly. Could
> > > you output the response from the API and copy/paste it here? If it
> > > contains any personal data you'd rather not share, feel free to
> > > anonymize it appropriately... or just send it to me personally.
> > > Thanks!
> > > Ian
> > > On 3/8/08, FatHat <dontbugm...@googlemail.com> wrote:
> > > > Dear Openomy,
> > > > I'm trying to play with your Ruby implementation and the latest
> > > > openomy.rb module but I keep getting errors, some functions just don't
> > > > work. I'm on Ruby 1.8.6.
> > > > I took your example script and tried to get a list of all my files
> > > > instead of changing the tag as you show.
> > > > require "openomy"
> > > > Openomy::OpenomyAPI.setKeys("appcode", "secret")
> > > > a = Openomy::Auth::new()
> > > > u = Openomy::Objects::User::new
> > > > u.username = "foo"
> > > > u.password = "bar"
> > > > conf_token = a.create_confirmed_token(u)
> > > > files = Openomy::Files::new(conf_token)
> > > > my_files = files.find(:all)
> > > > The find(:all) returns an error:
> > > > ./openomy.rb:413:in `text_nows': undefined method `+' for nil:NilClass
> > > > (NoMethodError)
> > > > from ./openomy.rb:173:in `text'
> > > > from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
> > > > ruby/1.8/rexml/parsers/streamparser.rb:29:in `parse'
> > > > from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
> > > > ruby/1.8/rexml/document.rb:199:in `parse_stream'
> > > > from ./openomy.rb:167:in `parse'
> > > > from ./openomy.rb:576:in `make_generic_request'
> > > > from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
> > > > ruby/1.8/net/http.rb:547:in `start'
> > > > from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
> > > > ruby/1.8/net/http.rb:440:in `start'
> > > > from ./openomy.rb:564:in `make_generic_request'
> > > > from ./openomy.rb:553:in `make_request'
> > > > from ./openomy.rb:606:in `make_request'
> > > > from ./openomy.rb:671:in `get_file'
> > > > from ./openomy.rb:667:in `find'
> > > > Finding on simple file works perfectly
> > > > puts files.get_file(1698)
> > > > Any idea?
> --
> Ian Seffermanhttp://www.openomy.com|http://www.iseff.com