mxhero-api 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. data/VERSION +1 -1
  2. data/lib/communication.rb +35 -0
  3. data/lib/groups.rb +178 -0
  4. data/lib/mxhero-api.rb +288 -312
  5. data/lib/urls.rb +19 -0
  6. data/mxhero-api.gemspec +4 -4
  7. data/test/fixtures/api/account_properties.yml +12 -13
  8. data/test/fixtures/api/account_properties_not_found.yml +9 -9
  9. data/test/fixtures/api/accounts.yml +39 -0
  10. data/test/fixtures/api/accounts_filtered.yml +57 -42
  11. data/test/fixtures/api/accounts_from_domain.yml +10 -10
  12. data/test/fixtures/api/accounts_from_domain_paginated.yml +10 -10
  13. data/test/fixtures/api/accounts_without_group.yml +75 -0
  14. data/test/fixtures/api/add_an_inexistent_account_to_group.yml +39 -0
  15. data/test/fixtures/api/add_and_remove_account.yml +219 -0
  16. data/test/fixtures/api/all_groups.yml +39 -0
  17. data/test/fixtures/api/create_rule_for_domain.yml +95 -21
  18. data/test/fixtures/api/delete_group.yml +75 -0
  19. data/test/fixtures/api/delete_rule.yml +21 -61
  20. data/test/fixtures/api/domain_by_id.yml +10 -10
  21. data/test/fixtures/api/domain_by_id_not_found.yml +9 -9
  22. data/test/fixtures/api/domain_rule.yml +62 -76
  23. data/test/fixtures/api/domains.yml +10 -10
  24. data/test/fixtures/api/remove_account_from_group_twice.yml +150 -0
  25. data/test/fixtures/api/remove_inexistente_account_from_group.yml +39 -0
  26. data/test/fixtures/api/rules_for_domain.yml +11 -57
  27. data/test/fixtures/api/rules_for_domain_by_component.yml +6 -8
  28. data/test/fixtures/api/save_group.yml +119 -0
  29. data/test/fixtures/api/update_account_properties.yml +35 -33
  30. data/test/fixtures/api/update_rule.yml +35 -76
  31. data/test/helper.rb +1 -1
  32. data/test/test_groups.rb +104 -0
  33. data/test/test_mxhero_api.rb +49 -27
  34. metadata +26 -7
  35. data/test/fixtures/api/create_rule_alredy_exist.yml +0 -81
  36. data/test/fixtures/api/create_rule_success.yml +0 -41
data/lib/urls.rb ADDED
@@ -0,0 +1,19 @@
1
+ module MxHero
2
+ module API
3
+ module Urls
4
+
5
+ def service_url
6
+ @service_url
7
+ end
8
+
9
+ def domains_url
10
+ service_url + '/domains'
11
+ end
12
+
13
+ def domain_by_id_url(domain)
14
+ domains_url + "/#{domain}/"
15
+ end
16
+
17
+ end
18
+ end
19
+ end
data/mxhero-api.gemspec CHANGED
@@ -2,20 +2,20 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "mxhero-api"
5
- s.version = "0.1.11"
5
+ s.version = "0.1.12"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Maximiliano Dello Russo", "Juan Pablo Royo", "mxHero"]
9
- s.date = "2013-09-10"
9
+ s.date = "2013-09-18"
10
10
  s.description = "A gem to provide easy access to the API of MxHero platform (http://www.mxhero.com/)"
11
11
  s.email = ["maxidr@mxhero.com", "juanpablo.royo@gmail.com", "mxhero@mxhero.com"]
