giggly 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,78 @@
1
+ :friends_info:
2
+ :method_name: "getFriendsInfo"
3
+ :request_type: :post
4
+ :success: >
5
+ <?xml version="1.0" encoding="utf-8" ?>
6
+ <socialize.getFriendsInfoResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema" xmlns="urn:com:gigya:api">
7
+ <statusCode>200</statusCode>
8
+ <statusReason>OK</statusReason>
9
+ <friends>
10
+ <friend>
11
+ <UID>00</UID>
12
+ <friendshipSig>00</friendshipSig>
13
+ <timestamp>2009-06-22 14:22:25</timestamp>
14
+ <isSiteUser>false</isSiteUser>
15
+ <identities>
16
+ <identity>
17
+ <provider>Facebook</provider>
18
+ <UID>00</UID>
19
+ <providerUID>00</providerUID>
20
+ <isLoginIdentity>false</isLoginIdentity>
21
+ <nickname>Baba</nickname>
22
+ <photoURL>http://profile.ak.facebook.com/v229/1427/35/00.jpg</photoURL>
23
+ <thumbnailURL>http://profile.ak.facebook.com/v229/1427/35/00.jpg</thumbnailURL>
24
+ <firstName>Bob</firstName>
25
+ <lastName>Marley</lastName>
26
+ <gender>M</gender>
27
+ <age>36</age>
28
+ <birthDay>26</birthDay>
29
+ <birthMonth>12</birthMonth>
30
+ <birthYear>1973</birthYear>
31
+ <zip />
32
+ <profileURL>http://www.facebook.com/profile.php?id=00</profileURL>
33
+ </identity>
34
+ </identities>
35
+ <nickname>Baba</nickname>
36
+ <photoURL>http://profile.ak.facebook.com/v229/1427/35/00.jpg</photoURL>
37
+ <thumbnailURL>http://profile.ak.facebook.com/v229/1427/35/00.jpg</thumbnailURL>
38
+ <firstName>Bob</firstName>
39
+ <lastName>Marley</lastName>
40
+ <age>36</age>
41
+ <birthDay>26</birthDay>
42
+ <birthMonth>12</birthMonth>
43
+ <birthYear>1973</birthYear>
44
+ <gender>M</gender>
45
+ <zip />
46
+ <profileURL>http://www.facebook.com/profile.php?id=00</profileURL>
47
+ </friend>
48
+ <friend>
49
+ <UID>01</UID>
50
+ <friendshipSig>001</friendshipSig>
51
+ <timestamp>2009-06-22 14:22:25</timestamp>
52
+ <isSiteUser>false</isSiteUser>
53
+ <identities>
54
+ <identity>
55
+ <provider>MySpace</provider>
56
+ <UID>001</UID>
57
+ <providerUID>11</providerUID>
58
+ <isLoginIdentity>false</isLoginIdentity>
59
+ <nickname>Tom</nickname>
60
+ <thumbnailURL>http://b2.ac-images.myspacecdn.com/00000/20/52/00.jpg</thumbnailURL>
61
+ <profileURL>http://www.myspace.com/tom</profileURL>
62
+ </identity>
63
+ </identities>
64
+ <nickname>Tom</nickname>
65
+ <thumbnailURL>http://b2.ac-images.myspacecdn.com/00000/20/52/00.jpg</thumbnailURL>
66
+ <profileURL>http://www.myspace.com/tom</profileURL>
67
+ </friend>
68
+ </friends>
69
+ </socialize.getFriendsInfoResponse>
70
+ :failure: >
71
+ <?xml version="1.0" encoding="utf-8" ?>
72
+ <socialize.disconnectResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
73
+ xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema/1.0.xsd" xmlns="urn:com:gigya:api">
74
+ <statusCode>401</statusCode>
75
+ <statusReason>OK</statusReason>
76
+ <errorCode>123456</errorCode>
77
+ <description>FAIL</description>
78
+ </socialize.disconnectResponse>
@@ -0,0 +1,19 @@
1
+ :raw_data:
2
+ :method_name: "getRawData"
3
+ :request_type: :post
4
+ :success: >
5
+ <?xml version="1.0" encoding="utf-8" ?>
6
+ <socialize.getRawDataResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema/1.0.xsd" xmlns="urn:com:gigya:api">
7
+ <statusCode>200</statusCode>
8
+ <statusReason>OK</statusReason>
9
+ <data>[{"birthday":"May 31, 1972","name":"Bobo"}]</data>
10
+ </socialize.getRawDataResponse>
11
+ :failure: >
12
+ <?xml version="1.0" encoding="utf-8" ?>
13
+ <socialize.disconnectResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14
+ xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema/1.0.xsd" xmlns="urn:com:gigya:api">
15
+ <statusCode>401</statusCode>
16
+ <statusReason>OK</statusReason>
17
+ <errorCode>123456</errorCode>
18
+ <description>FAIL</description>
19
+ </socialize.disconnectResponse>
@@ -0,0 +1,24 @@
1
+ :session_info:
2
+ :method_name: "getSessionInfo"
3
+ :request_type: :post
4
+ :success: >
5
+ <?xml version="1.0" encoding="utf-8" ?>
6
+ <socialize.getSessionInfoResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema/1.0.xsd" xmlns="urn:com:gigya:api">
7
+ <statusCode>200</statusCode>
8
+ <statusReason>OK</statusReason>
9
+ <authToken>0000</authToken>
10
+ <tokenSecret />
11
+ <tokenExpiration>2009-06-21 17:00:00</tokenExpiration>
12
+ <sessionHandle />
13
+ <sessionExpiration />
14
+ <IV>0000</IV>
15
+ </socialize.getSessionInfoResponse>
16
+ :failure: >
17
+ <?xml version="1.0" encoding="utf-8" ?>
18
+ <socialize.disconnectResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19
+ xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema/1.0.xsd" xmlns="urn:com:gigya:api">
20
+ <statusCode>401</statusCode>
21
+ <statusReason>OK</statusReason>
22
+ <errorCode>123456</errorCode>
23
+ <description>FAIL</description>
24
+ </socialize.disconnectResponse>
@@ -0,0 +1,95 @@
1
+ :user_info:
2
+ :method_name: "getUserInfo"
3
+ :request_type: :post
4
+ :success: >
5
+ <?xml version="1.0" encoding="utf-8" ?>
6
+ <socialize.getUserInfoResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema" xmlns="urn:com:gigya:api">
7
+ <statusCode>200</statusCode>
8
+ <statusReason>OK</statusReason>
9
+ <UID>000000</UID>
10
+ <UIDSig>0000</UIDSig>
11
+ <timestamp>2009-06-21 12:07:09</timestamp>
12
+ <isSiteUser>true</isSiteUser>
13
+ <isLoggedIn>true</isLoggedIn>
14
+ <isConnected>true</isConnected>
15
+ <loginProvider>MySpace</loginProvider>
16
+ <identities>
17
+ <identity>
18
+ <provider>MySpace</provider>
19
+ <UID>0000000</UID>
20
+ <providerUID>000000</providerUID>
21
+ <isLoginIdentity>true</isLoginIdentity>
22
+ <nickname>Bobo</nickname>
23
+ <thumbnailURL>http://c4.ac-images.myspacecdn.com/images02/11/00000.jpg</thumbnailURL>
24
+ <gender>M</gender>
25
+ <age>47</age>
26
+ <birthDay>11</birthDay>
27
+ <birthMonth>8</birthMonth>
28
+ <birthYear>1962</birthYear>
29
+ <country>IL</country>
30
+ <profileURL>http://www.myspace.com/00000000</profileURL>
31
+ <proxiedEmail />
32
+ </identity>
33
+ <identity>
34
+ <provider>Facebook</provider>
35
+ <UID>00000000</UID>
36
+ <providerUID>000000</providerUID>
37
+ <isLoginIdentity>false</isLoginIdentity>
38
+ <nickname>Bobi</nickname>
39
+ <photoURL>http://profile.ak.facebook.com/v222/15/34/00.jpg</photoURL>
40
+ <thumbnailURL>http://profile.ak.facebook.com/v222/15/34/q770169391_5172.jpg</thumbnailURL>
41
+ <firstName>Bobi</firstName>
42
+ <lastName>A</lastName>
43
+ <gender>F</gender>
44
+ <age>37</age>
45
+ <birthDay>31</birthDay>
46
+ <birthMonth>5</birthMonth>
47
+ <birthYear>1972</birthYear>
48
+ <profileURL>http://www.facebook.com/profile.php?id=00</profileURL>
49
+ <proxiedEmail>apps+00000000@proxymail.facebook.com</proxiedEmail>
50
+ </identity>
51
+ <identity>
52
+ <provider>twitter</provider>
53
+ <UID>0000000</UID>
54
+ <providerUID>000000</providerUID>
55
+ <isLoginIdentity>false</isLoginIdentity>
56
+ <nickname>Bobu</nickname>
57
+ <photoURL>http://static.twitter.com/images/default_profile_normal.png</photoURL>
58
+ <firstName>Bobu</firstName>
59
+ <lastName>A</lastName>
60
+ <profileURL>http://twitter.com/shirlyleshed</profileURL>
61
+ <proxiedEmail />
62
+ </identity>
63
+ <identity>
64
+ <provider>Yahoo</provider>
65
+ <UID>000000</UID>
66
+ <providerUID>00000</providerUID>
67
+ <isLoginIdentity>false</isLoginIdentity>
68
+ <nickname>Shirly</nickname>
69
+ <thumbnailURL>http://a323.yahoofs.com/coreid/000.jpg?ciAgMZLB5RbqrC1K</thumbnailURL>
70
+ <gender>F</gender>
71
+ <profileURL>http://profiles.yahoo.com/u/000</profileURL>
72
+ <proxiedEmail />
73
+ </identity>
74
+ </identities>
75
+ <nickname>Bobo</nickname>
76
+ <thumbnailURL>http://c4.ac-images.myspacecdn.com/images02/11/0000.jpg</thumbnailURL>
77
+ <gender>M</gender>
78
+ <age>47</age>
79
+ <birthDay>11</birthDay>
80
+ <birthMonth>8</birthMonth>
81
+ <birthYear>1962</birthYear>
82
+ <country>IL</country>
83
+ <profileURL>http://www.myspace.com/00000000</profileURL>
84
+ <capabilities>Login, Friends, Notifications, Actions, Status</capabilities>
85
+ <proxiedEmail />
86
+ </socialize.getUserInfoResponse>
87
+ :failure: >
88
+ <?xml version="1.0" encoding="utf-8" ?>
89
+ <socialize.disconnectResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
90
+ xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema/1.0.xsd" xmlns="urn:com:gigya:api">
91
+ <statusCode>401</statusCode>
92
+ <statusReason>OK</statusReason>
93
+ <errorCode>123456</errorCode>
94
+ <description>FAIL</description>
95
+ </socialize.disconnectResponse>
@@ -0,0 +1,19 @@
1
+ :publish_user_action:
2
+ :method_name: "publishUserAction"
3
+ :request_type: :post
4
+ :success: >
5
+ <?xml version="1.0" encoding="utf-8" ?>
6
+ <socialize.publishUserActionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7
+ xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema/1.0.xsd" xmlns="urn:com:gigya:api">
8
+ <statusCode>200</statusCode>
9
+ <statusReason>OK</statusReason>
10
+ </socialize.publishUserActionResponse>
11
+ :failure: >
12
+ <?xml version="1.0" encoding="utf-8" ?>
13
+ <socialize.disconnectResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14
+ xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema/1.0.xsd" xmlns="urn:com:gigya:api">
15
+ <statusCode>401</statusCode>
16
+ <statusReason>OK</statusReason>
17
+ <errorCode>123456</errorCode>
18
+ <description>FAIL</description>
19
+ </socialize.disconnectResponse>
@@ -0,0 +1,19 @@
1
+ :send_notification:
2
+ :method_name: "sendNotification"
3
+ :request_type: :post
4
+ :success: >
5
+ <?xml version="1.0" encoding="utf-8" ?>
6
+ <socialize.sendNotificationResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7
+ xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema/1.0.xsd" xmlns="urn:com:gigya:api">
8
+ <statusCode>200</statusCode>
9
+ <statusReason>OK</statusReason>
10
+ </socialize.sendNotificationResponse>
11
+ :failure: >
12
+ <?xml version="1.0" encoding="utf-8" ?>
13
+ <socialize.disconnectResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14
+ xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema/1.0.xsd" xmlns="urn:com:gigya:api">
15
+ <statusCode>401</statusCode>
16
+ <statusReason>OK</statusReason>
17
+ <errorCode>123456</errorCode>
18
+ <description>FAIL</description>
19
+ </socialize.disconnectResponse>
@@ -0,0 +1,19 @@
1
+ :"status=":
2
+ :method_name: "setStatus"
3
+ :request_type: :post
4
+ :success: >
5
+ <?xml version="1.0" encoding="utf-8" ?>
6
+ <socialize.setStatusResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7
+ xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema/1.0.xsd" xmlns="urn:com:gigya:api">
8
+ <statusCode>200</statusCode>
9
+ <statusReason>OK</statusReason>
10
+ </socialize.setStatusResponse>
11
+ :failure: >
12
+ <?xml version="1.0" encoding="utf-8" ?>
13
+ <socialize.setStatusResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14
+ xsi:schemaLocation="urn:com:gigya:api http://socialize.api.gigya.com/schema/1.0.xsd" xmlns="urn:com:gigya:api">
15
+ <statusCode>401</statusCode>
16
+ <statusReason>OK</statusReason>
17
+ <errorCode>123456</errorCode>
18
+ <description>FAIL</description>
19
+ </socialize.setStatusResponse>
@@ -0,0 +1,44 @@
1
+ require 'test/unit'
2
+ require 'pathname'
3
+ require 'rubygems'
4
+
5
+ gem 'thoughtbot-shoulda', '>= 2.10.1'
6
+ gem 'jnunemaker-matchy', '0.4.0'
7
+ gem 'mocha', '0.9.7'
8
+ gem 'fakeweb', '>= 1.2.5'
9
+ gem 'redgreen', '>= 1.0.0'
10
+
11
+ require 'shoulda'
12
+ require 'matchy'
13
+ require 'mocha'
14
+ require 'fakeweb'
15
+ require 'redgreen' if ENV['TM_FILENAME'].nil?
16
+
17
+
18
+ dir = (Pathname(__FILE__).dirname + '../lib').expand_path
19
+ require dir + 'giggly'
20
+
21
+ require 'fake_socialize'
22
+
23
+ puts "Disabling net connections."
24
+ FakeWeb.allow_net_connect = false
25
+
26
+ class Test::Unit::TestCase
27
+
28
+ custom_matcher :be_successful do |receiver, matcher, args|
29
+ args[0] ||= {"statusCode" => "200"}
30
+ !!args[0].each { |k,v| break false unless receiver[k] == v }
31
+ end
32
+
33
+ def setup_giggly_rest
34
+ @request = Giggly::Rest::Request.new(
35
+ :api_key => 'TEST_KEY',
36
+ :secret_key => 'SECRET_KEY',
37
+ :user_id => 'GIGYA_USER_ID'
38
+ )
39
+ @giggly = Giggly::Rest::Socialize.new(@request)
40
+ @giggly.request.stubs(:sign).returns({}) # to make fakeweb not be so slow
41
+ end
42
+
43
+
44
+ end
metadata ADDED
@@ -0,0 +1,152 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: giggly
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ben Vandgrift
8
+ - Adam Hunter
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2009-10-08 00:00:00 -04:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: httparty
18
+ type: :runtime
19
+ version_requirement:
20
+ version_requirements: !ruby/object:Gem::Requirement
21
+ requirements:
22
+ - - "="
23
+ - !ruby/object:Gem::Version
24
+ version: 0.4.5
25
+ version:
26
+ - !ruby/object:Gem::Dependency
27
+ name: thoughtbot-shoulda
28
+ type: :development
29
+ version_requirement:
30
+ version_requirements: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: 2.10.1
35
+ version:
36
+ - !ruby/object:Gem::Dependency
37
+ name: jnunemaker-matchy
38
+ type: :development
39
+ version_requirement:
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - "="
43
+ - !ruby/object:Gem::Version
44
+ version: 0.4.0
45
+ version:
46
+ - !ruby/object:Gem::Dependency
47
+ name: mocha
48
+ type: :development
49
+ version_requirement:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.9.4
55
+ version:
56
+ - !ruby/object:Gem::Dependency
57
+ name: fakeweb
58
+ type: :development
59
+ version_requirement:
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 1.2.5
65
+ version:
66
+ - !ruby/object:Gem::Dependency
67
+ name: redgreen
68
+ type: :development
69
+ version_requirement:
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 1.0.0
75
+ version:
76
+ description: breaks the gigya web api down into idiomatic ruby for your coding pleasure.
77
+ email: somethingfamiliar@gmail.com
78
+ executables: []
79
+
80
+ extensions: []
81
+
82
+ extra_rdoc_files:
83
+ - README.rdoc
84
+ files:
85
+ - README.rdoc
86
+ - Rakefile
87
+ - VERSION
88
+ - javascripts/giggly-socialize-min.js
89
+ - javascripts/giggly-socialize.js
90
+ - lib/giggly.rb
91
+ - lib/giggly/friend.rb
92
+ - lib/giggly/javascript.rb
93
+ - lib/giggly/javascript/helper.rb
94
+ - lib/giggly/javascript/socialize.rb
95
+ - lib/giggly/rest.rb
96
+ - lib/giggly/rest/request.rb
97
+ - lib/giggly/rest/socialize.rb
98
+ - lib/giggly/session_info.rb
99
+ - lib/giggly/user.rb
100
+ - test/fake_socialize.rb
101
+ - test/giggly/friend_test.rb
102
+ - test/giggly/javascript/helper_test.rb
103
+ - test/giggly/javascript/socialize_test.rb
104
+ - test/giggly/rest/request_test.rb
105
+ - test/giggly/rest/socialize_test.rb
106
+ - test/giggly/user_test.rb
107
+ - test/responses/disconnect.yml
108
+ - test/responses/get_friends_info.yml
109
+ - test/responses/get_raw_data.yml
110
+ - test/responses/get_session_info.yml
111
+ - test/responses/get_user_info.yml
112
+ - test/responses/publish_user_action.yml
113
+ - test/responses/send_notification.yml
114
+ - test/responses/set_status.yml
115
+ - test/test_helper.rb
116
+ has_rdoc: true
117
+ homepage: http://github.com/sfamiliar/giggly
118
+ licenses: []
119
+
120
+ post_install_message:
121
+ rdoc_options:
122
+ - --charset=UTF-8
123
+ require_paths:
124
+ - lib
125
+ required_ruby_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: "0"
130
+ version:
131
+ required_rubygems_version: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ version: "0"
136
+ version:
137
+ requirements: []
138
+
139
+ rubyforge_project:
140
+ rubygems_version: 1.3.5
141
+ signing_key:
142
+ specification_version: 3
143
+ summary: wrapper for the gigya rest and javascript apis
144
+ test_files:
145
+ - test/fake_socialize.rb
146
+ - test/giggly/friend_test.rb
147
+ - test/giggly/javascript/helper_test.rb
148
+ - test/giggly/javascript/socialize_test.rb
149
+ - test/giggly/rest/request_test.rb
150
+ - test/giggly/rest/socialize_test.rb
151
+ - test/giggly/user_test.rb
152
+ - test/test_helper.rb