spotify-ruby 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/COVERAGE.md +142 -0
  4. data/README.md +60 -5
  5. data/lib/spotify.rb +7 -0
  6. data/lib/spotify/auth.rb +10 -18
  7. data/lib/spotify/sdk.rb +109 -0
  8. data/lib/spotify/sdk/base.rb +58 -0
  9. data/lib/spotify/sdk/connect.rb +26 -0
  10. data/lib/spotify/sdk/connect/device.rb +55 -0
  11. data/lib/spotify/sdk/initialization.rb +76 -0
  12. data/lib/spotify/sdk/initialization/base.rb +74 -0
  13. data/lib/spotify/sdk/initialization/oauth_access_token.rb +34 -0
  14. data/lib/spotify/sdk/initialization/plain_string.rb +26 -0
  15. data/lib/spotify/sdk/initialization/query_hash.rb +45 -0
  16. data/lib/spotify/sdk/initialization/query_string.rb +51 -0
  17. data/lib/spotify/sdk/initialization/url_string.rb +49 -0
  18. data/lib/spotify/sdk/model.rb +53 -0
  19. data/lib/spotify/version.rb +1 -1
  20. data/spotify-ruby.gemspec +5 -3
  21. metadata +45 -55
  22. data/SPEC.md +0 -18
  23. data/html/README_md.html +0 -189
  24. data/html/Spotify.html +0 -115
  25. data/html/Spotify/Auth.html +0 -281
  26. data/html/Spotify/Errors.html +0 -103
  27. data/html/Spotify/Errors/AuthClientCredentialsError.html +0 -106
  28. data/html/created.rid +0 -5
  29. data/html/css/fonts.css +0 -167
  30. data/html/css/rdoc.css +0 -590
  31. data/html/fonts/Lato-Light.ttf +0 -0
  32. data/html/fonts/Lato-LightItalic.ttf +0 -0
  33. data/html/fonts/Lato-Regular.ttf +0 -0
  34. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  35. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  36. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  37. data/html/images/add.png +0 -0
  38. data/html/images/arrow_up.png +0 -0
  39. data/html/images/brick.png +0 -0
  40. data/html/images/brick_link.png +0 -0
  41. data/html/images/bug.png +0 -0
  42. data/html/images/bullet_black.png +0 -0
  43. data/html/images/bullet_toggle_minus.png +0 -0
  44. data/html/images/bullet_toggle_plus.png +0 -0
  45. data/html/images/date.png +0 -0
  46. data/html/images/delete.png +0 -0
  47. data/html/images/find.png +0 -0
  48. data/html/images/loadingAnimation.gif +0 -0
  49. data/html/images/macFFBgHack.png +0 -0
  50. data/html/images/package.png +0 -0
  51. data/html/images/page_green.png +0 -0
  52. data/html/images/page_white_text.png +0 -0
  53. data/html/images/page_white_width.png +0 -0
  54. data/html/images/plugin.png +0 -0
  55. data/html/images/ruby.png +0 -0
  56. data/html/images/tag_blue.png +0 -0
  57. data/html/images/tag_green.png +0 -0
  58. data/html/images/transparent.png +0 -0
  59. data/html/images/wrench.png +0 -0
  60. data/html/images/wrench_orange.png +0 -0
  61. data/html/images/zoom.png +0 -0
  62. data/html/index.html +0 -189
  63. data/html/js/darkfish.js +0 -161
  64. data/html/js/jquery.js +0 -4
  65. data/html/js/navigation.js +0 -142
  66. data/html/js/navigation.js.gz +0 -0
  67. data/html/js/search.js +0 -109
  68. data/html/js/search_index.js +0 -1
  69. data/html/js/search_index.js.gz +0 -0
  70. data/html/js/searcher.js +0 -229
  71. data/html/js/searcher.js.gz +0 -0
  72. data/html/table_of_contents.html +0 -83