12
- s.files = [".gitignore", ".rvmrc", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "VERSION", "lib/mxhero-api.rb", "mxhero-api.gemspec", "test/fixtures/api/account_properties.yml", "test/fixtures/api/account_properties_not_found.yml", "test/fixtures/api/accounts_filtered.yml", "test/fixtures/api/accounts_from_domain.yml", "test/fixtures/api/accounts_from_domain_paginated.yml", "test/fixtures/api/create_rule_alredy_exist.yml", "test/fixtures/api/create_rule_for_domain.yml", "test/fixtures/api/create_rule_success.yml", "test/fixtures/api/delete_rule.yml", "test/fixtures/api/domain_by_id.yml", "test/fixtures/api/domain_by_id_not_found.yml", "test/fixtures/api/domain_rule.yml", "test/fixtures/api/domains.yml", "test/fixtures/api/rules_for_domain.yml", "test/fixtures/api/rules_for_domain_by_component.yml", "test/fixtures/api/update_account_properties.yml", "test/fixtures/api/update_rule.yml", "test/helper.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb"]
12
+ s.files = [".gitignore", ".rvmrc", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "VERSION", "lib/communication.rb", "lib/groups.rb", "lib/mxhero-api.rb", "lib/urls.rb", "mxhero-api.gemspec", "test/fixtures/api/account_properties.yml", "test/fixtures/api/account_properties_not_found.yml", "test/fixtures/api/accounts.yml", "test/fixtures/api/accounts_filtered.yml", "test/fixtures/api/accounts_from_domain.yml", "test/fixtures/api/accounts_from_domain_paginated.yml", "test/fixtures/api/accounts_without_group.yml", "test/fixtures/api/add_an_inexistent_account_to_group.yml", "test/fixtures/api/add_and_remove_account.yml", "test/fixtures/api/all_groups.yml", "test/fixtures/api/create_rule_for_domain.yml", "test/fixtures/api/delete_group.yml", "test/fixtures/api/delete_rule.yml", "test/fixtures/api/domain_by_id.yml", "test/fixtures/api/domain_by_id_not_found.yml", "test/fixtures/api/domain_rule.yml", "test/fixtures/api/domains.yml", "test/fixtures/api/remove_account_from_group_twice.yml", "test/fixtures/api/remove_inexistente_account_from_group.yml", "test/fixtures/api/rules_for_domain.yml", "test/fixtures/api/rules_for_domain_by_component.yml", "test/fixtures/api/save_group.yml", "test/fixtures/api/update_account_properties.yml", "test/fixtures/api/update_rule.yml", "test/helper.rb", "test/test_groups.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb"]
13
13
  s.homepage = "http://github.com/mxhero/mxhero-api"
14
14
  s.licenses = ["GPL-3"]
15
15
  s.require_paths = ["lib"]
16
16
  s.rubygems_version = "1.8.25"
17
17
  s.summary = "A MxHero API client for ruby"
18
- s.test_files = ["test/fixtures/api/account_properties.yml", "test/fixtures/api/account_properties_not_found.yml", "test/fixtures/api/accounts_filtered.yml", "test/fixtures/api/accounts_from_domain.yml", "test/fixtures/api/accounts_from_domain_paginated.yml", "test/fixtures/api/create_rule_alredy_exist.yml", "test/fixtures/api/create_rule_for_domain.yml", "test/fixtures/api/create_rule_success.yml", "test/fixtures/api/delete_rule.yml", "test/fixtures/api/domain_by_id.yml", "test/fixtures/api/domain_by_id_not_found.yml", "test/fixtures/api/domain_rule.yml", "test/fixtures/api/domains.yml", "test/fixtures/api/rules_for_domain.yml", "test/fixtures/api/rules_for_domain_by_component.yml", "test/fixtures/api/update_account_properties.yml", "test/fixtures/api/update_rule.yml", "test/helper.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb"]
18
+ s.test_files = ["test/fixtures/api/account_properties.yml", "test/fixtures/api/account_properties_not_found.yml", "test/fixtures/api/accounts.yml", "test/fixtures/api/accounts_filtered.yml", "test/fixtures/api/accounts_from_domain.yml", "test/fixtures/api/accounts_from_domain_paginated.yml", "test/fixtures/api/accounts_without_group.yml", "test/fixtures/api/add_an_inexistent_account_to_group.yml", "test/fixtures/api/add_and_remove_account.yml", "test/fixtures/api/all_groups.yml", "test/fixtures/api/create_rule_for_domain.yml", "test/fixtures/api/delete_group.yml", "test/fixtures/api/delete_rule.yml", "test/fixtures/api/domain_by_id.yml", "test/fixtures/api/domain_by_id_not_found.yml", "test/fixtures/api/domain_rule.yml", "test/fixtures/api/domains.yml", "test/fixtures/api/remove_account_from_group_twice.yml", "test/fixtures/api/remove_inexistente_account_from_group.yml", "test/fixtures/api/rules_for_domain.yml", "test/fixtures/api/rules_for_domain_by_component.yml", "test/fixtures/api/save_group.yml", "test/fixtures/api/update_account_properties.yml", "test/fixtures/api/update_rule.yml", "test/helper.rb", "test/test_groups.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb"]
19
19
 
