pablotron
--
 
Rubilicious
Thu Sep 23 15:18:11 2004 :: Link


Re: Rubilicious
Sat Jan 29 10:40:33 2005 :: Link :: Posted by Jon
Nice. Doesn't work from behind a proxy though - I notice it uses net/http and the 'http_proxy' environment variable isn't honoured. I'd written my own net/http delicious class that is no where near as developed as this one. When I've finished some related code I plan to submit a patch to you to support http proxies.

Problems
Sun Jan 30 16:41:34 2005 :: Link :: Posted by Jon
problems so far: add_link example compares array with an integer but that isn't valid in my ruby versions - maybe it is in later ones (I'd be suprised).. should be array.length. Also $0 not interpolated (same file) At the moment, posts seem to give the error '401 authorisation required'. I have supplied valid credentials. My own code, based on net/http and Base64, has the same problem. I think the delicious api might have changed, either that or the user-agent is banned (I'd expect a different error than 401 for that) or there's behaviour specific to my user ID.

Re: Rubilicious
Tue Apr 26 13:03:40 2005 :: Link :: Posted by gorou
hi. Rubilicous is very convenient. but, method 'all' doesn't work... Therefore, I made patch. Please take it if it good. $ cat rubilicious.patch *** rubilicious.rb.orig 2005-03-11 16:51:54.000000000 +0900 --- rubilicious.rb 2005-04-27 01:56:51.000000000 +0900 *************** *** 302,307 **** --- 302,308 ---- 'Authorization' => 'Basic ' << ["#{user}:#{pass}"].pack('m').strip, 'User-Agent' => "Rubilicious/#{Rubilicious::VERSION} Ruby/#{RUBY_VERSION}" } + @last_request = nil end # *************** *** 582,588 **** # def all(tag = nil) args = [(tag ? "tag=#{tag.uri_escape}" : nil)] ! get('posts/all?' << args.compact.join('&'), 'tag') end # --- 583,589 ---- # def all(tag = nil) args = [(tag ? "tag=#{tag.uri_escape}" : nil)] ! get('posts/all?' << args.compact.join('&'), 'posts/post') end #

Re: Rubilicious
Sun May 29 21:50:07 2005 :: Link

Hi everyone,

All these bugs have been fixed in Rubilicious 0.1.5.


Re: Rubilicious
Sun Dec 4 12:24:05 2005 :: Link :: Posted by oa
Hi, I just installed the Rubilicious 0.1.5 gem and I fixed a bug in Rubilicious#all. def all(tag = nil) args = [(tag ? "tag=#{tag.uri_escape}" : nil)] get('posts/all?' << args.compact.join('&'), 'post').map do |e| e['time'] = Time::from_iso8601(e['time']) e['tags'] = e['tag'].split(/\s/) e.delete 'tag' e end end I guess it is a typo, cause all the other methods of equal scope do it that way. Best regards, Oliver

Re: Rubilicious
Sun Dec 4 12:26:29 2005 :: Link :: Posted by oa
Next try, may be pre works.
  def all(tag = nil)
    args = [(tag ? "tag=#{tag.uri_escape}" : nil)]
    get('posts/all?' << args.compact.join('&'), 'post').map do |e|
      e['time'] = Time::from_iso8601(e['time'])
      e['tags'] = e['tag'].split(/\s/)
      e.delete 'tag'
      e
    end
  end

Re: Rubilicious
Thu Oct 12 12:03:04 2006 :: Link :: Posted by skippy
Hello, the 'delete' method has an incorrect url. it currently will create something like this: /v1/posts/delete?uri= but it needs to be this: /v1/posts/delete?url= notice the uri vs url. This raised another 'issue' in that the code does not alert you in any way if the operation was successful or not. It will alert if the response != 200, which is great. Yet del.icio.us returns a 200 even if the operation was not succesfull. Odd. Do you think it makes sense in the 'http_get' method if you raise an error if the output is: That check can go after the other HTTPError and it can look like this: raise HTTPError, "BODY #{resp.body}" if resp.body =~ /something went wrong/i that would also be very helpful. thank you! adam

Re: Rubilicious
Thu Oct 12 12:18:01 2006 :: Link :: Posted by skippy
hi, let me add a feature request as well (I hope you don't mind!)
def posts(date = nil, tag = nil, url = nil)
  args = [(date ? "dt=#{date}" : nil), (tag ? "tag=#{u(tag)}" : nil), (url ? "url=#{u(url)}" : nil)]
  get('posts/get?' << args.compact.join('&'), 'post').map do |e|
    e['tags'] = e['tag'].split(' ')
    e.delete 'tag'
    e['time'] = Time.iso8601(e['time'])
    e
  end
end
all this is doing is allowing you to filter on the url as well. thanks, Adam

Navigation

Previous . Next -- Display entries.