gcal_mapper 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/.gitignore +32 -0
  2. data/.travis.yml +16 -0
  3. data/CHANGELOG.md +15 -0
  4. data/Gemfile +20 -0
  5. data/Guardfile +19 -0
  6. data/LICENSE +22 -0
  7. data/README.md +370 -0
  8. data/Rakefile +32 -0
  9. data/bin/ci/file/auth.yaml +7 -0
  10. data/bin/ci/file/bad_yaml.yaml +0 -0
  11. data/bin/ci/file/config.yaml +8 -0
  12. data/bin/ci/file/privatekey.p12 +0 -0
  13. data/bin/ci/travis_build.sh +4 -0
  14. data/bin/ci/vcr/GcalMapper_Authentification/access_token_should_exist_with_assertion_auth.yml +49 -0
  15. data/bin/ci/vcr/GcalMapper_Authentification/should_be_fasle_if_bad_client_email_is_given.yml +47 -0
  16. data/bin/ci/vcr/GcalMapper_Authentification_Assertion/should_have_access_token_attribute.yml +49 -0
  17. data/bin/ci/vcr/GcalMapper_Authentification_Assertion/should_have_refresh_token_attribute.yml +49 -0
  18. data/bin/ci/vcr/GcalMapper_Calendar/should_get_the_calendar_list.yml +190 -0
  19. data/bin/ci/vcr/GcalMapper_Calendar/should_get_the_events_list.yml +45 -0
  20. data/bin/ci/vcr/GcalMapper_Calendar/should_raise_error_if_the_calendar_id_isn_t_accessible.yml +56 -0
  21. data/bin/ci/vcr/GcalMapper_Calendar/should_raise_error_if_the_token_is_bad.yml +60 -0
  22. data/bin/ci/vcr/GcalMapper_Mapper/should_save_all_events.yml +232 -0
  23. data/bin/ci/vcr/GcalMapper_Mapper/should_save_events_only_once.yml +232 -0
  24. data/bin/gcal-mapper +108 -0
  25. data/gcal_mapper.gemspec +25 -0
  26. data/lib/gcal_mapper.rb +15 -0
  27. data/lib/gcal_mapper/authentification.rb +57 -0
  28. data/lib/gcal_mapper/authentification/assertion.rb +110 -0
  29. data/lib/gcal_mapper/authentification/base.rb +20 -0
  30. data/lib/gcal_mapper/authentification/oauth2.rb +68 -0
  31. data/lib/gcal_mapper/calendar.rb +51 -0
  32. data/lib/gcal_mapper/configuration.rb +23 -0
  33. data/lib/gcal_mapper/errors.rb +40 -0
  34. data/lib/gcal_mapper/mapper.rb +76 -0
  35. data/lib/gcal_mapper/mapper/active_record.rb +74 -0
  36. data/lib/gcal_mapper/mapper/dsl.rb +57 -0
  37. data/lib/gcal_mapper/mapper/simple.rb +97 -0
  38. data/lib/gcal_mapper/railtie.rb +8 -0
  39. data/lib/gcal_mapper/rest_request.rb +73 -0
  40. data/lib/gcal_mapper/sync.rb +159 -0
  41. data/lib/gcal_mapper/version.rb +4 -0
  42. data/spec/authentification/assertion_spec.rb +15 -0
  43. data/spec/authentification/base_spec.rb +18 -0
  44. data/spec/authentification/oauth2_spec.rb +15 -0
  45. data/spec/authentification_spec.rb +34 -0
  46. data/spec/calendar_spec.rb +33 -0
  47. data/spec/gcal_mapper_spec.rb +5 -0
  48. data/spec/mapper/active_record_spec.rb +46 -0
  49. data/spec/mapper/dsl_spec.rb +31 -0
  50. data/spec/mapper/simple_spec.rb +48 -0
  51. data/spec/mapper_spec.rb +32 -0
  52. data/spec/rest_request_spec.rb +5 -0
  53. data/spec/spec_helper.rb +51 -0
  54. data/spec/support/models/event.rb +25 -0
  55. data/spec/support/models/event_jeu.rb +22 -0
  56. data/spec/support/schema.rb +28 -0
  57. data/spec/sync_spec.rb +28 -0
  58. metadata +200 -0