@@ -1,115 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>module Spotify - RDoc Documentation</title>
8
-
9
- <script type="text/javascript">
10
- var rdoc_rel_prefix = "./";
11
- var index_rel_prefix = "./";
12
- </script>
13
-
14
- <script src="./js/jquery.js"></script>
15
- <script src="./js/darkfish.js"></script>
16
-
17
- <link href="./css/fonts.css" rel="stylesheet">
18
- <link href="./css/rdoc.css" rel="stylesheet">
19
-
20
-
21
-
22
- <body id="top" role="document" class="module">
23
- <nav role="navigation">
24
- <div id="project-navigation">
25
- <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
- <h2>
27
- <a href="./index.html" rel="home">Home</a>
28
- </h2>
29
-
30
- <div id="table-of-contents-navigation">
31
- <a href="./table_of_contents.html#pages">Pages</a>
32
- <a href="./table_of_contents.html#classes">Classes</a>
33
- <a href="./table_of_contents.html#methods">Methods</a>
34
- </div>
35
- </div>
36
-
37
- <div id="search-section" role="search" class="project-section initially-hidden">
38
- <form action="#" method="get" accept-charset="utf-8">
39
- <div id="search-field-wrapper">
40
- <input id="search-field" role="combobox" aria-label="Search"
41
- aria-autocomplete="list" aria-controls="search-results"
42
- type="text" name="search" placeholder="Search" spellcheck="false"
43
- title="Type to search, Up and Down to navigate, Enter to load">
44
- </div>
45
-
46
- <ul id="search-results" aria-label="Search Results"
47
- aria-busy="false" aria-expanded="false"
48
- aria-atomic="false" class="initially-hidden"></ul>
49
- </form>
50
- </div>
51
-
52
- </div>
53
-
54
-
55
-
56
- <div id="class-metadata">
57
-
58
-
59
-
60
-
61
-
62
- </div>
63
- </nav>
64
-
65
- <main role="main" aria-labelledby="module-Spotify">
66
- <h1 id="module-Spotify" class="module">
67
- module Spotify
68
- </h1>
69
-
70
- <section class="description">
71
-
72
- </section>
73
-
74
-
75
-
76
-
77
- <section id="5Buntitled-5D" class="documentation-section">
78
-
79
-
80
-
81
-
82
-
83
- <section class="constants-list">
84
- <header>
85
- <h3>Constants</h3>
86
- </header>
87
- <dl>
88
-
89
- <dt id="VERSION">VERSION
90
-
91
- <dd><p>The definitive version of spotify-ruby.</p>
92
-
93
- <p>You&#39;ll need to bump this for every change. The rule of thumb is to
94
- update it by one minor version (0.1.0 -&gt; 0.1.1) if there is no breaking
95
- changes or new features. Anything else should constitute a major version
96
- bump (0.1.0 -&gt; 1.0.0)</p>
97
-
98
-
99
- </dl>
100
- </section>
101
-
102
-
103
-
104
-
105
-
106
- </section>
107
- </main>
108
-
109
-
110
- <footer id="validator-badges" role="contentinfo">
111
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
112
- <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
113
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
114
- </footer>
115
-
@@ -1,281 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>class Spotify::Auth - RDoc Documentation</title>
8
-
9
- <script type="text/javascript">
10
- var rdoc_rel_prefix = "../";
11
- var index_rel_prefix = "../";
12
- </script>
13
-
14
- <script src="../js/jquery.js"></script>
15
- <script src="../js/darkfish.js"></script>
16
-
17
- <link href="../css/fonts.css" rel="stylesheet">
18
- <link href="../css/rdoc.css" rel="stylesheet">
19
-
20
-
21
-
22
- <body id="top" role="document" class="class">
23
- <nav role="navigation">
24
- <div id="project-navigation">
25
- <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
- <h2>
27
- <a href="../index.html" rel="home">Home</a>
28
- </h2>
29
-
30
- <div id="table-of-contents-navigation">
31
- <a href="../table_of_contents.html#pages">Pages</a>
32
- <a href="../table_of_contents.html#classes">Classes</a>
33
- <a href="../table_of_contents.html#methods">Methods</a>
34
- </div>
35
- </div>
36
-
37
- <div id="search-section" role="search" class="project-section initially-hidden">
38
- <form action="#" method="get" accept-charset="utf-8">
39
- <div id="search-field-wrapper">
40
- <input id="search-field" role="combobox" aria-label="Search"
41
- aria-autocomplete="list" aria-controls="search-results"
42
- type="text" name="search" placeholder="Search" spellcheck="false"
43
- title="Type to search, Up and Down to navigate, Enter to load">
44
- </div>
45
-
46
- <ul id="search-results" aria-label="Search Results"
47
- aria-busy="false" aria-expanded="false"
48
- aria-atomic="false" class="initially-hidden"></ul>
49
- </form>
50
- </div>
51
-
52
- </div>
53
-
54
-
55
-
56
- <div id="class-metadata">
57
-
58
- <div id="parent-class-section" class="nav-section">
59
- <h3>Parent</h3>
60
-
61
-
62
- <p class="link">OAuth2::Client
63
-
64
- </div>
65
-
66
-
67
-
68
- <!-- Method Quickref -->
69
- <div id="method-list-section" class="nav-section">
70
- <h3>Methods</h3>
71
-
72
- <ul class="link-list" role="directory">
73
-
74
- <li class="calls-super" ><a href="#method-c-new">::new</a>
75
-
76
- <li class="calls-super" ><a href="#method-i-authorize_url">#authorize_url</a>
77
-
78
- </ul>
79
- </div>
80
-
81
- </div>
82
- </nav>
83
-
84
- <main role="main" aria-labelledby="class-Spotify::Auth">
85
- <h1 id="class-Spotify::Auth" class="class">
86
- class Spotify::Auth
87
- </h1>
88
-
89
- <section class="description">
90
-
91
- <p><a href="Auth.html">Spotify::Auth</a> inherits from OAuth2::Client based on
92
- the “oauth-2” gem.</p>
93
-
94
- </section>
95
-
96
-
97
-
98
-
99
- <section id="5Buntitled-5D" class="documentation-section">
100
-
101
-
102
-
103
-
104
-
105
- <section class="constants-list">
106
- <header>
107
- <h3>Constants</h3>
108
- </header>
109
- <dl>
110
-
111
- <dt id="OAUTH_I18N">OAUTH_I18N
112
-
113
- <dd><p>Error-related translations we&#39;re using.</p>
114
-
115
-
116
- <dt id="SCOPES">SCOPES
117
-
118
- <dd><p>An entire list of Spotify&#39;s OAuth scopes. Stored in the form of a
119
- symbolized array. Example: `[:scope1, :scope2]`</p>
120
-
121
- <p>@see <a
122
- href="https://developer.spotify.com/web-api/using-scopes">developer.spotify.com/web-api/using-scopes</a>/</p>
123
-
124
- <p>Last updated: 21 October 2017</p>
125
-
126
-
127
- </dl>
128
- </section>
129
-
130
-
131
-
132
-
133
-
134
- <section id="public-class-5Buntitled-5D-method-details" class="method-section">
135
- <header>
136
- <h3>Public Class Methods</h3>
137
- </header>
138
-
139
-
140
- <div id="method-c-new" class="method-detail ">
141
-
142
- <div class="method-heading">
143
- <span class="method-name">new</span><span
144
- class="method-args">(config)</span>
145
-
146
- <span class="method-click-advice">click to toggle source</span>
147
-
148
- </div>
149
-
150
-
151
- <div class="method-description">
152
-
153
- <p>Initialize the <a href="../Spotify.html">Spotify</a> <a
154
- href="Auth.html">Auth</a> object.</p>
155
-
156
- <p>@example</p>
157
-
158
- <pre class="ruby"><span class="ruby-ivar">@auth</span> = <span class="ruby-constant">Spotify</span><span class="ruby-operator">::</span><span class="ruby-constant">Auth</span>.<span class="ruby-identifier">new</span>({
159
- <span class="ruby-identifier">client_id</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;[client id goes here]&quot;</span>,
160
- <span class="ruby-identifier">client_secret</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;[client secret goes here]&quot;</span>,
161
- <span class="ruby-identifier">redirect_uri</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;http://localhost&quot;</span>
162
- })
163
- </pre>
164
-
165
- <p>@param [Hash] config OAuth configuration containing the Client ID, secret
166
- and redirect URL. The redirect URL can be overriden later.</p>
167
-
168
- <p>@see <a
169
- href="https://developer.spotify.com/my-applications">developer.spotify.com/my-applications</a>/</p>
170
-
171
-
172
- <div class="method-calls-super">
173
- Calls superclass method
174
-
175
- </div>
176
-
177
-
178
-
179
- <div class="method-source-code" id="new-source">
180
- <pre><span class="ruby-comment"># File lib/spotify/auth.rb, line 53</span>
181
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">config</span>)
182
- <span class="ruby-identifier">opts</span> = {
183
- <span class="ruby-identifier">site</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;https://api.spotify.com&quot;</span>,
184
- <span class="ruby-identifier">authorize_url</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;https://accounts.spotify.com/oauth/authorize&quot;</span>
185
- }
186
- <span class="ruby-identifier">validate_initialized_input</span>(<span class="ruby-identifier">config</span>)
187
- <span class="ruby-ivar">@redirect_uri</span> = <span class="ruby-identifier">config</span>[<span class="ruby-value">:redirect_uri</span>]
188
- <span class="ruby-keyword">super</span>(<span class="ruby-identifier">config</span>[<span class="ruby-value">:client_id</span>], <span class="ruby-identifier">config</span>[<span class="ruby-value">:client_secret</span>], <span class="ruby-identifier">opts</span>)
189
- <span class="ruby-keyword">end</span></pre>
190
- </div>
191
-
192
- </div>
193
-
194
-
195
-
196
-
197
- </div>
198
-
199
-
200
- </section>
201
-
202
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
203
- <header>
204
- <h3>Public Instance Methods</h3>
205
- </header>
206
-
207
-
208
- <div id="method-i-authorize_url" class="method-detail ">
209
-
210
- <div class="method-heading">
211
- <span class="method-name">authorize_url</span><span
212
- class="method-args">(override_params={})</span>
213
-
214
- <span class="method-click-advice">click to toggle source</span>
215
-
216
- </div>
217
-
218
-
219
- <div class="method-description">
220
-
221
- <p>Get a HTTP URL to send user for authorizing with <a
222
- href="../Spotify.html">Spotify</a>.</p>
223
-
224
- <p>@example</p>
225
-
226
- <pre class="ruby"><span class="ruby-ivar">@auth</span> = <span class="ruby-constant">Spotify</span><span class="ruby-operator">::</span><span class="ruby-constant">Auth</span>.<span class="ruby-identifier">new</span>({
227
- <span class="ruby-identifier">client_id</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;[client id goes here]&quot;</span>,
228
- <span class="ruby-identifier">client_secret</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;[client secret goes here]&quot;</span>,
229
- <span class="ruby-identifier">redirect_uri</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;http://localhost&quot;</span>
230
- })
231
-
232
- <span class="ruby-ivar">@auth</span>.<span class="ruby-identifier">authorize_url</span>
233
- </pre>
234
-
235
- <p>@param [Hash] override_params Optional hash containing any overriding
236
- values for parameters. Parameters used are client_id, redirect_uri,
237
- response_type and scope.</p>
238
-
239
- <p>@see <a
240
- href="https://developer.spotify.com/web-api/authorization-guide">developer.spotify.com/web-api/authorization-guide</a>/</p>
241
-
242
-
243
- <div class="method-calls-super">
244
- Calls superclass method
245
-
246
- </div>
247
-
248
-
249
-
250
- <div class="method-source-code" id="authorize_url-source">
251
- <pre><span class="ruby-comment"># File lib/spotify/auth.rb, line 81</span>
252
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">authorize_url</span>(<span class="ruby-identifier">override_params</span>={})
253
- <span class="ruby-keyword">super</span>({
254
- <span class="ruby-identifier">client_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">id</span>,
255
- <span class="ruby-identifier">redirect_uri</span><span class="ruby-operator">:</span> <span class="ruby-identifier">redirect_uri</span>,
256
- <span class="ruby-identifier">response_type</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;code&quot;</span>,
257
- <span class="ruby-identifier">scope</span><span class="ruby-operator">:</span> <span class="ruby-constant">SCOPES</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot; &quot;</span>)
258
- }.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">override_params</span>))
259
- <span class="ruby-keyword">end</span></pre>
260
- </div>
261
-
262
- </div>
263
-
264
-
265
-
266
-
267
- </div>
268
-
269
-
270
- </section>
271
-
272
- </section>
273
- </main>
274
-
275
-
276
- <footer id="validator-badges" role="contentinfo">
277
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
278
- <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
279
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
280
- </footer>
281
-
@@ -1,103 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>class Spotify::Errors - RDoc Documentation</title>
8
-
9
- <script type="text/javascript">
10
- var rdoc_rel_prefix = "../";
11
- var index_rel_prefix = "../";
12
- </script>
13
-
14
- <script src="../js/jquery.js"></script>
15
- <script src="../js/darkfish.js"></script>
16
-
17
- <link href="../css/fonts.css" rel="stylesheet">
18
- <link href="../css/rdoc.css" rel="stylesheet">
19
-
20
-
21
-
22
- <body id="top" role="document" class="class">
23
- <nav role="navigation">
24
- <div id="project-navigation">
25
- <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
- <h2>
27
- <a href="../index.html" rel="home">Home</a>
28
- </h2>
29
-
30
- <div id="table-of-contents-navigation">
31
- <a href="../table_of_contents.html#pages">Pages</a>
32
- <a href="../table_of_contents.html#classes">Classes</a>
33
- <a href="../table_of_contents.html#methods">Methods</a>
34
- </div>
35
- </div>
36
-
37
- <div id="search-section" role="search" class="project-section initially-hidden">
38
- <form action="#" method="get" accept-charset="utf-8">
39
- <div id="search-field-wrapper">
40
- <input id="search-field" role="combobox" aria-label="Search"
41
- aria-autocomplete="list" aria-controls="search-results"
42
- type="text" name="search" placeholder="Search" spellcheck="false"
43
- title="Type to search, Up and Down to navigate, Enter to load">
44
- </div>
45
-
46
- <ul id="search-results" aria-label="Search Results"
47
- aria-busy="false" aria-expanded="false"
48
- aria-atomic="false" class="initially-hidden"></ul>
49
- </form>
50
- </div>
51
-
52
- </div>
53
-
54
-
55
-
56
- <div id="class-metadata">
57
-
58
- <div id="parent-class-section" class="nav-section">
59
- <h3>Parent</h3>
60
-
61
-
62
- <p class="link">Object
63
-
64
- </div>
65
-
66
-
67
-
68
-
69
- </div>
70
- </nav>
71
-
72
- <main role="main" aria-labelledby="class-Spotify::Errors">
73
- <h1 id="class-Spotify::Errors" class="class">
74
- class Spotify::Errors
75
- </h1>
76
-
77
- <section class="description">
78
-
79
- </section>
80
-
81
-
82
-
83
-
84
- <section id="5Buntitled-5D" class="documentation-section">
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
- </section>
95
- </main>
96
-
97
-
98
- <footer id="validator-badges" role="contentinfo">
99
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
100
- <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
101
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
102
- </footer>
103
-