20
20
  if s.respond_to? :specification_version then
21
21
  s.specification_version = 3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/accounts/test/properties
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/accounts/test/properties
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -19,24 +19,23 @@ http_interactions:
19
19
  message: !binary |-
20
20
  T0s=
21
21
  headers:
22
+ !binary "RGF0ZQ==":
23
+ - !binary |-
24
+ VGh1LCAxMiBTZXAgMjAxMyAyMToyMTowNyBHTVQ=
22
25
  !binary "U2VydmVy":
23
26
  - !binary |-
24
- QXBhY2hlLUNveW90ZS8xLjE=
27
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
+ !binary "Q29udGVudC1MZW5ndGg=":
29
+ - !binary |-
30
+ MzM3
25
31
  !binary "Q29udGVudC1UeXBl":
26
32
  - !binary |-
27
33
  YXBwbGljYXRpb24vanNvbg==
28
- !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
29
- - !binary |-
30
- Y2h1bmtlZA==
31
- !binary "RGF0ZQ==":
32
- - !binary |-
33
- RnJpLCAwOSBBdWcgMjAxMyAxNjoyMjo1MCBHTVQ=
34
34
  body:
35
35
  encoding: US-ASCII
36
- string: ! '[{"name":"email","value":"test@tesla.com"},{"name":"fax","value":""},{"name":"lastname","value":"The
37
- user test lastname"},{"name":"mobile","value":""},{"name":"name","value":"The
38
- user test name"},{"name":"opt1","value":""},{"name":"opt2","value":"option
39
- 2"},{"name":"opt3","value":""},{"name":"telephone","value":"3333-3333"}]'
36
+ string: ! '[{"name":"email","value":""},{"name":"fax","value":null},{"name":"lastname","value":"
37
+ CHANGED CHANGED CHANGED CHANGED CHANGED"},{"name":"mobile","value":""},{"name":"name","value":"
38
+ CHANGED CHANGED CHANGED CHANGED CHANGED"},{"name":"opt1","value":""},{"name":"opt2","value":""},{"name":"opt3","value":""},{"name":"telephone","value":""}]'
40
39
  http_version:
41
- recorded_at: Wed, 14 Aug 2013 18:23:18 GMT
40
+ recorded_at: Thu, 12 Sep 2013 21:21:06 GMT
42
41
  recorded_with: VCR 2.5.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/accounts/xxxxx/properties
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/accounts/xxxxx/properties
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -19,21 +19,21 @@ http_interactions:
19
19
  message: !binary |-
20
20
  Tm90IEZvdW5k
21
21
  headers:
22
+ !binary "RGF0ZQ==":
23
+ - !binary |-
24
+ VGh1LCAxMiBTZXAgMjAxMyAyMToyMToxNCBHTVQ=
22
25
  !binary "U2VydmVy":
23
26
  - !binary |-
24
- QXBhY2hlLUNveW90ZS8xLjE=
27
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
+ !binary "Q29udGVudC1MZW5ndGg=":
29
+ - !binary |-
30
+ MTUw
25
31
  !binary "Q29udGVudC1UeXBl":
26
32
  - !binary |-
27
33
  YXBwbGljYXRpb24vanNvbg==
28
- !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
29
- - !binary |-
30
- Y2h1bmtlZA==
31
- !binary "RGF0ZQ==":
32
- - !binary |-
33
- RnJpLCAwOSBBdWcgMjAxMyAxNjo0NzoxMyBHTVQ=
34
34
  body:
