viadeo 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/Gemfile +4 -0
  2. data/Gemfile.lock +43 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +55 -0
  5. data/Rakefile +28 -0
  6. data/fixtures/vcr_cassettes/newsfeed/retrieve.yml +114 -0
  7. data/fixtures/vcr_cassettes/recommend/create.yml +43 -0
  8. data/fixtures/vcr_cassettes/recommend/retrieve.yml +56 -0
  9. data/fixtures/vcr_cassettes/reference_data/all.yml +40 -0
  10. data/fixtures/vcr_cassettes/search/find.yml +68 -0
  11. data/fixtures/vcr_cassettes/status/create.yml +44 -0
  12. data/fixtures/vcr_cassettes/user/retrieve_fail_response.yml +41 -0
  13. data/fixtures/vcr_cassettes/user/retrieve_success_response.yml +41 -0
  14. data/fixtures/vcr_cassettes/user/retrieve_with_contacts_response.yml +40 -0
  15. data/fixtures/vcr_cassettes/user/save_response.yml +40 -0
  16. data/fixtures/vcr_cassettes/user/update_response.yml +40 -0
  17. data/lib/viadeo/configuration.rb +21 -0
  18. data/lib/viadeo/error.rb +5 -0
  19. data/lib/viadeo/graph_connection.rb +10 -0
  20. data/lib/viadeo/graph_object.rb +124 -0
  21. data/lib/viadeo/newsfeed.rb +15 -0
  22. data/lib/viadeo/operations/create.rb +12 -0
  23. data/lib/viadeo/operations/get.rb +13 -0
  24. data/lib/viadeo/operations/list.rb +12 -0
  25. data/lib/viadeo/operations/update.rb +25 -0
  26. data/lib/viadeo/recommend.rb +20 -0
  27. data/lib/viadeo/reference_data.rb +43 -0
  28. data/lib/viadeo/request.rb +24 -0
  29. data/lib/viadeo/search.rb +27 -0
  30. data/lib/viadeo/status.rb +15 -0
  31. data/lib/viadeo/user.rb +41 -0
  32. data/lib/viadeo/util.rb +21 -0
  33. data/lib/viadeo/version.rb +3 -0
  34. data/lib/viadeo.rb +56 -0
  35. data/spec/graph_object_spec.rb +141 -0
  36. data/spec/newsfeed_spec.rb +13 -0
  37. data/spec/recommend_spec.rb +26 -0
  38. data/spec/reference_data_spec.rb +13 -0
  39. data/spec/search_spec.rb +13 -0
  40. data/spec/shared_create_graph_object.rb +15 -0
  41. data/spec/shared_graph_object.rb +12 -0
  42. data/spec/spec_helper.rb +12 -0
  43. data/spec/status_spec.rb +15 -0
  44. data/spec/support/vcr_setup.rb +5 -0
  45. data/spec/user_spec.rb +92 -0
  46. data/spec/util_spec.rb +32 -0
  47. data/spec/viadeo_spec.rb +13 -0
  48. metadata +207 -0
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in viadeo.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,43 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ viadeo (0.0.1)
5
+ faraday
6
+ multi_json
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ addressable (2.3.4)
12
+ crack (0.3.2)
13
+ diff-lcs (1.2.4)
14
+ faraday (0.8.7)
15
+ multipart-post (~> 1.1)
16
+ multi_json (1.7.2)
17
+ multipart-post (1.2.0)
18
+ rspec (2.13.0)
19
+ rspec-core (~> 2.13.0)
20
+ rspec-expectations (~> 2.13.0)
21
+ rspec-mocks (~> 2.13.0)
22
+ rspec-core (2.13.1)
23
+ rspec-expectations (2.13.0)
24
+ diff-lcs (>= 1.1.3, < 2.0)
25
+ rspec-mocks (2.13.1)
26
+ simplecov (0.7.1)
27
+ multi_json (~> 1.0)
28
+ simplecov-html (~> 0.7.1)
29
+ simplecov-html (0.7.1)
30
+ vcr (2.4.0)
31
+ webmock (1.9.3)
32
+ addressable (>= 2.2.7)
33
+ crack (>= 0.3.2)
34
+
35
+ PLATFORMS
36
+ ruby
37
+
38
+ DEPENDENCIES
39
+ rspec
40
+ simplecov
41
+ vcr
42
+ viadeo!
43
+ webmock
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 neceha bgl
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # Viadeo
2
+ This gem enables you to access most features of the Viadeo GRAPH API via Ruby. You'll need an access token, which you can get through Viadeo's Graph APIi. Be careful, access tokens may only be valid for about 1 Month
3
+
4
+ ## Installation
5
+
6
+ Add this line to your application's Gemfile:
7
+
8
+ gem 'viadeo'
9
+
10
+ And then execute:
11
+
12
+ $ bundle
13
+
14
+ Or install it yourself as:
15
+
16
+ $ gem install viadeo
17
+
18
+ ## Usage
19
+
20
+ ### Configuration
21
+ Viadeo API requires you to authenticate via OAuth, so you'll need to
22
+ [register your application with Viadeo][register]. Once you've registered an
23
+ application, make sure to set the correct access level
24
+
25
+ [register]: http://dev.viadeo.com/documentation/authentication/request-an-api-key
26
+
27
+ Configure Viadeo parameters by passing block
28
+ ```ruby
29
+ Viadeo.configure do |config|
30
+ config.logger = logger
31
+ config.timeout = 30
32
+ config.open_timeout = 30
33
+ config.url = "https://api.viadeo.com"
34
+ end
35
+ ```
36
+
37
+ ### Search
38
+ Search users at paris school and limit the result to 5
39
+ ```ruby
40
+ require "viadeo"
41
+ search = Viadeo::Search.new(access_token, connection: "users")
42
+ search.find(school: "paris", limit: 5)
43
+ ```
44
+ Viadeo API return a JSON data which is converted to graph object
45
+ The graph object can be converted to json format
46
+ search.to_json
47
+
48
+
49
+ ## Contributing
50
+
51
+ 1. Fork it
52
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
53
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
54
+ 4. Push to the branch (`git push origin my-new-feature`)
55
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,28 @@
1
+ require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+ RSpec::Core::RakeTask.new('spec')
4
+ require 'rdoc/task'
5
+ Rake::RDocTask.new do |rdoc|
6
+ require 'viadeo/version'
7
+ rdoc.title = "viadeo #{ Viadeo::VERSION }"
8
+ rdoc.rdoc_files.include('README.md')
9
+ rdoc.rdoc_files.include('lib/**/*.rb')
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.main = 'README.md'
12
+ end
13
+
14
+ desc "Start irb with viadeo as gem"
15
+ task :dev_console do
16
+ sh "irb -I lib -rubygems -r viadeo"
17
+ end
18
+
19
+ desc "Build gem"
20
+ task :gem do
21
+ exec('gem build viadeo.gemspec')
22
+ end
23
+
24
+ desc "clean generated files"
25
+ task :clean do
26
+ rm_f Dir.glob('*.gem').join(" ")
27
+ rm_rf "rdoc"
28
+ end
@@ -0,0 +1,114 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.viadeo.com/newsfeed?limit=5
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Viadeo gem/0.0.1
12
+ Authorization:
13
+ - Bearer access_token_test_3e8c55877482b2
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded;charset=UTF-8
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - ! '*/*'
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Apache-Coyote/1.1
27
+ Uuid:
28
+ - 1c209bf7-1e5f-45c5-904c-ad64a2881712
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Date:
34
+ - Fri, 03 May 2013 11:52:11 GMT
35
+ Content-Encoding:
36
+ - gzip
37
+ Vary:
38
+ - Accept-Encoding
39
+ body:
40
+ encoding: ASCII-8BIT
41
+ string: !binary |-
42
+ H4sIAAAAAAAE/+W9B2AjS5YYtmfZlgb2t5yzrV7e7s3MHwbkMP//2UUiiWEA
43
+ CYBp9q/mGkAD6CGAxqABhrk9Oeecc8455yRbtuWcc5RztuUs27LPL1RVVzca
44
+ ieTf3ZN6dz7J7sr16uX36hc27PbG642NzY3J/ciC387q5ZpxXL6ow6uhOcBX
45
+ 8FvfHl7zby1nOpxsvM7FNjdGZtcedjde/8LGaGzd2M7U5SJD6w5KbPQmk5H7
46
+ emfHHNnbN7bZtpztljPYGVq3bsey2t/r2wN78lXq56AZ66v4xi9ubkxHbXNi
47
+ td9PbOo3Ho0ltqKprWiiEUu8TsVfx2KvovFoVI7ivTsZ0wA2cjF4B3XNjdc/
48
+ EDOyR/3Rx3zJ7nZbd58+OoOP1s3Iap0PHGdDzRWnaVQa5SMcdMhcO2NngNOj
49
+ BnvV89tm3jwvT6ofPpW695P7YftmUq22tQZx8by23lrm0OhPW8aR6bq26Xpt
50
+ 49LAytze3uorMxo7Hbtv7USj8eGt3f9k3ybvnOsxVjOH3SksE1Tt4N+hC5Xc
51
+ SkQb0ejreOZ1KsELBWvqDNUMfjtfErUkLSjYdcb3ah5W/6bSuftg3pd7n+7M
52
+ 4eRu0p2Ux8PWqLrhX5hivlHeq9auNtSE6hNzMtWm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+TiYVkel3uS61XWat16DZ/Vy
103
+ zWurPvkNf8OoZw4tYy9/Vqoce22Hr/ho7HTsvoU7fX973f447d600hNcsZV2
104
+ OrkVzTXigDKygDgU1sCD9Nv5kgSXBADK6jrjezWPn1KUXq/kf8Pf8BrQ2M0Y
105
+ EAugk/bUGI2tAaBDozN1rT4UQ4z3szWzYwJCOjLwI2IyxF2ArcdtYzfhw+/1
106
+ Tmta39u92M9CTxKDYz9/1D+xSk8LOvoNf+V/+kf+zf/EX7+b2Ahi8fx4bN9g
107
+ B4g041lj6NxYA8DMBqxMjPC618VUdRGLGqaBtSZUteUMOzb9Bv/5y40+dQfL
108
+ 3Mch2sP21J2MARwNE8uMnaE5ndiAGYwX+Ur+JQ692LfGgMAnW7vWmCgIESsg
109
+ BE+BmGOpaH8au+8NUkkzsSZqjr1ORV8nEhI5Pglq9o1nYzFyDvTfWhk5j2mn
110
+ oEoHu1CwA78HQQdeqcKubf6Gv+qf+BvEb38DYuzfzg/kb+cH8rfzA2n+9B3I
111
+ H/7i/w94Gyai6ywAAA==
112
+ http_version:
113
+ recorded_at: Fri, 03 May 2013 11:52:11 GMT
114
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.viadeo.com/recommend?title=Get%20started%20with%20the%20Viadeo%20API&url=http://dev.viadeo.com
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Viadeo gem/0.0.1
12
+ Authorization:
13
+ - Bearer access_token_test_3e8c55877482b2
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded;charset=UTF-8
16
+ Content-Length:
17
+ - '0'
18
+ Accept:
19
+ - ! '*/*'
20
+ response:
21
+ status:
22
+ code: 401
23
+ message: Unauthorized
24
+ headers:
25
+ Server:
26
+ - Apache-Coyote/1.1
27
+ Uuid:
28
+ - c3a81eb0-ee32-47a9-a031-4cb424d3477d
29
+ Www-Authenticate:
30
+ - ! '"insufficient authentication"'
31
+ Content-Type:
32
+ - application/json;charset=UTF-8
33
+ Content-Length:
34
+ - '85'
35
+ Date:
36
+ - Fri, 03 May 2013 11:59:43 GMT
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ! '{"error":{"type":"permission denied","message":["Insufficient accreditation
40
+ level"]}}'
41
+ http_version:
42
+ recorded_at: Fri, 03 May 2013 11:59:44 GMT
43
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.viadeo.com/recommend?limit=5&url=http://dev.viadeo.com
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Viadeo gem/0.0.1
12
+ Authorization:
13
+ - Bearer access_token_test_3e8c55877482b2
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded;charset=UTF-8
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - ! '*/*'
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: !binary |-
24
+ T0s=
25
+ headers:
26
+ !binary "U2VydmVy":
27
+ - !binary |-
28
+ QXBhY2hlLUNveW90ZS8xLjE=
29
+ !binary "VXVpZA==":
30
+ - !binary |-
31
+ ZjYzMGVjYjAtYjRkZC00MmRjLTk0YmUtM2RhMjdiMjQ2MWMx
32
+ !binary "Q29udGVudC1UeXBl":
33
+ - !binary |-
34
+ YXBwbGljYXRpb24vanNvbjtjaGFyc2V0PVVURi04
35
+ !binary "Q29udGVudC1MZW5ndGg=":
36
+ - !binary |-
37
+ NDQ5
38
+ !binary "RGF0ZQ==":
39
+ - !binary |-
40
+ RnJpLCAwMyBNYXkgMjAxMyAxMTo1OTo0MCBHTVQ=
41
+ body:
42
+ encoding: ASCII-8BIT
43
+ string: !binary |-
44
+ eyJpZCI6IiIsInR5cGUiOiJSRUNPTU1FTkQgREVUQUlMUyIsIm5hbWUiOiIi
45
+ LCJsaW5rIjoiaHR0cDovL2Rldi52aWFkZW8uY29tIiwiY291bnQiOjEsInBh
46
+ Z2luZyI6eyJwcmV2aW91cyI6IiIsIm5leHQiOiIifSwic2hhcmVkIjpmYWxz
47
+ ZSwidGl0bGUiOiIiLCJvdmVydmlldyI6IiIsImRvbWFpbiI6ImRldi52aWFk
48
+ ZW8uY29tIiwidXBkYXRlZF90aW1lIjoiMjAxMy0wNS0wM1QxMzo1OTo0MSsw
49
+ MjAwIiwiY291bnRfc3RyaW5nIjoiMSIsImRhdGEiOlt7ImlkIjoic3JoenJp
50
+ cGF5RUVpY0llbWtwSW5FemZzSWMiLCJ0eXBlIjoiU0hBUkVSIiwibmFtZSI6
51
+ IlN0w6lwaGFuZSBMdW9uZyIsImxpbmsiOiJodHRwOi8vd3d3LnZpYWRlby5j
52
+ b20vcHJvZmlsZS8wMDIyOGIxYnFsbnh0anpuIiwibGFuZ3VhZ2UiOiJmciIs
53
+ InVwZGF0ZWRfdGltZSI6IjIwMTMtMDQtMjJUMTc6Mzg6MzMrMDIwMCJ9XX0=
54
+ http_version:
55
+ recorded_at: Fri, 03 May 2013 11:59:42 GMT
56
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.viadeo.com/language/list?limit=5
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Viadeo gem/0.0.1
12
+ Authorization:
13
+ - Bearer access_token_test_3e8c55877482b2
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded;charset=UTF-8
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - ! '*/*'
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Apache-Coyote/1.1
27
+ Uuid:
28
+ - 29aa5fa8-3a56-4e5e-9e99-54b828b8e01f
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Content-Length:
32
+ - '895'
33
+ Date:
34
+ - Fri, 03 May 2013 12:07:05 GMT
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"id":"","type":"LANGUAGES","name":"","link":"","count":188,"paging":{"previous":"","next":"https://api.viadeo.com/language/list?limit=5&page=2"},"updated_time":"2013-05-03T14:07:06+0200","count_string":"188","data":[{"id":"","type":"LANGUAGE","name":"Abkhaze","link":"","updated_time":"2013-05-03T14:07:06+0200","ISO_639":"ab","ISO_639-2_T":"abk"},{"id":"","type":"LANGUAGE","name":"Afar","link":"","updated_time":"2013-05-03T14:07:06+0200","ISO_639":"aa","ISO_639-2_T":"aar"},{"id":"","type":"LANGUAGE","name":"Afrikaans","link":"","updated_time":"2013-05-03T14:07:06+0200","ISO_639":"af","ISO_639-2_T":"afr"},{"id":"","type":"LANGUAGE","name":"Akan","link":"","updated_time":"2013-05-03T14:07:06+0200","ISO_639":"ak","ISO_639-2_T":"aka"},{"id":"","type":"LANGUAGE","name":"Albanais","link":"","updated_time":"2013-05-03T14:07:06+0200","ISO_639":"sq","ISO_639-2_T":"sqi","ISO_639-2_B":"alb"}]}'
38
+ http_version:
39
+ recorded_at: Fri, 03 May 2013 12:07:07 GMT
40
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,68 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.viadeo.com/search/users?limit=5&school=paris
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Viadeo gem/0.0.1
12
+ Authorization:
13
+ - Bearer access_token_test_3e8c55877482b2
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded;charset=UTF-8
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - ! '*/*'
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: !binary |-
24
+ T0s=
25
+ headers:
26
+ !binary "U2VydmVy":
27
+ - !binary |-
28
+ QXBhY2hlLUNveW90ZS8xLjE=
29
+ !binary "VXVpZA==":
30
+ - !binary |-
31
+ Y2Q0MzJiZjEtMGJiYi00ODU4LTgxOWItMTdkNjg0ZjE4MzY2
32
+ !binary "Q29udGVudC1UeXBl":
33
+ - !binary |-
34
+ YXBwbGljYXRpb24vanNvbjtjaGFyc2V0PVVURi04
35
+ !binary "RGF0ZQ==":
36
+ - !binary |-
37
+ RnJpLCAwMyBNYXkgMjAxMyAxMjoxNDoyMyBHTVQ=
38
+ !binary "Q29udGVudC1FbmNvZGluZw==":
39
+ - !binary |-
40
+ Z3ppcA==
41
+ !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
42
+ - !binary |-
43
+ Y2h1bmtlZA==
44
+ !binary "VmFyeQ==":
45
+ - !binary |-
46
+ QWNjZXB0LUVuY29kaW5n
47
+ body:
48
+ encoding: ASCII-8BIT
49
+ string: !binary |-
50
+ H4sIAAAAAAAE/6tWykxRslJS0lEqqSxIBbKCXR2DnD0U3PyDFEKDXYOCgTJ5
51
+ ibkgGSArJzMvG8jKKCkpsNLXLy8v1yvLTExJzddLzs/VL9MvTk0sSs7Qz03N
52
+ TUotKta3L07OyM/P8QNqty1ILMosVstJzEsvTUxPtU0rApqWnF+aV6JkZWgA
53
+ BDpKBYnpmXnpSlbVSgVFqWWZ+aXFEDvzUitKoHYWAy1NLMhEthRqZWkx0EL7
54
+ nMzczBJbUzWIvVA7C0D2GSnV6iiVFqQklqSmxJdkgv1jZGBorGtgqmtgHGJo
55
+ YgVERibaBkYGBjCXxReXFIFdpGQHdiJQHKg/UckqGhpoZaXF/qkV+XmJ6f6u
56
+ BeVlFXnFYWE55bmp2f5K8OAEhSHIE5AgdM3NTcwrTc1RcHf0dXIMClFwcVXw
57
+ 8XT383QNcgWFNN7wLSjKT8vMSdU3MDAqKy0qyqi0yMssTkoHaYMGK1ArOGCx
58
+ etRY18g0xNDIysjSythI2wDoJWCYQH1SWFSV6OqZl1tQUZAWVlZZUZDj4l9S
59
+ nJldmq2EwyeORXmJpSkKzo5Orj4+jn4gRxDpdiPTirKyQtMK47zEckOQPmIc
60
+ b6JrZB5iYGxlBEKQWII73jPVvyzbM7WiKKkyq8y1rKiioqw4NT2lKtFRiUA0
61
+ 5KQq+KTmJWbmgZxBpPMN07OrLA2MTCpLqoyNQPqIDHvLEANLKxMjK2MztLAP
62
+ SynzzEpMDSvLKkrJLCkrrUwrTq5MqkzKxZmKnFLz8jNLFLxTixLLUpNBbiDW
63
+ 7UBXl5capFtWFlhkgPQRdLuRLggB3W5gZWxhZWyJ5vaCrPLUsoIKz5LK3IJM
64
+ l6qkgoqS8sIKx6yKfCUcbg/KzwXmymQFJz2Q/cS62ywxozyzzKKgJC25DKSP
65
+ mDAHutssxNDQytTUysQQ6G4DA6Xa2FoApSCFmfAEAAA=
66
+ http_version:
67
+ recorded_at: Fri, 03 May 2013 12:14:24 GMT
68
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,44 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.viadeo.com/status?message=Viadeo%20API
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Viadeo gem/0.0.1
12
+ Authorization:
13
+ - Bearer access_token_test_3e8c55877482b2
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded;charset=UTF-8
16
+ Content-Length:
17
+ - '0'
18
+ Accept:
19
+ - ! '*/*'
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ Server:
26
+ - Apache-Coyote/1.1
27
+ Uuid:
28
+ - 40342395-b6d1-4182-9c37-39a73e5eab52
29
+ Createdgraphid:
30
+ - me/newsfeed
31
+ Location:
32
+ - https://api.viadeo.com/me/newsfeed
33
+ Content-Type:
34
+ - application/json;charset=UTF-8
35
+ Content-Length:
36
+ - '49'
37
+ Date:
38
+ - Fri, 03 May 2013 12:18:04 GMT
39
+ body:
40
+ encoding: US-ASCII
41
+ string: ! '{"created":true,"created_graph_id":"me/newsfeed"}'
42
+ http_version:
43
+ recorded_at: Fri, 03 May 2013 12:18:05 GMT
44
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.viadeo.com/azerty
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Viadeo gem/0.0.1
12
+ Authorization:
13
+ - Bearer access_token_test_3e8c55877482b2
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded;charset=UTF-8
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - ! '*/*'
20
+ response:
21
+ status:
22
+ code: 404
23
+ message: Not Found
24
+ headers:
25
+ Server:
26
+ - Apache-Coyote/1.1
27
+ Uuid:
28
+ - a0f66453-d66f-47a4-a576-a286608ddcb7
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Content-Length:
32
+ - '106'
33
+ Date:
34
+ - Fri, 03 May 2013 11:05:12 GMT
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"error":{"type":"url not found, id error or unsupported method","message":["Not
38
+ Found/Not Implemented"]}}'
39
+ http_version:
40
+ recorded_at: Fri, 03 May 2013 11:05:13 GMT
41
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.viadeo.com/me
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Viadeo gem/0.0.1
12
+ Authorization:
13
+ - Bearer access_token_test_3e8c55877482b2
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded;charset=UTF-8
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - ! '*/*'
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Apache-Coyote/1.1
27
+ Uuid:
28
+ - 8ee1b9ae-b75e-467c-acd4-ca2cc9027e1d
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Content-Length:
32
+ - '1021'
33
+ Date:
34
+ - Fri, 03 May 2013 11:05:14 GMT
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"id":"obumgDrDseyOzclAhhmxlnetzc","type":"USER","name":"Neceha Bgl","link":"http://www.viadeo.com/profile/0021igiwa56ywlp9","language":"fr","gender":"","nickname":"neceha.bgl","introduction":"","interests":"---","location":{"city":"Montmorency","address":"","zipcode":"","country":"France","area":"","county":{"name":"","type":"COUNTY"},"timezone":"","latitude":"","longitude":"","country_code":"fr"},"distance":0,"updated_time":"2013-05-03T13:04:34+0200","contact_count":0,"first_name":"Neceha","last_name":"Bgl","has_picture":false,"picture_small":"http://static9.viadeo-static.com/servlet/photo?memberId=0129038bhu8xks8&height=35&width=26&ts=1367570046000","picture_medium":"http://static9.viadeo-static.com/servlet/photo?memberId=0129038bhu8xks8&height=60&width=45&ts=1367570046000","picture_large":"http://static9.viadeo-static.com/servlet/photo?memberId=0129038bhu8xks8&height=185&width=140&ts=1367570046000","picture_modification_date":"2013-05-03T10:34:06+0200","headline":"Freelance,
38
+ neceha","is_premium":false}'
39
+ http_version:
40
+ recorded_at: Fri, 03 May 2013 11:05:15 GMT
41
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.viadeo.com/me/contacts?is_premium=true
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Viadeo gem/0.0.1
12
+ Authorization:
13
+ - Bearer access_token_test_3e8c55877482b2
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded;charset=UTF-8
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - ! '*/*'
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Apache-Coyote/1.1
27
+ Uuid:
28
+ - adc9fe02-7af3-4d84-ac54-cbb0d5f8ca77
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Content-Length:
32
+ - '261'
33
+ Date:
34
+ - Fri, 03 May 2013 11:05:16 GMT
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"id":"","type":"USER CONTACTS","name":"Neceha Bgl","link":"http://www.viadeo.com/profile/0021igiwa56ywlp9/fr/?readOnly=true&currentab=contacts","count":0,"paging":{"previous":"","next":""},"updated_time":"2013-05-03T13:05:17+0200","count_string":"0","data":[]}'
38
+ http_version:
39
+ recorded_at: Fri, 03 May 2013 11:05:17 GMT
40
+ recorded_with: VCR 2.4.0