data/Rakefile ADDED
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env rake
2
+ require 'bundler/gem_tasks'
3
+ require 'yard'
4
+ require 'rspec/core/rake_task'
5
+
6
+
7
+ desc 'Default: run specs.'
8
+ task :default => :spec
9
+
10
+ desc 'run rspec tests'
11
+ RSpec::Core::RakeTask.new(:spec)
12
+
13
+ desc 'Generate Yard doc'
14
+ YARD::Rake::YardocTask.new do |t|
15
+ t.files = ['lib/**/*.rb']
16
+ t.options = [
17
+ '--title', 'gcalMapper',
18
+ '--markup', 'markdown',
19
+ '--charset', 'UTF-8',
20
+ '--file', 'LICENSE',
21
+ '--protected',
22
+ '--private'
23
+ ]
24
+ end
25
+
26
+ if RUBY_VERSION =~ /^1\.9/
27
+ desc "Code coverage detail"
28
+ task :simplecov do
29
+ ENV['COVERAGE'] = "true"
30
+ Rake::Task['spec'].execute
31
+ end
32
+ end
@@ -0,0 +1,7 @@
1
+ ---
2
+ mechanism: oauth_2
3
+ scope: https://www.googleapis.com/auth/calendar
4
+ client_id: 01942.apps.googleusercontent.com
5
+ client_secret: AR8sbYKy
6
+ access_token: ya29.AHES6ZRJ
7
+ refresh_token: 1/mnxo
File without changes
@@ -0,0 +1,8 @@
1
+ ---
2
+ p12: 'spec/file/privatekey.p12'
3
+ client_email: '877@developer.gserviceaccount.com'
4
+ user_email: 'web@jliquid.ch'
5
+ yaml: 'spec/file/auth.yaml'
6
+ yaml_relative: 'spec/file/auth.yaml'
7
+ bad_yaml: 'spec/file/bad_yaml.yaml'
8
+ calendar_id: 'neville.dubuis@liquid-concept.ch'
Binary file
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ cp -r bin/ci/file/ spec/file/
4
+ cp -r bin/ci/vcr/ spec/vcr/
@@ -0,0 +1,49 @@
1
+ ---
2
+ recorded_with: VCR 2.2.0
3
+ http_interactions:
4
+ - request:
5
+ method: post
6
+ uri: https://accounts.google.com/o/oauth2/token
7
+ body:
8
+ string: grant_type=assertion&assertion_type=http%3a%2f%2foauth.net%2fgrant_type%2fjwt%2f1.0%2fbearer&assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9%0a.eyJwcm4iOm51bGwsImlhdCI6MTMzOTA2NTAyOCwic2NvcGUiOiJodHRwczov%0aL3d3dy5nb29nbGUuY29tL2NhbGVuZGFyL2ZlZWRzLyIsImlzcyI6Ijg3NzQ2%0aNjQwODg2N0BkZXZlbG9wZXIuZ3NlcnZpY2VhY2NvdW50LmNvbSIsImF1ZCI6%0aImh0dHBzOi8vYWNjb3VudHMuZ29vZ2xlLmNvbS9vL29hdXRoMi90b2tlbiIs%0aImV4cCI6MTMzOTA2ODYyOH0%3d%0a.pq14GWdtkWCYFgbxrJUUHfQ5H_ToDJx7Dj6vUpk5CzA9dKFEINyaL3A9eR6c%0aEBhIDy4ldqT73TNRpXqdyYsrHjbVcXEmJnjmwSCMImL1W9kXn1FM-jBtaR1G%0a2_PaeeEyUUh1KtSeD0Slq6Ik8pEYt-QyDHXnjBIcXjIeK9GR2-E%3d%0a
9
+ headers:
10
+ content-type:
11
+ - application/x-www-form-urlencoded
12
+ connection:
13
+ - close
14
+ accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ x-xss-protection:
22
+ - 1; mode=block
23
+ date:
24
+ - Thu, 07 Jun 2012 10:30:28 GMT
25
+ cache-control:
26
+ - no-cache, no-store, max-age=0, must-revalidate
27
+ x-content-type-options:
28
+ - nosniff
29
+ server:
30
+ - GSE
31
+ pragma:
32
+ - no-cache
33
+ expires:
34
+ - Fri, 01 Jan 1990 00:00:00 GMT
35
+ content-type:
36
+ - application/json
37
+ x-frame-options:
38
+ - SAMEORIGIN
39
+ connection:
40
+ - close
41
+ body:
42
+ string: |-
43
+ {
44
+ "access_token" : "1/1q-jh9ekFWrMBHzGhHnHyMpw5W3Z1AfqUeKXqQeuDy8",
45
+ "token_type" : "Bearer",
46
+ "expires_in" : 3600
47
+ }
48
+ http_version: "1.1"
49
+ recorded_at: Thu, 07 Jun 2012 10:30:29 GMT
@@ -0,0 +1,47 @@
1
+ ---
2
+ recorded_with: VCR 2.2.0
3
+ http_interactions:
4
+ - request:
5
+ method: post
6
+ uri: https://accounts.google.com/o/oauth2/token
7
+ body:
8
+ string: grant_type=assertion&assertion_type=http%3a%2f%2foauth.net%2fgrant_type%2fjwt%2f1.0%2fbearer&assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9%0a.eyJwcm4iOm51bGwsImlhdCI6MTMzOTA2NTAyOSwic2NvcGUiOiJodHRwczov%0aL3d3dy5nb29nbGUuY29tL2NhbGVuZGFyL2ZlZWRzLyIsImlzcyI6InRlc3RA%0aZHRlc3QuY29tIiwiYXVkIjoiaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29t%0aL28vb2F1dGgyL3Rva2VuIiwiZXhwIjoxMzM5MDY4NjI5fQ%3d%3d%0a.ectK3yqL7SKDStzXblQinDUg0gbpHdXwaFGiZgU57jmZM89uMPSCHbVZFLkc%0aSkAFhmsUlyKiTmoEYM1u6w-4XebDYBVaOK1tyjBGupr0oGlEgD3-izSYTJ2b%0ahMUTFj1iVC21S_Y5Bj19H4u-xZnRK-SLF4itGjx3W-yS9uNRNQ4%3d%0a
9
+ headers:
10
+ content-type:
11
+ - application/x-www-form-urlencoded
12
+ connection:
13
+ - close
14
+ accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 400
19
+ message: Bad Request
20
+ headers:
21
+ x-xss-protection:
22
+ - 1; mode=block
23
+ date:
24
+ - Thu, 07 Jun 2012 10:30:29 GMT
25
+ cache-control:
26
+ - no-cache, no-store, max-age=0, must-revalidate
27
+ x-content-type-options:
28
+ - nosniff
29
+ server:
30
+ - GSE
31
+ pragma:
32
+ - no-cache
33
+ expires:
34
+ - Fri, 01 Jan 1990 00:00:00 GMT
35
+ content-type:
36
+ - application/json
37
+ x-frame-options:
38
+ - SAMEORIGIN
39
+ connection:
40
+ - close
41
+ body:
42
+ string: |-
43
+ {
44
+ "error" : "invalid_grant"
45
+ }
46
+ http_version: "1.1"
47
+ recorded_at: Thu, 07 Jun 2012 10:30:30 GMT
@@ -0,0 +1,49 @@
1
+ ---
2
+ recorded_with: VCR 2.2.0
3
+ http_interactions:
4
+ - request:
5
+ method: post
6
+ uri: https://accounts.google.com/o/oauth2/token
7
+ body:
8
+ string: grant_type=assertion&assertion_type=http%3a%2f%2foauth.net%2fgrant_type%2fjwt%2f1.0%2fbearer&assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9%0a.eyJwcm4iOiJ3ZWJtYXN0ZXJAamV1bmVzc2Utc3VjaHkuY2giLCJpYXQiOjEz%0aMzkwNjUwNDAsInNjb3BlIjoiaHR0cHM6Ly93d3cuZ29vZ2xlLmNvbS9jYWxl%0abmRhci9mZWVkcy8iLCJpc3MiOiI4Nzc0NjY0MDg4NjdAZGV2ZWxvcGVyLmdz%0aZXJ2aWNlYWNjb3VudC5jb20iLCJhdWQiOiJodHRwczovL2FjY291bnRzLmdv%0ab2dsZS5jb20vby9vYXV0aDIvdG9rZW4iLCJleHAiOjEzMzkwNjg2NDB9%0a.SeprHEO2_AEUMRvPwhUQugsQe7sW0Q167-7MZ9drK8Su7H87k1v9qxHuf2r2%0a5gqEWlrsr_rlyWkhRnlI1z_UDKzz9HtMJHcSGWWKwHN5-owOT-ASIv7iySlz%0aCS5KJo7N5MJlXdLdhP4HbgZoqyvGAk93BxS5p-_VsW7vv29x148%3d%0a
9
+ headers:
10
+ content-type:
11
+ - application/x-www-form-urlencoded
12
+ connection:
13
+ - close
14
+ accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ x-xss-protection:
22
+ - 1; mode=block
23
+ date:
24
+ - Thu, 07 Jun 2012 10:30:40 GMT
25
+ cache-control:
26
+ - no-cache, no-store, max-age=0, must-revalidate
27
+ x-content-type-options:
28
+ - nosniff
29
+ server:
30
+ - GSE
31
+ pragma:
32
+ - no-cache
33
+ expires:
34
+ - Fri, 01 Jan 1990 00:00:00 GMT
35
+ content-type:
36
+ - application/json
37
+ x-frame-options:
38
+ - SAMEORIGIN
39
+ connection:
40
+ - close
41
+ body:
42
+ string: |-
43
+ {
44
+ "access_token" : "1/5SLb0_FFavQtyJPT1fD12Ptx6RjOtnDCSyEIOqg2EGM",
45
+ "token_type" : "Bearer",
46
+ "expires_in" : 3600
47
+ }
48
+ http_version: "1.1"
49
+ recorded_at: Thu, 07 Jun 2012 10:30:41 GMT
@@ -0,0 +1,49 @@
1
+ ---
2
+ recorded_with: VCR 2.2.0
3
+ http_interactions:
4
+ - request:
5
+ method: post
6
+ uri: https://accounts.google.com/o/oauth2/token
7
+ body:
8
+ string: grant_type=assertion&assertion_type=http%3a%2f%2foauth.net%2fgrant_type%2fjwt%2f1.0%2fbearer&assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9%0a.eyJwcm4iOiJ3ZWJtYXN0ZXJAamV1bmVzc2Utc3VjaHkuY2giLCJpYXQiOjEz%0aMzkwNjUwNDEsInNjb3BlIjoiaHR0cHM6Ly93d3cuZ29vZ2xlLmNvbS9jYWxl%0abmRhci9mZWVkcy8iLCJpc3MiOiI4Nzc0NjY0MDg4NjdAZGV2ZWxvcGVyLmdz%0aZXJ2aWNlYWNjb3VudC5jb20iLCJhdWQiOiJodHRwczovL2FjY291bnRzLmdv%0ab2dsZS5jb20vby9vYXV0aDIvdG9rZW4iLCJleHAiOjEzMzkwNjg2NDF9%0a.gpIbu6H54XLdgFpwEuLDYgzO417qDt5qdLF_OgLnueiU9lMdECICXuWNKSSV%0aOLo1kzezubTK-HMi8XnEhfzzkKEx2Km4l0tKzvABZi7LGfYMqUgdSh09QHSt%0anmOVaGQgtbKb_q-3uoXsgZ-nFUdEDURLC390RQDo7mTaWZemong%3d%0a
9
+ headers:
10
+ content-type:
11
+ - application/x-www-form-urlencoded
12
+ connection:
13
+ - close
14
+ accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ x-xss-protection:
22
+ - 1; mode=block
23
+ date:
24
+ - Thu, 07 Jun 2012 10:30:42 GMT
25
+ cache-control:
26
+ - no-cache, no-store, max-age=0, must-revalidate
27
+ x-content-type-options:
28
+ - nosniff
29
+ server:
30
+ - GSE
31
+ pragma:
32
+ - no-cache
33
+ expires:
34
+ - Fri, 01 Jan 1990 00:00:00 GMT
35
+ content-type:
36
+ - application/json
37
+ x-frame-options:
38
+ - SAMEORIGIN
39
+ connection:
40
+ - close
41
+ body:
42
+ string: |-
43
+ {
44
+ "access_token" : "1/fbxqgzW3yGECgnvT8C2o0qIHOejk1CY1kwwuybqKCWU",
45
+ "token_type" : "Bearer",
46
+ "expires_in" : 3600
47
+ }
48
+ http_version: "1.1"
49
+ recorded_at: Thu, 07 Jun 2012 10:30:43 GMT
@@ -0,0 +1,190 @@
1
+ ---
2
+ recorded_with: VCR 2.2.0
3
+ http_interactions:
4
+ - request:
5
+ method: get
6
+ uri: https://www.googleapis.com/calendar/v3/users/me/calendarList
7
+ body:
8
+ string: ""
9
+ headers:
10
+ authorization:
11
+ - Bearer ya29.AHES6ZRJREYirgT3P9mBAl7z4o60_30QWomq4V2qnbS26g
12
+ connection:
13
+ - close
14
+ accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 401
19
+ message: Unauthorized
20
+ headers:
21
+ x-xss-protection:
22
+ - 1; mode=block
23
+ date:
24
+ - Thu, 07 Jun 2012 10:30:30 GMT
25
+ cache-control:
26
+ - private, max-age=0
27
+ x-content-type-options:
28
+ - nosniff
29
+ server:
30
+ - GSE
31
+ expires:
32
+ - Thu, 07 Jun 2012 10:30:30 GMT
33
+ content-type:
34
+ - application/json; charset=UTF-8
35
+ www-authenticate:
36
+ - AuthSub realm="https://www.google.com/accounts/AuthSubRequest" allowed-scopes="https://www.googleapis.com/auth/calendar.readonly,https://www.googleapis.com/auth/calendar"
37
+ x-frame-options:
38
+ - SAMEORIGIN
39
+ connection:
40
+ - close
41
+ body:
42
+ string: |
43
+ {
44
+ "error": {
45
+ "errors": [
46
+ {
47
+ "domain": "global",
48
+ "reason": "authError",
49
+ "message": "Invalid Credentials",
50
+ "locationType": "header",
51
+ "location": "Authorization"
52
+ }
53
+ ],
54
+ "code": 401,
55
+ "message": "Invalid Credentials"
56
+ }
57
+ }
58
+
59
+ http_version: "1.1"
60
+ recorded_at: Thu, 07 Jun 2012 10:30:31 GMT
61
+ - request:
62
+ method: post
63
+ uri: https://accounts.google.com/o/oauth2/token
64
+ body:
65
+ string: grant_type=refresh_token&client_secret=AR8sbYKyLEFfLzmc7JNlvNzc&refresh_token=1%2fmnxovneO3SSKB_iYvP_7xDjWMyuydM332vq81NdR6gw&client_id=491507701942.apps.googleusercontent.com
66
+ headers:
67
+ content-type:
68
+ - application/x-www-form-urlencoded
69
+ connection:
70
+ - close
71
+ accept:
72
+ - "*/*"
73
+ response:
74
+ status:
75
+ code: 200
76
+ message: OK
77
+ headers:
78
+ x-xss-protection:
79
+ - 1; mode=block
80
+ date:
81
+ - Thu, 07 Jun 2012 10:30:31 GMT
82
+ cache-control:
83
+ - no-cache, no-store, max-age=0, must-revalidate
84
+ x-content-type-options:
85
+ - nosniff
86
+ server:
87
+ - GSE
88
+ pragma:
89
+ - no-cache
90
+ expires:
91
+ - Fri, 01 Jan 1990 00:00:00 GMT
92
+ content-type:
93
+ - application/json
94
+ x-frame-options:
95
+ - SAMEORIGIN
96
+ connection:
97
+ - close
98
+ body:
99
+ string: |-
100
+ {
101
+ "access_token" : "ya29.AHES6ZRjYuDPouzp8FaJ4THdK3txQgHM9Eu3A75X7-NRpXQ",
102
+ "token_type" : "Bearer",
103
+ "expires_in" : 3600
104
+ }
105
+ http_version: "1.1"
106
+ recorded_at: Thu, 07 Jun 2012 10:30:31 GMT
107
+ - request:
108
+ method: get
109
+ uri: https://www.googleapis.com/calendar/v3/users/me/calendarList
110
+ body:
111
+ string: ""
112
+ headers:
113
+ authorization:
114
+ - Bearer ya29.AHES6ZRjYuDPouzp8FaJ4THdK3txQgHM9Eu3A75X7-NRpXQ
115
+ connection:
116
+ - close
117
+ accept:
118
+ - "*/*"
119
+ response:
120
+ status:
121
+ code: 200
122
+ message: OK
123
+ headers:
124
+ x-xss-protection:
125
+ - 1; mode=block
126
+ date:
127
+ - Thu, 07 Jun 2012 10:30:31 GMT
128
+ cache-control:
129
+ - private, max-age=0, must-revalidate, no-transform
130
+ x-content-type-options:
131
+ - nosniff
132
+ server:
133
+ - GSE
134
+ expires:
135
+ - Thu, 07 Jun 2012 10:30:31 GMT
136
+ content-type:
137
+ - application/json; charset=UTF-8
138
+ etag:
139
+ - "\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/uevXOyRggoQ0PtbYlcY3Q9KZ7jg\""
140
+ x-frame-options:
141
+ - SAMEORIGIN
142
+ connection:
143
+ - close
144
+ body:
145
+ string: "{\n \"kind\": \"calendar#calendarList\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/Vui3VFy5X0OBP9SM1srHlq8RYRI\\\"\",\n \"items\": [\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/5F2s5uWXNAZg8_Ro8aFe3V2mVYY\\\"\",\n \"id\": \"#contacts@group.v.calendar.google.com\",\n \"summary\": \"Anniversaires et \xC3\xA9v\xC3\xA9nements des contacts\",\n \"description\": \"Anniversaires et dates \xC3\xA0 c\xC3\xA9l\xC3\xA9brer de vos contacts\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"12\",\n \"selected\": true,\n \"accessRole\": \"reader\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/dYyB0d6GKweN-f8dtnp5GZAZTTc\\\"\",\n \"id\": \"e_2_de#weeknum@group.v.calendar.google.com\",\n \"summary\": \"Wochennummern\",\n \"description\": \"Wochennummern w\xC3\xB6chentlich anzeigen\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"2\",\n \"accessRole\": \"reader\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/ttDAtuWGksj1zmsehOrlzn5g_V0\\\"\",\n \"id\": \"julien.henzelin@liquid-concept.ch\",\n \"summary\": \"Julien Henzelin (liquid)\",\n \"location\": \"Lausanne, Suisse\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"8\",\n \"selected\": true,\n \"accessRole\": \"writer\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/M3bYdJXP_dvzyw6xQWrYN7Ts4Tw\\\"\",\n \"id\": \"yann.lugrin@liquid-concept.ch\",\n \"summary\": \"Yann Lugrin (liquid)\",\n \"location\": \"Lausanne, Suisse\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"1\",\n \"selected\": true,\n \"accessRole\": \"writer\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/UfcCVwtx4l35evDo5P179Qmy_j8\\\"\",\n \"id\": \"nicolas.couturier@liquid-concept.ch\",\n \"summary\": \"nicolas.couturier@liquid-concept.ch\",\n \"location\": \"Lausanne, Suisse\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"24\",\n \"selected\": true,\n \"accessRole\": \"writer\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/XXHLIs-RFEsn4eS6M4kKPwE7YVs\\\"\",\n \"id\": \"ndubuis@gmail.com\",\n \"summary\": \"Neville Dubuis\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"9\",\n \"selected\": true,\n \"accessRole\": \"freeBusyReader\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/C4WBMyYkajFTDeyIPpMy6lsXTzE\\\"\",\n \"id\": \"liquid-concept.ch_faut85h1u3h2u983d4eho2ropk@group.calendar.google.com\",\n \"summary\": \"test\",\n \"description\": \"test agenda for gcalMapper\",\n \"location\": \"Lausanne, Suisse\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"3\",\n \"selected\": true,\n \"accessRole\": \"owner\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/qGxt9c8MSKccD6wlReZ9Om5l1cQ\\\"\",\n \"id\": \"neville.dubuis@liquid-concept.ch\",\n \"summary\": \"neville.dubuis@liquid-concept.ch\",\n \"location\": \"Lausanne, Suisse\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"15\",\n \"selected\": true,\n \"accessRole\": \"owner\",\n \"defaultReminders\": [\n {\n \"method\": \"email\",\n \"minutes\": 10\n },\n {\n \"method\": \"popup\",\n \"minutes\": 10\n }\n ]\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/cfrLMgn6JhXejyGtT73AycljbHc\\\"\",\n \"id\": \"yann.lugrin@sans-savoir.net\",\n \"summary\": \"Yann Lugrin (priv\xC3\xA9)\",\n \"description\": \"Calendrier personnel de Yann Lugrin\",\n \"location\": \"Lausanne, Suisse\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"2\",\n \"selected\": true,\n \"accessRole\": \"freeBusyReader\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/rqSu1woYlqsfuytre4pjRhmA9aw\\\"\",\n \"id\": \"julienhenzelin@gmail.com\",\n \"summary\": \"Julien Henzelin - Priv\xC3\xA9\",\n \"timeZone\": \"Europe/Rome\",\n \"colorId\": \"18\",\n \"selected\": true,\n \"accessRole\": \"freeBusyReader\"\n }\n ]\n\
146
+ }\n"
147
+ http_version: "1.1"
148
+ recorded_at: Thu, 07 Jun 2012 10:30:31 GMT
149
+ - request:
150
+ method: get
151
+ uri: https://www.googleapis.com/calendar/v3/users/me/calendarList
152
+ body:
153
+ string: ""
154
+ headers:
155
+ authorization:
156
+ - Bearer ya29.AHES6ZRjYuDPouzp8FaJ4THdK3txQgHM9Eu3A75X7-NRpXQ
157
+ connection:
158
+ - close
159
+ accept:
160
+ - "*/*"
161
+ response:
162
+ status:
163
+ code: 200
164
+ message: OK
165
+ headers:
166
+ x-xss-protection:
167
+ - 1; mode=block
168
+ date:
169
+ - Thu, 07 Jun 2012 10:30:32 GMT
170
+ cache-control:
171
+ - private, max-age=0, must-revalidate, no-transform
172
+ x-content-type-options:
173
+ - nosniff
174
+ server:
175
+ - GSE
176
+ expires:
177
+ - Thu, 07 Jun 2012 10:30:32 GMT
178
+ content-type:
179
+ - application/json; charset=UTF-8
180
+ etag:
181
+ - "\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/uevXOyRggoQ0PtbYlcY3Q9KZ7jg\""
182
+ x-frame-options:
183
+ - SAMEORIGIN
184
+ connection:
185
+ - close
186
+ body:
187
+ string: "{\n \"kind\": \"calendar#calendarList\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/Vui3VFy5X0OBP9SM1srHlq8RYRI\\\"\",\n \"items\": [\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/5F2s5uWXNAZg8_Ro8aFe3V2mVYY\\\"\",\n \"id\": \"#contacts@group.v.calendar.google.com\",\n \"summary\": \"Anniversaires et \xC3\xA9v\xC3\xA9nements des contacts\",\n \"description\": \"Anniversaires et dates \xC3\xA0 c\xC3\xA9l\xC3\xA9brer de vos contacts\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"12\",\n \"selected\": true,\n \"accessRole\": \"reader\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/dYyB0d6GKweN-f8dtnp5GZAZTTc\\\"\",\n \"id\": \"e_2_de#weeknum@group.v.calendar.google.com\",\n \"summary\": \"Wochennummern\",\n \"description\": \"Wochennummern w\xC3\xB6chentlich anzeigen\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"2\",\n \"accessRole\": \"reader\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/ttDAtuWGksj1zmsehOrlzn5g_V0\\\"\",\n \"id\": \"julien.henzelin@liquid-concept.ch\",\n \"summary\": \"Julien Henzelin (liquid)\",\n \"location\": \"Lausanne, Suisse\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"8\",\n \"selected\": true,\n \"accessRole\": \"writer\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/M3bYdJXP_dvzyw6xQWrYN7Ts4Tw\\\"\",\n \"id\": \"yann.lugrin@liquid-concept.ch\",\n \"summary\": \"Yann Lugrin (liquid)\",\n \"location\": \"Lausanne, Suisse\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"1\",\n \"selected\": true,\n \"accessRole\": \"writer\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/UfcCVwtx4l35evDo5P179Qmy_j8\\\"\",\n \"id\": \"nicolas.couturier@liquid-concept.ch\",\n \"summary\": \"nicolas.couturier@liquid-concept.ch\",\n \"location\": \"Lausanne, Suisse\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"24\",\n \"selected\": true,\n \"accessRole\": \"writer\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/XXHLIs-RFEsn4eS6M4kKPwE7YVs\\\"\",\n \"id\": \"ndubuis@gmail.com\",\n \"summary\": \"Neville Dubuis\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"9\",\n \"selected\": true,\n \"accessRole\": \"freeBusyReader\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/C4WBMyYkajFTDeyIPpMy6lsXTzE\\\"\",\n \"id\": \"liquid-concept.ch_faut85h1u3h2u983d4eho2ropk@group.calendar.google.com\",\n \"summary\": \"test\",\n \"description\": \"test agenda for gcalMapper\",\n \"location\": \"Lausanne, Suisse\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"3\",\n \"selected\": true,\n \"accessRole\": \"owner\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/qGxt9c8MSKccD6wlReZ9Om5l1cQ\\\"\",\n \"id\": \"neville.dubuis@liquid-concept.ch\",\n \"summary\": \"neville.dubuis@liquid-concept.ch\",\n \"location\": \"Lausanne, Suisse\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"15\",\n \"selected\": true,\n \"accessRole\": \"owner\",\n \"defaultReminders\": [\n {\n \"method\": \"email\",\n \"minutes\": 10\n },\n {\n \"method\": \"popup\",\n \"minutes\": 10\n }\n ]\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/cfrLMgn6JhXejyGtT73AycljbHc\\\"\",\n \"id\": \"yann.lugrin@sans-savoir.net\",\n \"summary\": \"Yann Lugrin (priv\xC3\xA9)\",\n \"description\": \"Calendrier personnel de Yann Lugrin\",\n \"location\": \"Lausanne, Suisse\",\n \"timeZone\": \"Europe/Zurich\",\n \"colorId\": \"2\",\n \"selected\": true,\n \"accessRole\": \"freeBusyReader\"\n },\n {\n \"kind\": \"calendar#calendarListEntry\",\n \"etag\": \"\\\"x7b7CM3NJJxjvBv5TnpeqYvh3eE/rqSu1woYlqsfuytre4pjRhmA9aw\\\"\",\n \"id\": \"julienhenzelin@gmail.com\",\n \"summary\": \"Julien Henzelin - Priv\xC3\xA9\",\n \"timeZone\": \"Europe/Rome\",\n \"colorId\": \"18\",\n \"selected\": true,\n \"accessRole\": \"freeBusyReader\"\n }\n ]\n\
188
+ }\n"
189
+ http_version: "1.1"
190
+ recorded_at: Thu, 07 Jun 2012 10:30:32 GMT