35
35
  encoding: US-ASCII
36
36
  string: ! '{"status":404,"code":404,"message":"domain.account.not.found","developerMessage":"domain.account.not.found","moreInfoUrl":"mailto:support@mxhero.com"}'
37
37
  http_version:
38
- recorded_at: Wed, 14 Aug 2013 18:47:40 GMT
38
+ recorded_at: Thu, 12 Sep 2013 21:21:14 GMT
39
39
  recorded_with: VCR 2.5.0
@@ -0,0 +1,39 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/groups/development/accounts
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic YWRtaW46cGFzc3dvcmQ=
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: !binary |-
20
+ T0s=
21
+ headers:
22
+ !binary "RGF0ZQ==":
23
+ - !binary |-
24
+ RnJpLCAxMyBTZXAgMjAxMyAxNjoxMzoyOSBHTVQ=
25
+ !binary "U2VydmVy":
26
+ - !binary |-
27
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
+ !binary "Q29udGVudC1MZW5ndGg=":
29
+ - !binary |-
30
+ Mjg3
31
+ !binary "Q29udGVudC1UeXBl":
32
+ - !binary |-
33
+ YXBwbGljYXRpb24vanNvbg==
34
+ body:
35
+ encoding: US-ASCII
36
+ string: ! '{"elements":[{"account":"agent.smith","domain":"tesla.com","createdDate":1378759089000,"updatedDate":1379077074000,"group":"development","aliases":[{"name":"agent.smith","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":1,"totalPages":1,"actualPage":1}'
37
+ http_version:
38
+ recorded_at: Fri, 13 Sep 2013 16:13:27 GMT
39
+ recorded_with: VCR 2.5.0
@@ -2,9 +2,9 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/accounts?account=user
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/accounts?account=test&limit=&offset=
6
6
  body:
7
- encoding: UTF-8
7
+ encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
@@ -16,26 +16,31 @@ http_interactions:
16
16
  response:
17
17
  status:
18
18
  code: 200
19
- message: OK
19
+ message: !binary |-
20
+ T0s=
20
21
  headers:
21
- Server:
22
- - Apache-Coyote/1.1
23
- Content-Type:
24
- - application/json
25
- Transfer-Encoding:
26
- - chunked
27
- Date:
28
- - Sat, 10 Aug 2013 21:24:29 GMT
22
+ !binary "RGF0ZQ==":
23
+ - !binary |-
24
+ RnJpLCAxMyBTZXAgMjAxMyAyMDozNjowMiBHTVQ=
25
+ !binary "U2VydmVy":
26
+ - !binary |-
27
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
+ !binary "Q29udGVudC1MZW5ndGg=":
29
+ - !binary |-
30
+ Njc4
31
+ !binary "Q29udGVudC1UeXBl":
32
+ - !binary |-
33
+ YXBwbGljYXRpb24vanNvbg==
29
34
  body:
30
- encoding: UTF-8
31
- string: '{"elements":[{"account":"user_1","domain":"tesla.com","createdDate":1376105684000,"updatedDate":1376105684000,"group":null,"aliases":[{"name":"user_1","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"user_2","domain":"tesla.com","createdDate":1376105691000,"updatedDate":1376105691000,"group":null,"aliases":[{"name":"user_2","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"user_3","domain":"tesla.com","createdDate":1376105698000,"updatedDate":1376105698000,"group":null,"aliases":[{"name":"user_3","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":3,"totalPages":1,"actualPage":1}'
35
+ encoding: US-ASCII
36
+ string: ! '{"elements":[{"account":"test","domain":"tesla.com","createdDate":1379013802000,"updatedDate":1379077065000,"group":"test","aliases":[{"name":"test","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"test1","domain":"tesla.com","createdDate":1378759068000,"updatedDate":1379077065000,"group":"test","aliases":[{"name":"test1","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"test2","domain":"tesla.com","createdDate":1378759074000,"updatedDate":1379077065000,"group":"test","aliases":[{"name":"test2","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":3,"totalPages":1,"actualPage":1}'
32
37
  http_version:
