Changeset 17620 for platform/tdiary

Show
Ignore:
Timestamp:
08/14/08 18:54:24 (3 months ago)
Author:
hsbt
Message:

small fix.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/tdiary/plugin/pathtraq_counter.rb

    r17440 r17620  
    1 # pathtraq.rb $Revision 1.0 $ 
     1# pathtraq_counter.rb $Revision 1.0 $ 
    22# 
    33# Copyright (c) 2008 SHIBATA Hiroshi <shibata.hiroshi@gmail.com> 
     
    1414        begin 
    1515                timeout(10) do 
    16                         open( "http://api.pathtraq.com/page_counter?url=#{url}&m=#{mode}" ) do |f| 
     16                        open( "http://api.pathtraq.com/page_counter?api=json&url=#{url}&m=#{mode}" ) do |f| 
    1717                                json = JSON.parse( f.read ) 
    1818                        end 
     
    3232                mode.each do |m| 
    3333                        json = call_pathtraq_json( url, m ) 
    34                         r << %Q|<li>#{m}: #{json["count"]}</li>\n| unless json.nil? 
     34                        r << %Q|<li>#{m}: #{json["count"]} hits</li>\n| unless json.nil? 
    3535                end 
    3636        rescue => e 
     
    3838        end 
    3939        r << %Q|</ul>\n| 
    40         r << %Q|<div class="iddy"><span class="iddy-powered">Powered by <a href="http://pathtraq.com/">pathtraq</a></span></div>\n| 
     40        r << %Q|<div class="iddy"><span class="iddy-powered">Powered by <a href="http://pathtraq.com/">Pathtraq</a></span></div>\n| 
    4141 
    4242        return r