public
Description: Ruby Client Library for 51.com's API
Clone URL: git://github.com/taweili/wuyao.git
rename index
taweili (author)
Sat Aug 23 16:43:47 -0700 2008
commit  04346d0ff7177a3ad9d9baf7c52e8de91411b94d
tree    9ff19cdc0c2e2d2edaac390ae32af9c1ff4224aa
parent  94f8547a5a8befc626c5729014d23e413a3f7fc3
...
6
7
8
9
 
10
11
12
...
6
7
8
 
9
10
11
12
0
@@ -6,7 +6,7 @@ class ApplicationController < ActionController::Base
0
 
0
   # See ActionController::RequestForgeryProtection for details
0
   # Uncomment the :secret if you're not using the cookie session store
0
- protect_from_forgery # :secret => 'a0b225fed9b3f4efa1e2c570be163225'
0
+ # protect_from_forgery # :secret => 'a0b225fed9b3f4efa1e2c570be163225'
0
   
0
   # See ActionController::Base for details
0
   # Uncomment this to filter the contents of submitted sensitive data parameters
...
2
3
4
 
 
 
 
5
6
7
8
 
9
 
10
11
 
12
13
 
14
15
 
16
17
 
18
19
 
20
21
 
22
23
 
24
25
26
27
 
 
 
28
29
 
30
31
32
33
 
34
35
36
...
2
3
4
5
6
7
8
9
10
11
 
12
13
14
15
 
16
17
 
18
19
 
20
21
 
22
23
 
24
25
 
26
27
 
28
29
 
 
 
30
31
32
33
 
34
35
36
37
 
38
39
40
41
0
@@ -2,35 +2,40 @@ class HomeController < ApplicationController
0
   acts_as_wuyao_controller
0
   
0
   def index
0
+ test_method("fiveone.friends.get", :uid => "taweili")
0
+ end
0
+
0
+ def list
0
     # for JS only
0
     # test_method("fiveone.users.getLoggedInUser")
0
     
0
-# result = test_method("fiveone.friends.areFriends", :uids1 => "taweili", :uids2 => "kangtk")
0
+ result = test_method("fiveone.friends.areFriends", :uids1 => "taweili", :uids2 => "kangtk")
0
     
0
+ test_method("fiveone.friends.get", :uid => "taweili")
0
     
0
-# test_method("fiveone.friends.get", :uid => "taweili")
0
+ test_method("fiveone.friends.get", :uid => "kangtk") # friend
0
     
0
-# test_method("fiveone.friends.get", :uid => "kangtk") # friend
0
+ test_method("fiveone.friends.get", :uid => "vivianaxi") # stranger
0
     
0
-# test_method("fiveone.friends.get", :uid => "vivianaxi") # stranger
0
+ test_method("fiveone.photos.getHome", :uid => "taweili")
0
     
0
-# test_method("fiveone.photos.getHome", :uid => "taweili")
0
+ test_method("fiveone.photos.getHome", :uid => "kangtk") # friend
0
     
0
-# test_method("fiveone.photos.getHome", :uid => "kangtk") # friend
0
+ test_method("fiveone.photos.getHome", :uid => "vivianaxi") # stranger
0
     
0
-# test_method("fiveone.photos.getHome", :uid => "vivianaxi") # stranger
0
+ albums = test_method("fiveone.photos.getAlbums", :uid => "taweili")
0
     
0
-# albums = test_method("fiveone.photos.getAlbums", :uid => "taweili")
0
+ test_method("fiveone.photos.get", :uid => "taweili", :aid => albums[0].aid)
0
     
0
-# test_method("fiveone.photos.get", :uid => "taweili", :aid => albums[0].aid)
0
-
0
-# test_method("fiveone.users.getInfo", :uid => "taweili", :fields => Wuyao::User.attr_names.join(","))
0
+ test_method("fiveone.users.getInfo", :uid => "taweili", :fields => Wuyao::User.attr_names.join(","))
0
+
0
+ test_method("fiveone.users.getInfo", :uids => "taweili,kangtk", :fields => Wuyao::User.attr_names.join(","))
0
 
0
-# test_method("fiveone.homes.getInfo", :uids => "taweili", :fields => Wuyao::Home.attr_names.join(","))
0
+ test_method("fiveone.homes.getInfo", :uids => "taweili", :fields => Wuyao::Home.attr_names.join(","))
0
 
0
     test_method("fiveone.homes.getInfo", :uids => "taweili, kangtk", :fields => Wuyao::Home.attr_names.join(","))
0
     
0
-# test_method("fiveone.homes.getInfo", :uid => "vivianaxi, taweili", :fields => Wuyao::Home.attr_names.join(","))
0
+ test_method("fiveone.homes.getInfo", :uid => "vivianaxi, taweili", :fields => Wuyao::Home.attr_names.join(","))
0
   end
0
   
0
   protected
...
1
2
3
 
...
1
2
 
3
0
@@ -1,3 +1,3 @@
0
 #! /bin/bash
0
 
0
-exec ssh -C -v -o TCPKeepAlive=true admin@www.featha.com -Rwww.featha.com:5100:127.0.0.1:3003
0
+exec ssh -C -v -o TCPKeepAlive=true beautypk@61.172.255.117 -R5100:127.0.0.1:3003
...
4
5
6
7
 
8
9
10
...
4
5
6
 
7
8
9
10
0
@@ -4,7 +4,7 @@ require 'pp'
0
 
0
 module Wuyao
0
   class Parse
0
- DEBUG = true
0
+ DEBUG = false
0
     class MyListener
0
       include REXML::StreamListener
0
       attr_accessor :result
...
36
37
38
39
 
 
 
 
40
41
42
...
45
46
47
 
 
48
49
50
...
36
37
38
 
39
40
41
42
43
44
45
...
48
49
50
51
52
53
54
55
0
@@ -36,7 +36,10 @@ module Wuyao
0
       wuyao_params.each { |k,v| tmp_params[k.to_s] = v }
0
       wuyao_params = tmp_params
0
       str = (wuyao_params.sort.collect { |c| "#{c[0]}=#{c[1]}" }).join("") + ENV['WUYAO_SECRET_KEY']
0
-
0
+
0
+ puts("#### #{tmp_params.inspect}")
0
+ puts("#### #{str}")
0
+
0
       sig = Digest::MD5.hexdigest(str)
0
       
0
       tmp_params = { }
0
@@ -45,6 +48,8 @@ module Wuyao
0
       
0
       wuyao_params["51_sig"] = sig
0
       
0
+ puts("#### #{wuyao_params.inspect}")
0
+
0
       Parse.new.process(Service.new.post(wuyao_params).body)
0
     end
0
     

Comments

    No one has commented yet.