33
- recorded_at: Tue, 10 Sep 2013 15:07:05 GMT
38
+ recorded_at: Fri, 13 Sep 2013 20:36:02 GMT
34
39
  - request:
35
40
  method: get
36
- uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/accounts?account=test
41
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/accounts?account=john.doe&limit=&offset=
37
42
  body:
38
- encoding: UTF-8
43
+ encoding: US-ASCII
39
44
  string: ''
40
45
  headers:
41
46
  Accept:
@@ -47,26 +52,31 @@ http_interactions:
47
52
  response:
48
53
  status:
49
54
  code: 200
50
- message: OK
55
+ message: !binary |-
56
+ T0s=
51
57
  headers:
52
- Server:
53
- - Apache-Coyote/1.1
54
- Content-Type:
55
- - application/json
56
- Transfer-Encoding:
57
- - chunked
58
- Date:
59
- - Sat, 10 Aug 2013 21:24:29 GMT
58
+ !binary "RGF0ZQ==":
59
+ - !binary |-
60
+ RnJpLCAxMyBTZXAgMjAxMyAyMDozNjowMyBHTVQ=
61
+ !binary "U2VydmVy":
62
+ - !binary |-
63
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
64
+ !binary "Q29udGVudC1MZW5ndGg=":
65
+ - !binary |-
66
+ Mjcy
67
+ !binary "Q29udGVudC1UeXBl":
68
+ - !binary |-
69
+ YXBwbGljYXRpb24vanNvbg==
60
70
  body:
61
- encoding: UTF-8
62
- string: '{"elements":[{"account":"test","domain":"tesla.com","createdDate":1376065216000,"updatedDate":1376069631000,"group":null,"aliases":[{"name":"test","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":1,"totalPages":1,"actualPage":1}'
71
+ encoding: US-ASCII
72
+ string: ! '{"elements":[{"account":"john.doe","domain":"tesla.com","createdDate":1378759081000,"updatedDate":1379101808000,"group":null,"aliases":[{"name":"john.doe","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":1,"totalPages":1,"actualPage":1}'
63
73
  http_version:
64
- recorded_at: Tue, 10 Sep 2013 15:07:05 GMT
74
+ recorded_at: Fri, 13 Sep 2013 20:36:03 GMT
65
75
  - request:
66
76
  method: get
67
- uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/accounts?account=user_2
77
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/accounts?account=test1&limit=&offset=
68
78
  body:
69
- encoding: UTF-8
79
+ encoding: US-ASCII
70
80
  string: ''
71
81
  headers:
72
82
  Accept:
@@ -78,19 +88,24 @@ http_interactions:
78
88
  response:
79
89
  status:
80
90
  code: 200
81
- message: OK
91
+ message: !binary |-
92
+ T0s=
82
93
  headers:
83
- Server:
84
- - Apache-Coyote/1.1
85
- Content-Type:
86
- - application/json
87
- Transfer-Encoding:
88
- - chunked
89
- Date:
90
- - Sat, 10 Aug 2013 21:24:29 GMT
94
+ !binary "RGF0ZQ==":
95
+ - !binary |-
96
+ RnJpLCAxMyBTZXAgMjAxMyAyMDozNjowNCBHTVQ=
97
+ !binary "U2VydmVy":
98
+ - !binary |-
99
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
100
+ !binary "Q29udGVudC1MZW5ndGg=":
101
+ - !binary |-
102
+ MjY4
103
+ !binary "Q29udGVudC1UeXBl":
104
+ - !binary |-
105
+ YXBwbGljYXRpb24vanNvbg==
91
106
  body:
92
- encoding: UTF-8
93
- string: '{"elements":[{"account":"user_2","domain":"tesla.com","createdDate":1376105691000,"updatedDate":1376105691000,"group":null,"aliases":[{"name":"user_2","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":1,"totalPages":1,"actualPage":1}'
107
+ encoding: US-ASCII
108
+ string: ! '{"elements":[{"account":"test1","domain":"tesla.com","createdDate":1378759068000,"updatedDate":1379077065000,"group":"test","aliases":[{"name":"test1","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":1,"totalPages":1,"actualPage":1}'
94
109
  http_version:
