tableau_rest_api 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +8 -0
  3. data/Guardfile +21 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +103 -0
  6. data/Rakefile +10 -0
  7. data/bin/console +14 -0
  8. data/bin/setup +8 -0
  9. data/fixtures/vcr_cassettes/add_user.yml +223 -0
  10. data/fixtures/vcr_cassettes/add_user_to_group.yml +451 -0
  11. data/fixtures/vcr_cassettes/add_user_to_group_through_site.yml +451 -0
  12. data/fixtures/vcr_cassettes/create_group.yml +224 -0
  13. data/fixtures/vcr_cassettes/create_group_through_site.yml +224 -0
  14. data/fixtures/vcr_cassettes/datasources.yml +234 -0
  15. data/fixtures/vcr_cassettes/datasources_through_site.yml +234 -0
  16. data/fixtures/vcr_cassettes/delete_datasource.yml +334 -0
  17. data/fixtures/vcr_cassettes/delete_group.yml +328 -0
  18. data/fixtures/vcr_cassettes/delete_group_through_site.yml +329 -0
  19. data/fixtures/vcr_cassettes/delete_schedule.yml +276 -0
  20. data/fixtures/vcr_cassettes/delete_site.yml +214 -0
  21. data/fixtures/vcr_cassettes/delete_subscription.yml +329 -0
  22. data/fixtures/vcr_cassettes/delete_workbook.yml +350 -0
  23. data/fixtures/vcr_cassettes/get_datasource.yml +673 -0
  24. data/fixtures/vcr_cassettes/get_workbook.yml +15044 -0
  25. data/fixtures/vcr_cassettes/groups.yml +229 -0
  26. data/fixtures/vcr_cassettes/groups_through_site.yml +230 -0
  27. data/fixtures/vcr_cassettes/projects_through_site.yml +230 -0
  28. data/fixtures/vcr_cassettes/query_workbooks.yml +250 -0
  29. data/fixtures/vcr_cassettes/remove_user_from_group_through_site.yml +440 -0
  30. data/fixtures/vcr_cassettes/remove_user_from_site_through_site.yml +329 -0
  31. data/fixtures/vcr_cassettes/schedules.yml +115 -0
  32. data/fixtures/vcr_cassettes/server_info.yml +53 -0
  33. data/fixtures/vcr_cassettes/signin.yml +57 -0
  34. data/fixtures/vcr_cassettes/signout.yml +102 -0
  35. data/fixtures/vcr_cassettes/sites.yml +118 -0
  36. data/fixtures/vcr_cassettes/subscriptions.yml +226 -0
  37. data/fixtures/vcr_cassettes/switch_site.yml +113 -0
  38. data/fixtures/vcr_cassettes/update_group_through_site.yml +343 -0
  39. data/fixtures/vcr_cassettes/update_user_through_site.yml +333 -0
  40. data/fixtures/vcr_cassettes/users_in_group.yml +339 -0
  41. data/fixtures/vcr_cassettes/users_on_site.yml +230 -0
  42. data/fixtures/vcr_cassettes/users_through_site.yml +230 -0
  43. data/fixtures/vcr_cassettes/workbooks_through_site.yml +250 -0
  44. data/lib/tableau_rest_api.rb +32 -0
  45. data/lib/tableau_rest_api/api_error.rb +7 -0
  46. data/lib/tableau_rest_api/area/schedule_subscription.rb +41 -0
  47. data/lib/tableau_rest_api/area/user_group.rb +72 -0
  48. data/lib/tableau_rest_api/area/workbook_datasource.rb +87 -0
  49. data/lib/tableau_rest_api/client.rb +65 -0
  50. data/lib/tableau_rest_api/helpers/helpers.rb +9 -0
  51. data/lib/tableau_rest_api/resource.rb +42 -0
  52. data/lib/tableau_rest_api/resources/base.rb +24 -0
  53. data/lib/tableau_rest_api/resources/datasource.rb +12 -0
  54. data/lib/tableau_rest_api/resources/group.rb +10 -0
  55. data/lib/tableau_rest_api/resources/project.rb +12 -0
  56. data/lib/tableau_rest_api/resources/schedule.rb +12 -0
  57. data/lib/tableau_rest_api/resources/server.rb +12 -0
  58. data/lib/tableau_rest_api/resources/site.rb +68 -0
  59. data/lib/tableau_rest_api/resources/subscription.rb +10 -0
  60. data/lib/tableau_rest_api/resources/user.rb +12 -0
  61. data/lib/tableau_rest_api/resources/workbook.rb +12 -0
  62. data/lib/tableau_rest_api/util/config.rb +22 -0
  63. data/lib/tableau_rest_api/util/response.rb +11 -0
  64. data/lib/tableau_rest_api/util/token.rb +16 -0
  65. data/lib/tableau_rest_api/util/upload.rb +29 -0
  66. data/lib/tableau_rest_api/version.rb +3 -0
  67. data/tableau_rest_api.gemspec +33 -0
  68. metadata +222 -0