95
- recorded_at: Tue, 10 Sep 2013 15:07:05 GMT
110
+ recorded_at: Fri, 13 Sep 2013 20:36:03 GMT
96
111
  recorded_with: VCR 2.5.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/accounts
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/accounts?limit=&offset=
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -19,21 +19,21 @@ http_interactions:
19
19
  message: !binary |-
20
20
  T0s=
21
21
  headers:
22
+ !binary "RGF0ZQ==":
23
+ - !binary |-
24
+ RnJpLCAxMyBTZXAgMjAxMyAyMDozNDoyNyBHTVQ=
22
25
  !binary "U2VydmVy":
23
26
  - !binary |-
24
- QXBhY2hlLUNveW90ZS8xLjE=
27
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
+ !binary "Q29udGVudC1MZW5ndGg=":
29
+ - !binary |-
30
+ MTEwNA==
25
31
  !binary "Q29udGVudC1UeXBl":
26
32
  - !binary |-
27
33
  YXBwbGljYXRpb24vanNvbg==
28
- !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
29
- - !binary |-
30
- Y2h1bmtlZA==
31
- !binary "RGF0ZQ==":
32
- - !binary |-
33
- RnJpLCAwOSBBdWcgMjAxMyAwNjozNDowNCBHTVQ=
34
34
  body:
35
35
  encoding: US-ASCII
36
- string: ! '{"elements":[],"totalElements":0,"totalPages":0,"actualPage":0}'
36
+ string: ! '{"elements":[{"account":"agent.smith","domain":"tesla.com","createdDate":1378759089000,"updatedDate":1379098398000,"group":null,"aliases":[{"name":"agent.smith","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"john.doe","domain":"tesla.com","createdDate":1378759081000,"updatedDate":1379101808000,"group":null,"aliases":[{"name":"john.doe","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"test","domain":"tesla.com","createdDate":1379013802000,"updatedDate":1379077065000,"group":"test","aliases":[{"name":"test","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"test1","domain":"tesla.com","createdDate":1378759068000,"updatedDate":1379077065000,"group":"test","aliases":[{"name":"test1","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"test2","domain":"tesla.com","createdDate":1378759074000,"updatedDate":1379077065000,"group":"test","aliases":[{"name":"test2","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":5,"totalPages":1,"actualPage":1}'
37
37
  http_version:
38
- recorded_at: Tue, 13 Aug 2013 16:33:59 GMT
38
+ recorded_at: Fri, 13 Sep 2013 20:34:27 GMT
39
39
  recorded_with: VCR 2.5.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/accounts?limit=4&offset=1
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/accounts?limit=4&offset=1
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -19,21 +19,21 @@ http_interactions:
19
19
  message: !binary |-
20
20
  T0s=
21
21
  headers:
22
+ !binary "RGF0ZQ==":
23
+ - !binary |-
24
+ VGh1LCAxMiBTZXAgMjAxMyAyMToyMTowNyBHTVQ=
22
25
  !binary "U2VydmVy":
23
26
  - !binary |-
24
- QXBhY2hlLUNveW90ZS8xLjE=
27
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
+ !binary "Q29udGVudC1MZW5ndGg=":
29
+ - !binary |-
30
+ ODk0
25
31
  !binary "Q29udGVudC1UeXBl":
26
32
  - !binary |-
27
33
  YXBwbGljYXRpb24vanNvbg==
28
- !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
29
- - !binary |-
30
- Y2h1bmtlZA==
31
- !binary "RGF0ZQ==":
32
- - !binary |-
33
- U2F0LCAxMCBBdWcgMjAxMyAwMzozNToxNSBHTVQ=
34
34
  body:
35
35
  encoding: US-ASCII
36
- string: ! '{"elements":[{"account":"test","domain":"tesla.com","createdDate":1376065216000,"updatedDate":1376069631000,"group":null,"aliases":[{"name":"test","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"user_1","domain":"tesla.com","createdDate":1376105684000,"updatedDate":1376105684000,"group":null,"aliases":[{"name":"user_1","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"user_2","domain":"tesla.com","createdDate":1376105691000,"updatedDate":1376105691000,"group":null,"aliases":[{"name":"user_2","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"user_3","domain":"tesla.com","createdDate":1376105698000,"updatedDate":1376105698000,"group":null,"aliases":[{"name":"user_3","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":6,"totalPages":2,"actualPage":1}'
36
+ string: ! '{"elements":[{"account":"agent.smith","domain":"tesla.com","createdDate":1378759089000,"updatedDate":1378759089000,"group":null,"aliases":[{"name":"agent.smith","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"john.doe","domain":"tesla.com","createdDate":1378759081000,"updatedDate":1378759081000,"group":null,"aliases":[{"name":"john.doe","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"test","domain":"tesla.com","createdDate":1379013802000,"updatedDate":1379013802000,"group":null,"aliases":[{"name":"test","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"test1","domain":"tesla.com","createdDate":1378759068000,"updatedDate":1378759068000,"group":null,"aliases":[{"name":"test1","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":5,"totalPages":2,"actualPage":1}'
37
37
  http_version:
38
- recorded_at: Thu, 15 Aug 2013 21:29:19 GMT
38
+ recorded_at: Thu, 12 Sep 2013 21:21:07 GMT
39
39
  recorded_with: VCR 2.5.0
@@ -0,0 +1,75 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com//groups/accounts/available?account=
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic YWRtaW46cGFzc3dvcmQ=
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: !binary |-
20
+ T0s=
21
+ headers:
22
+ !binary "RGF0ZQ==":
23
+ - !binary |-
24
+ V2VkLCAxOCBTZXAgMjAxMyAyMjowNjoyNyBHTVQ=
25
+ !binary "U2VydmVy":
26
+ - !binary |-
27
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
+ !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
29
+ - !binary |-
30
+ Y2h1bmtlZA==
31
+ !binary "Q29udGVudC1UeXBl":
32
+ - !binary |-
33
+ YXBwbGljYXRpb24vanNvbg==
34
+ body:
35
+ encoding: US-ASCII
36
+ string: ! '{"elements":[{"account":"agent.smith","domain":"tesla.com","createdDate":1378759089000,"updatedDate":1379098398000,"group":null,"aliases":[{"name":"agent.smith","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"john.doe","domain":"tesla.com","createdDate":1378759081000,"updatedDate":1379101808000,"group":null,"aliases":[{"name":"john.doe","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":2,"totalPages":1,"actualPage":1}'
37
+ http_version:
38
+ recorded_at: Wed, 18 Sep 2013 22:06:27 GMT
39
+ - request:
40
+ method: get
41
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com//groups/accounts/available?account=age
42
+ body:
43
+ encoding: US-ASCII
44
+ string: ''
45
+ headers:
46
+ Accept:
47
+ - application/json
48
+ Content-Type:
49
+ - application/json
50
+ Authorization:
51
+ - Basic YWRtaW46cGFzc3dvcmQ=
52
+ response:
53
+ status:
54
+ code: 200
55
+ message: !binary |-
56
+ T0s=
57
+ headers:
58
+ !binary "RGF0ZQ==":
59
+ - !binary |-
60
+ V2VkLCAxOCBTZXAgMjAxMyAyMjowNjoyOCBHTVQ=
61
+ !binary "U2VydmVy":
62
+ - !binary |-
63
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
64
+ !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
65
+ - !binary |-
66
+ Y2h1bmtlZA==
67
+ !binary "Q29udGVudC1UeXBl":
68
+ - !binary |-
69
+ YXBwbGljYXRpb24vanNvbg==
70
+ body:
71
+ encoding: US-ASCII
72
+ string: ! '{"elements":[{"account":"agent.smith","domain":"tesla.com","createdDate":1378759089000,"updatedDate":1379098398000,"group":null,"aliases":[{"name":"agent.smith","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":1,"totalPages":1,"actualPage":1}'
73
+ http_version:
74
+ recorded_at: Wed, 18 Sep 2013 22:06:28 GMT
75
+ recorded_with: VCR 2.5.0