@@ -0,0 +1,115 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://tableau.lvh.me/api/2.6/auth/signin
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"credentials":{"name":"<TABLEAU_USERNAME>","password":"<TABLEAU_PASSWORD>","site":{"contentUrl":""}}}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - rest-client/2.0.2 (linux-gnu x86_64) ruby/2.3.3p222
16
+ Content-Type:
17
+ - application/json
18
+ Content-Length:
19
+ - '94'
20
+ Host:
21
+ - tableau.lvh.me
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Mon, 26 Jun 2017 10:53:01 GMT
29
+ Server:
30
+ - Tableau
31
+ Content-Type:
32
+ - application/json;charset=utf-8
33
+ Vary:
34
+ - Accept-Encoding
35
+ Content-Encoding:
36
+ - gzip
37
+ P3p:
38
+ - CP="NON"
39
+ X-Ua-Compatible:
40
+ - IE=Edge
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Xss-Protection:
44
+ - 1; mode=block
45
+ Content-Length:
46
+ - '191'
47
+ body:
48
+ encoding: ASCII-8BIT
49
+ string: !binary |-
50
+ H4sIAAAAAAAAAz2MywqCQBRA/+WuuzAPX9MuECKIEEqDduM80hSHxqmI8t/T
51
+ TauzOed8QHmjzRBa2Y+w/sDYBrOw1bAGKimxcS2QMFFjxE2EMmEE05RrmgjC
52
+ eaZgBcoNYV6Uvp8bmFbwGI3/T1hNqRBMoOY2xsiSDKVQFBkhykTcpmlWL1Fw
53
+ nRlmPxz0zqIMp71smve2G0+9P1+/z3t+zF1JqqzognpYd/fFpjh696pu5UUk
54
+ ME0/LDfSzs0AAAA=
55
+ http_version:
56
+ recorded_at: Mon, 26 Jun 2017 10:53:03 GMT
57
+ - request:
58
+ method: get
59
+ uri: https://tableau.lvh.me/api/2.6/schedules
60
+ body:
61
+ encoding: US-ASCII
62
+ string: ''
63
+ headers:
64
+ Accept:
65
+ - application/json
66
+ Accept-Encoding:
67
+ - gzip, deflate
68
+ User-Agent:
69
+ - rest-client/2.0.2 (linux-gnu x86_64) ruby/2.3.3p222
70
+ Content-Type:
71
+ - application/json
72
+ X-Tableau-Auth:
73
+ - tNdIf-atTLahhyGksTlrWg|vqDSDoU0V8PktcufoqrPAPSrowVjUZ96
74
+ Host:
75
+ - tableau.lvh.me
76
+ response:
77
+ status:
78
+ code: 200
79
+ message: OK
80
+ headers:
81
+ Date:
82
+ - Mon, 26 Jun 2017 10:53:01 GMT
83
+ Server:
84
+ - Tableau
85
+ Content-Type:
86
+ - application/json;charset=utf-8
87
+ Vary:
88
+ - Accept-Encoding
89
+ Content-Encoding:
90
+ - gzip
91
+ P3p:
92
+ - CP="NON"
93
+ X-Ua-Compatible:
94
+ - IE=Edge
95
+ X-Content-Type-Options:
96
+ - nosniff
97
+ X-Xss-Protection:
98
+ - 1; mode=block
99
+ Content-Length:
100
+ - '367'
101
+ body:
102
+ encoding: ASCII-8BIT
103
+ string: !binary |-
104
+ H4sIAAAAAAAAA9WRvU7DMBSFXwV5riU7jh0nWzcWGGglpCIG/9wUi9QJiVMR
105
+ qr47dim0SIAQG5Iz3HOPTs5n71Cn1s6r4FqPql2a4HrcaOhRhSiaHYSFe4E0
106
+ EhKF0AbVzLfKNUo3SWZoP0ODeQA7NjCkkPcBVXc75Gz0GKtqLrXA0nCBc0YV
107
+ VpQzbK3JrSxqVoOO2V5tUuItwKNV08Wm7b3z6yFuhqBCWs1NcFtIvXrX9i5M
108
+ UeOplukhOuw8RCEjVGBSYMqWGam4qEi5ipaxs+eWAhOBM7EkcR9dPFnC1KW/
109
+ LEY9mN51h1uZobqHpxG8mY7dmil1hedwM/rPacUxjZBVvJUjfE1ICVIoTCkv
110
+ cZ5LjUutSITXlGa6lEyKE/xV68/Y/wl6POwrdA6CFZZLHD+I6CBxaWqKjZaE
111
+ SVlSW+Qn9ABD+APwGw1bUlblrOLkB2Ca+lV5+Tvgy3bsv3/rmEY/gO/3+1c8
112
+ fFeqSwMAAA==
113
+ http_version:
114
+ recorded_at: Mon, 26 Jun 2017 10:53:04 GMT
115
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://tableau.lvh.me/api/2.6/serverinfo
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - rest-client/2.0.2 (linux-gnu x86_64) ruby/2.3.3p222
16
+ Content-Type:
17
+ - application/json
18
+ Host:
19
+ - tableau.lvh.me
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Mon, 26 Jun 2017 10:50:21 GMT
27
+ Server:
28
+ - Tableau
29
+ Content-Type:
30
+ - application/json;charset=utf-8
31
+ Vary:
32
+ - Accept-Encoding
33
+ Content-Encoding:
34
+ - gzip
35
+ P3p:
36
+ - CP="NON"
37
+ X-Ua-Compatible:
38
+ - IE=Edge
39
+ X-Content-Type-Options:
40
+ - nosniff
41
+ X-Xss-Protection:
42
+ - 1; mode=block
43
+ Content-Length:
44
+ - '109'
45
+ body:
46
+ encoding: ASCII-8BIT
47
+ string: !binary |-
48
+ H4sIAAAAAAAAAz3MMQqAMAwF0Lv8WUKiqODm6AXc1UYoiJXUukjvLjq4vuHd
49
+ iGqX2rCvAd2Nw4JLyzmqRR/2V65pS4oOwlSRoMCc/OY+qJhJWuJGaiqFGbmA
50
+ aTz7w/8BSmqQ8wN0ZE3naAAAAA==
51
+ http_version:
52
+ recorded_at: Mon, 26 Jun 2017 10:50:24 GMT
53
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://tableau.lvh.me/api/2.6/auth/signin
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"credentials":{"name":"<TABLEAU_USERNAME>","password":"<TABLEAU_PASSWORD>","site":{"contentUrl":""}}}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - rest-client/2.0.2 (linux-gnu x86_64) ruby/2.3.3p222
16
+ Content-Type:
17
+ - application/json
18
+ Content-Length:
19
+ - '94'
20
+ Host:
21
+ - tableau.lvh.me
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Mon, 26 Jun 2017 10:50:10 GMT
29
+ Server:
30
+ - Tableau
31
+ Content-Type:
32
+ - application/json;charset=utf-8
33
+ Vary:
34
+ - Accept-Encoding
35
+ Content-Encoding:
36
+ - gzip
37
+ P3p:
38
+ - CP="NON"
39
+ X-Ua-Compatible:
40
+ - IE=Edge
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Xss-Protection:
44
+ - 1; mode=block
45
+ Content-Length:
46
+ - '197'
47
+ body:
48
+ encoding: ASCII-8BIT
49
+ string: !binary |-
50
+ H4sIAAAAAAAAAz2My26CQBRA/+Wuvcm8YGbcGau1qcYYaLVLmEcFCViYxhbK
51
+ vxc3rs7mnDOAaZ11dSiyqoP5AF0R3J2FhTnQjBIf5RoJ0zkK7gRmMSMoJbc0
52
+ 1oRzZWAGpqnDtHhrq6mBcQbfnWsfE5ZTqjXTaLmPUHiiMNOGIiPEOMG9lCq/
53
+ R6G5uHryX6/nn9tv+Z7aZJfsOO6ferNf/PXNx/mw8lX/cgwL9XVa21KpeCvS
54
+ 5We5kcdnGMd/Ux1pl80AAAA=
55
+ http_version:
56
+ recorded_at: Mon, 26 Jun 2017 10:50:13 GMT
57
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,102 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://tableau.lvh.me/api/2.6/auth/signin
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"credentials":{"name":"<TABLEAU_USERNAME>","password":"<TABLEAU_PASSWORD>","site":{"contentUrl":""}}}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - rest-client/2.0.2 (linux-gnu x86_64) ruby/2.3.3p222
16
+ Content-Type:
17
+ - application/json
18
+ Content-Length:
19
+ - '94'
20
+ Host:
21
+ - tableau.lvh.me
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Mon, 26 Jun 2017 10:50:03 GMT
29
+ Server:
30
+ - Tableau
31
+ Content-Type:
32
+ - application/json;charset=utf-8
33
+ Vary:
34
+ - Accept-Encoding
35
+ Content-Encoding:
36
+ - gzip
37
+ P3p:
38
+ - CP="NON"
39
+ X-Ua-Compatible:
40
+ - IE=Edge
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Xss-Protection:
44
+ - 1; mode=block
45
+ Content-Length:
46
+ - '192'
47
+ body:
48
+ encoding: ASCII-8BIT
49
+ string: !binary |-
50
+ H4sIAAAAAAAAAz2MywqCQBRA/+WuuzAPX7dlZEFPKqNwN46jmDKCjlCU/55t
51
+ Wp3NOecNujO5sa5STQ/zN/SVMz9WOcyBK84KPyNkgjL0pPFQBYJhGMqcB8Sk
52
+ jDTMQLfWTYtr10wNjDMYetP9JyLjnEgQ5rLw0StYhIo0R8GYNp4swjDKfpFr
53
+ a2Mnv0yW98a3TeLUbY2nrU4uu7T8dDUPNvv+SHyRxix+Hl6n1TAkl0AfBjrb
54
+ B4zjFyAS6lTNAAAA
55
+ http_version:
56
+ recorded_at: Mon, 26 Jun 2017 10:50:06 GMT
57
+ - request:
58
+ method: post
59
+ uri: https://tableau.lvh.me/api/2.6/auth/signout
60
+ body:
61
+ encoding: UTF-8
62
+ string: "{}"
63
+ headers:
64
+ Accept:
65
+ - application/json
66
+ Accept-Encoding:
67
+ - gzip, deflate
68
+ User-Agent:
69
+ - rest-client/2.0.2 (linux-gnu x86_64) ruby/2.3.3p222
70
+ Content-Type:
71
+ - application/json
72
+ X-Tableau-Auth:
73
+ - gTDXl5nlTtaWG-QKcTSLZg|rk16JMsO91BZE0ExNyQFuuTS6cNu9Rnj
74
+ Content-Length:
75
+ - '2'
76
+ Host:
77
+ - tableau.lvh.me
78
+ response:
79
+ status:
80
+ code: 204
81
+ message: No Content
82
+ headers:
83
+ Date:
84
+ - Mon, 26 Jun 2017 10:50:03 GMT
85
+ Server:
86
+ - Tableau
87
+ P3p:
88
+ - CP="NON"
89
+ X-Ua-Compatible:
90
+ - IE=Edge
91
+ X-Content-Type-Options:
92
+ - nosniff
93
+ X-Xss-Protection:
94
+ - 1; mode=block
95
+ Content-Length:
96
+ - '0'
97
+ body:
98
+ encoding: UTF-8
99
+ string: ''
100
+ http_version:
101
+ recorded_at: Mon, 26 Jun 2017 10:50:07 GMT
102
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,118 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://tableau.lvh.me/api/2.6/auth/signin
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"credentials":{"name":"<TABLEAU_USERNAME>","password":"<TABLEAU_PASSWORD>","site":{"contentUrl":""}}}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - rest-client/2.0.2 (linux-gnu x86_64) ruby/2.3.3p222
16
+ Content-Type:
17
+ - application/json
18
+ Content-Length:
19
+ - '94'
20
+ Host:
21
+ - tableau.lvh.me
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Mon, 26 Jun 2017 10:49:58 GMT
29
+ Server:
30
+ - Tableau
31
+ Content-Type:
32
+ - application/json;charset=utf-8
33
+ Vary:
34
+ - Accept-Encoding
35
+ Content-Encoding:
36
+ - gzip
37
+ P3p:
38
+ - CP="NON"
39
+ X-Ua-Compatible:
40
+ - IE=Edge
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Xss-Protection:
44
+ - 1; mode=block
45
+ Content-Length:
46
+ - '193'
47
+ body:
48
+ encoding: ASCII-8BIT
49
+ string: !binary |-
50
+ H4sIAAAAAAAAAz2NOw+CMBgA/8s326QvHmUjJmI0Dg4+6AalVVQgtsUYlP8u
51
+ LE433d0HlNWVbn1dPBwkH3C11zPrChIgBcEmKAXCVJSIM81REVKMoohVJBSY
52
+ sVjBAlTX+ilxsI/JgXEBvdP2H6ElIUJQgSpmAsQNjlEhFEEUY6U5M1EUl7Pk
53
+ u7tu5+lgT89+vd3n23Q4OX/spHyl311D0+HW07Ns8us7z/abVSYaI7k9B8d2
54
+ eYFx/AHKgCVJzQAAAA==
55
+ http_version:
56
+ recorded_at: Mon, 26 Jun 2017 10:50:01 GMT
57
+ - request:
58
+ method: get
59
+ uri: https://tableau.lvh.me/api/2.6/sites
60
+ body:
61
+ encoding: US-ASCII
62
+ string: ''
63
+ headers:
64
+ Accept:
65
+ - application/json
66
+ Accept-Encoding:
67
+ - gzip, deflate
68
+ User-Agent:
69
+ - rest-client/2.0.2 (linux-gnu x86_64) ruby/2.3.3p222
70
+ Content-Type:
71
+ - application/json
72
+ X-Tableau-Auth:
73
+ - 1zrWquHKQYKAzWstVoZZvA|Mm2Azju2XZmYhxYGQJFG9mfZ4rX5VnCg
74
+ Host:
75
+ - tableau.lvh.me
76
+ response:
77
+ status:
78
+ code: 200
79
+ message: OK
80
+ headers:
81
+ Date:
82
+ - Mon, 26 Jun 2017 10:49:58 GMT
83
+ Server:
84
+ - Tableau
85
+ Content-Type:
86
+ - application/json;charset=utf-8
87
+ Vary:
88
+ - Accept-Encoding
89
+ Content-Encoding:
90
+ - gzip
91
+ P3p:
92
+ - CP="NON"
93
+ X-Ua-Compatible:
94
+ - IE=Edge
95
+ X-Content-Type-Options:
96
+ - nosniff
97
+ X-Xss-Protection:
98
+ - 1; mode=block
99
+ Content-Length:
100
+ - '521'
101
+ body:
102
+ encoding: ASCII-8BIT
103
+ string: !binary |-
104
+ H4sIAAAAAAAAA92VS2sbMRDHv0rYcwb0Wj1yM22hhz4OaeihlKDHyBHY67CS
105
+ A23wd++oCZjY8SmH4t52/n/NSPoxo30c7v2yTL6VzTRcPfYIv2zXAefhauDD
106
+ 5V/huvzGHjJGQts0v1o8+LLyYdVlO+wuh1oa1l6gfwxXPx6HknqK5yyPwQET
107
+ LoCSqMBrwcAYmbh2TEobqebk173Se8x+u2okxM3UcGo384pkin1al+nzJvVV
108
+ 7568xZRuKs6V3Np833RYxFYekIQZH0qlG30stW3mXx+mflQ6T5u3uHc/lXVp
109
+ lCbGXmMbapxLwK/tjqoepCy3WNsiRqx7J/tVJSv6eIff/bze3r9I2l0+M7DC
110
+ SAzKgDZRgRrFCJ55A6OMiRtnMaPZM/hGG10TQ3FIwXv/T0E8X/ctJLSVNqGK
111
+ gFlJUMEKcIxZUFp6HS1qpdUxCXlIgjqt1WdEZ82D5ei1zQo4z5k6w3CaDgqF
112
+ cNl46WhoXuGhT/HQ584jcO6iiCPEmCIoZyUElT1oDCJIF6RIYc9jcdGJlGl5
113
+ 0akcjctte3Jv65N71mTYGJNmHIFj0tQp0kCI0oIMMmiT2IjcveyUV6F0JP8J
114
+ D0QntQMv6GGlHtH0khgEpmLOIotAP5ljHqdwnDuNFBTnnJ7UrCwDpZwGO6oR
115
+ Riu7TkOF+YjGCRjnyuLnbvcHHjntMMwIAAA=
116
+ http_version:
117
+ recorded_at: Mon, 26 Jun 2017 10:50:01 GMT
118
+ recorded_with: VCR 3.0.3