tidal 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/README.md +164 -9
- data/Rakefile +9 -0
- data/docs/README_md.html +299 -0
- data/docs/Tidal/ClientV1.html +721 -0
- data/docs/Tidal/Error.html +97 -0
- data/docs/Tidal.html +100 -0
- data/docs/created.rid +5 -0
- data/docs/css/fonts.css +167 -0
- data/docs/css/rdoc.css +687 -0
- data/docs/fonts/Lato-Light.ttf +0 -0
- data/docs/fonts/Lato-LightItalic.ttf +0 -0
- data/docs/fonts/Lato-Regular.ttf +0 -0
- data/docs/fonts/Lato-RegularItalic.ttf +0 -0
- data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
- data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
- data/docs/images/add.png +0 -0
- data/docs/images/arrow_up.png +0 -0
- data/docs/images/brick.png +0 -0
- data/docs/images/brick_link.png +0 -0
- data/docs/images/bug.png +0 -0
- data/docs/images/bullet_black.png +0 -0
- data/docs/images/bullet_toggle_minus.png +0 -0
- data/docs/images/bullet_toggle_plus.png +0 -0
- data/docs/images/date.png +0 -0
- data/docs/images/delete.png +0 -0
- data/docs/images/find.png +0 -0
- data/docs/images/loadingAnimation.gif +0 -0
- data/docs/images/macFFBgHack.png +0 -0
- data/docs/images/package.png +0 -0
- data/docs/images/page_green.png +0 -0
- data/docs/images/page_white_text.png +0 -0
- data/docs/images/page_white_width.png +0 -0
- data/docs/images/plugin.png +0 -0
- data/docs/images/ruby.png +0 -0
- data/docs/images/tag_blue.png +0 -0
- data/docs/images/tag_green.png +0 -0
- data/docs/images/transparent.png +0 -0
- data/docs/images/wrench.png +0 -0
- data/docs/images/wrench_orange.png +0 -0
- data/docs/images/zoom.png +0 -0
- data/docs/index.html +259 -0
- data/docs/js/darkfish.js +97 -0
- data/docs/js/navigation.js +105 -0
- data/docs/js/navigation.js.gz +0 -0
- data/docs/js/search.js +110 -0
- data/docs/js/search_index.js +1 -0
- data/docs/js/search_index.js.gz +0 -0
- data/docs/js/searcher.js +229 -0
- data/docs/js/searcher.js.gz +0 -0
- data/docs/table_of_contents.html +176 -0
- data/lib/tidal/client_v1.rb +111 -1
- data/lib/tidal/version.rb +1 -1
- metadata +63 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed7e3b787d27140ad313648d3bbb8d1a835e65bd81a67052e92c2b2cdc3642cd
|
4
|
+
data.tar.gz: 4608fac037cc5a9b575fbfdb17502230eec659314e6c00412e1a0579b1a3f296
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e058601f2084e2c29370d643a2989c62b8f8b791b2cd45f4bf3a0640a5a000717d9780cef31878e7d5de1f96e6d4c9000223e282cb65df79107e27790a717415
|
7
|
+
data.tar.gz: 5c1bde413061bd94d9459543cf542fa5e80a4719561d2f68d9210ad07e48790b4d6685c6091ab42730b34ff36b078730425523e163e6a31d437191158180e024
|
data/README.md
CHANGED
@@ -1,24 +1,179 @@
|
|
1
|
+
|
1
2
|
# Tidal
|
2
3
|
|
3
|
-
|
4
|
+
A Ruby wrapper to interact with the Tidal API. This gem provides a Ruby wrapper around the Tidal API, allowing developers to easily interact with Tidal's services, including retrieving album and artist information, searching for tracks, and more.
|
4
5
|
|
5
|
-
|
6
|
+

|
6
7
|
|
7
8
|
## Installation
|
8
9
|
|
9
|
-
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'tidal'
|
14
|
+
```
|
10
15
|
|
11
|
-
|
16
|
+
And then execute:
|
12
17
|
|
13
|
-
|
18
|
+
```sh
|
19
|
+
$ bundle install
|
20
|
+
```
|
14
21
|
|
15
|
-
|
22
|
+
Or install it yourself as:
|
16
23
|
|
17
|
-
|
24
|
+
```sh
|
25
|
+
$ gem install tidal
|
26
|
+
```
|
18
27
|
|
19
28
|
## Usage
|
20
29
|
|
21
|
-
|
30
|
+
### Configuration
|
31
|
+
|
32
|
+
First, you need to initialize the client with your Tidal API credentials.
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
require 'tidal'
|
36
|
+
|
37
|
+
client_id = 'your_client_id'
|
38
|
+
client_secret = 'your_client_secret'
|
39
|
+
client = Tidal::ClientV1.new(client_id, client_secret)
|
40
|
+
```
|
41
|
+
|
42
|
+
### Fetch Albums by Barcode ID
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
barcode_id = '123456789'
|
46
|
+
country_code = 'US'
|
47
|
+
albums = client.get_albums_by_barcode_id(barcode_id, country_code)
|
48
|
+
```
|
49
|
+
|
50
|
+
### Fetch Multiple Albums by IDs
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
album_ids = ['123', '456', '789']
|
54
|
+
country_code = 'US'
|
55
|
+
albums = client.get_multiple_albums(album_ids, country_code)
|
56
|
+
```
|
57
|
+
|
58
|
+
### Fetch Album Items
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
album_id = '123'
|
62
|
+
country_code = 'US'
|
63
|
+
items = client.get_album_items(album_id, country_code)
|
64
|
+
```
|
65
|
+
|
66
|
+
### Fetch Similar Albums
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
album_id = '123'
|
70
|
+
country_code = 'US'
|
71
|
+
similar_albums = client.get_similar_albums(album_id, country_code)
|
72
|
+
```
|
73
|
+
|
74
|
+
### Fetch Single Album
|
75
|
+
|
76
|
+
```ruby
|
77
|
+
album_id = '123'
|
78
|
+
country_code = 'US'
|
79
|
+
album = client.get_single_album(album_id, country_code)
|
80
|
+
```
|
81
|
+
|
82
|
+
### Fetch Albums by Artist
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
artist_id = '1234'
|
86
|
+
country_code = 'US'
|
87
|
+
albums = client.get_albums_by_artist(artist_id, country_code)
|
88
|
+
```
|
89
|
+
|
90
|
+
### Fetch Multiple Artists by IDs
|
91
|
+
|
92
|
+
```ruby
|
93
|
+
artist_ids = ['123', '456', '789']
|
94
|
+
country_code = 'US'
|
95
|
+
artists = client.get_multiple_artists(artist_ids, country_code)
|
96
|
+
```
|
97
|
+
|
98
|
+
### Fetch Similar Artists
|
99
|
+
|
100
|
+
```ruby
|
101
|
+
artist_id = '1234'
|
102
|
+
country_code = 'US'
|
103
|
+
similar_artists = client.get_similar_artists(artist_id, country_code)
|
104
|
+
```
|
105
|
+
|
106
|
+
### Fetch Single Artist
|
107
|
+
|
108
|
+
```ruby
|
109
|
+
artist_id = '1234'
|
110
|
+
country_code = 'US'
|
111
|
+
artist = client.get_single_artist(artist_id, country_code)
|
112
|
+
```
|
113
|
+
|
114
|
+
### Fetch Tracks by Artist
|
115
|
+
|
116
|
+
```ruby
|
117
|
+
artist_id = '1234'
|
118
|
+
country_code = 'US'
|
119
|
+
tracks = client.get_tracks_by_artist(artist_id, country_code)
|
120
|
+
```
|
121
|
+
|
122
|
+
### Fetch Multiple Tracks by IDs
|
123
|
+
|
124
|
+
```ruby
|
125
|
+
track_ids = ['123', '456', '789']
|
126
|
+
country_code = 'US'
|
127
|
+
tracks = client.get_multiple_tracks(track_ids, country_code)
|
128
|
+
```
|
129
|
+
|
130
|
+
### Fetch Tracks by ISRC
|
131
|
+
|
132
|
+
```ruby
|
133
|
+
isrc = 'US1234567890'
|
134
|
+
country_code = 'US'
|
135
|
+
tracks = client.get_tracks_by_isrc(isrc, country_code)
|
136
|
+
```
|
137
|
+
|
138
|
+
### Fetch Single Track
|
139
|
+
|
140
|
+
```ruby
|
141
|
+
track_id = '1234'
|
142
|
+
country_code = 'US'
|
143
|
+
track = client.get_single_track(track_id, country_code)
|
144
|
+
```
|
145
|
+
|
146
|
+
### Fetch Similar Tracks
|
147
|
+
|
148
|
+
```ruby
|
149
|
+
track_id = '1234'
|
150
|
+
country_code = 'US'
|
151
|
+
similar_tracks = client.get_similar_tracks(track_id, country_code)
|
152
|
+
```
|
153
|
+
|
154
|
+
### Fetch Multiple Videos by IDs
|
155
|
+
|
156
|
+
```ruby
|
157
|
+
video_ids = ['123', '456', '789']
|
158
|
+
country_code = 'US'
|
159
|
+
videos = client.get_multiple_videos(video_ids, country_code)
|
160
|
+
```
|
161
|
+
|
162
|
+
### Fetch Single Video
|
163
|
+
|
164
|
+
```ruby
|
165
|
+
video_id = '1234'
|
166
|
+
country_code = 'US'
|
167
|
+
video = client.get_single_video(video_id, country_code)
|
168
|
+
```
|
169
|
+
|
170
|
+
### Search
|
171
|
+
|
172
|
+
```ruby
|
173
|
+
query = 'Shape of You'
|
174
|
+
country_code = 'US'
|
175
|
+
search_results = client.get_search(query, country_code)
|
176
|
+
```
|
22
177
|
|
23
178
|
## Development
|
24
179
|
|
@@ -32,4 +187,4 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
|
|
32
187
|
|
33
188
|
## License
|
34
189
|
|
35
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
190
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
CHANGED
@@ -2,7 +2,16 @@
|
|
2
2
|
|
3
3
|
require "bundler/gem_tasks"
|
4
4
|
require "rspec/core/rake_task"
|
5
|
+
require 'rdoc/task'
|
5
6
|
|
6
7
|
RSpec::Core::RakeTask.new(:spec)
|
7
8
|
|
9
|
+
RDoc::Task.new do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'docs'
|
11
|
+
rdoc.title = 'Tidal API Client Documentation'
|
12
|
+
rdoc.options = ['--main', 'README.md']
|
13
|
+
rdoc.rdoc_files.include('README.md', 'lib/**/*.rb')
|
14
|
+
end
|
15
|
+
|
16
|
+
|
8
17
|
task default: :spec
|
data/docs/README_md.html
ADDED
@@ -0,0 +1,299 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>README - Tidal API Client 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/navigation.js" defer></script>
|
15
|
+
<script src="./js/search.js" defer></script>
|
16
|
+
<script src="./js/search_index.js" defer></script>
|
17
|
+
<script src="./js/searcher.js" defer></script>
|
18
|
+
<script src="./js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="file">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="./index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
<div class="nav-section">
|
58
|
+
<h3>Table of Contents</h3>
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
<ul class="link-list" role="directory">
|
63
|
+
<li>
|
64
|
+
<details open>
|
65
|
+
<summary> <a href="#label-Tidal">Tidal</a>
|
66
|
+
</summary>
|
67
|
+
<ul class="link-list" role="directory">
|
68
|
+
<li> <a href="#label-Installation">Installation</a>
|
69
|
+
<li>
|
70
|
+
<details open>
|
71
|
+
<summary> <a href="#label-Usage">Usage</a>
|
72
|
+
</summary>
|
73
|
+
<ul class="link-list" role="directory">
|
74
|
+
<li> <a href="#label-Configuration">Configuration</a>
|
75
|
+
<li> <a href="#label-Fetch+Albums+by+Barcode+ID">Fetch Albums by Barcode ID</a>
|
76
|
+
<li> <a href="#label-Fetch+Multiple+Albums+by+IDs">Fetch Multiple Albums by IDs</a>
|
77
|
+
<li> <a href="#label-Fetch+Album+Items">Fetch Album Items</a>
|
78
|
+
<li> <a href="#label-Fetch+Similar+Albums">Fetch Similar Albums</a>
|
79
|
+
<li> <a href="#label-Fetch+Single+Album">Fetch Single Album</a>
|
80
|
+
<li> <a href="#label-Fetch+Albums+by+Artist">Fetch Albums by Artist</a>
|
81
|
+
<li> <a href="#label-Fetch+Multiple+Artists+by+IDs">Fetch Multiple Artists by IDs</a>
|
82
|
+
<li> <a href="#label-Fetch+Similar+Artists">Fetch Similar Artists</a>
|
83
|
+
<li> <a href="#label-Fetch+Single+Artist">Fetch Single Artist</a>
|
84
|
+
<li> <a href="#label-Fetch+Tracks+by+Artist">Fetch Tracks by Artist</a>
|
85
|
+
<li> <a href="#label-Fetch+Multiple+Tracks+by+IDs">Fetch Multiple Tracks by IDs</a>
|
86
|
+
<li> <a href="#label-Fetch+Tracks+by+ISRC">Fetch Tracks by ISRC</a>
|
87
|
+
<li> <a href="#label-Fetch+Single+Track">Fetch Single Track</a>
|
88
|
+
<li> <a href="#label-Fetch+Similar+Tracks">Fetch Similar Tracks</a>
|
89
|
+
<li> <a href="#label-Fetch+Multiple+Videos+by+IDs">Fetch Multiple Videos by IDs</a>
|
90
|
+
<li> <a href="#label-Fetch+Single+Video">Fetch Single Video</a>
|
91
|
+
<li> <a href="#label-Search">Search</a>
|
92
|
+
|
93
|
+
</ul>
|
94
|
+
</details>
|
95
|
+
</li>
|
96
|
+
<li> <a href="#label-Development">Development</a>
|
97
|
+
<li> <a href="#label-Contributing">Contributing</a>
|
98
|
+
<li> <a href="#label-License">License</a>
|
99
|
+
|
100
|
+
</ul>
|
101
|
+
</details>
|
102
|
+
</li>
|
103
|
+
|
104
|
+
</ul>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
|
108
|
+
<div id="project-metadata">
|
109
|
+
|
110
|
+
<div id="fileindex-section" class="nav-section">
|
111
|
+
<h3>Pages</h3>
|
112
|
+
|
113
|
+
<ul class="link-list">
|
114
|
+
<li><a href="./README_md.html">README</a>
|
115
|
+
</ul>
|
116
|
+
</div>
|
117
|
+
|
118
|
+
</div>
|
119
|
+
</nav>
|
120
|
+
|
121
|
+
<main role="main" aria-label="Page README.md">
|
122
|
+
|
123
|
+
<h1 id="label-Tidal"><a href="Tidal.html"><code>Tidal</code></a><span><a href="#label-Tidal">¶</a> <a href="#top">↑</a></span></h1>
|
124
|
+
|
125
|
+
<p>A Ruby wrapper to interact with the <a href="Tidal.html"><code>Tidal</code></a> API. This gem provides a Ruby wrapper around the <a href="Tidal.html"><code>Tidal</code></a> API, allowing developers to easily interact with Tidal’s services, including retrieving album and artist information, searching for tracks, and more.</p>
|
126
|
+
|
127
|
+
<p><img src="https://badge.fury.io/rb/tidal.svg"></p>
|
128
|
+
|
129
|
+
<h2 id="label-Installation">Installation<span><a href="#label-Installation">¶</a> <a href="#top">↑</a></span></h2>
|
130
|
+
|
131
|
+
<p>Add this line to your application’s Gemfile:</p>
|
132
|
+
|
133
|
+
<pre class="ruby"><span class="ruby-identifier">gem</span> <span class="ruby-string">'tidal'</span>
|
134
|
+
</pre>
|
135
|
+
|
136
|
+
<p>And then execute:</p>
|
137
|
+
|
138
|
+
<pre>$ bundle install</pre>
|
139
|
+
|
140
|
+
<p>Or install it yourself as:</p>
|
141
|
+
|
142
|
+
<pre>$ gem install tidal</pre>
|
143
|
+
|
144
|
+
<h2 id="label-Usage">Usage<span><a href="#label-Usage">¶</a> <a href="#top">↑</a></span></h2>
|
145
|
+
|
146
|
+
<h3 id="label-Configuration">Configuration<span><a href="#label-Configuration">¶</a> <a href="#top">↑</a></span></h3>
|
147
|
+
|
148
|
+
<p>First, you need to initialize the client with your <a href="Tidal.html"><code>Tidal</code></a> API credentials.</p>
|
149
|
+
|
150
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'tidal'</span>
|
151
|
+
|
152
|
+
<span class="ruby-identifier">client_id</span> = <span class="ruby-string">'your_client_id'</span>
|
153
|
+
<span class="ruby-identifier">client_secret</span> = <span class="ruby-string">'your_client_secret'</span>
|
154
|
+
<span class="ruby-identifier">client</span> = <span class="ruby-constant">Tidal</span><span class="ruby-operator">::</span><span class="ruby-constant">ClientV1</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">client_id</span>, <span class="ruby-identifier">client_secret</span>)
|
155
|
+
</pre>
|
156
|
+
|
157
|
+
<h3 id="label-Fetch+Albums+by+Barcode+ID">Fetch Albums by Barcode ID<span><a href="#label-Fetch+Albums+by+Barcode+ID">¶</a> <a href="#top">↑</a></span></h3>
|
158
|
+
|
159
|
+
<pre class="ruby"><span class="ruby-identifier">barcode_id</span> = <span class="ruby-string">'123456789'</span>
|
160
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
161
|
+
<span class="ruby-identifier">albums</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_albums_by_barcode_id</span>(<span class="ruby-identifier">barcode_id</span>, <span class="ruby-identifier">country_code</span>)
|
162
|
+
</pre>
|
163
|
+
|
164
|
+
<h3 id="label-Fetch+Multiple+Albums+by+IDs">Fetch Multiple Albums by IDs<span><a href="#label-Fetch+Multiple+Albums+by+IDs">¶</a> <a href="#top">↑</a></span></h3>
|
165
|
+
|
166
|
+
<pre class="ruby"><span class="ruby-identifier">album_ids</span> = [<span class="ruby-string">'123'</span>, <span class="ruby-string">'456'</span>, <span class="ruby-string">'789'</span>]
|
167
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
168
|
+
<span class="ruby-identifier">albums</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_multiple_albums</span>(<span class="ruby-identifier">album_ids</span>, <span class="ruby-identifier">country_code</span>)
|
169
|
+
</pre>
|
170
|
+
|
171
|
+
<h3 id="label-Fetch+Album+Items">Fetch Album Items<span><a href="#label-Fetch+Album+Items">¶</a> <a href="#top">↑</a></span></h3>
|
172
|
+
|
173
|
+
<pre class="ruby"><span class="ruby-identifier">album_id</span> = <span class="ruby-string">'123'</span>
|
174
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
175
|
+
<span class="ruby-identifier">items</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_album_items</span>(<span class="ruby-identifier">album_id</span>, <span class="ruby-identifier">country_code</span>)
|
176
|
+
</pre>
|
177
|
+
|
178
|
+
<h3 id="label-Fetch+Similar+Albums">Fetch Similar Albums<span><a href="#label-Fetch+Similar+Albums">¶</a> <a href="#top">↑</a></span></h3>
|
179
|
+
|
180
|
+
<pre class="ruby"><span class="ruby-identifier">album_id</span> = <span class="ruby-string">'123'</span>
|
181
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
182
|
+
<span class="ruby-identifier">similar_albums</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_similar_albums</span>(<span class="ruby-identifier">album_id</span>, <span class="ruby-identifier">country_code</span>)
|
183
|
+
</pre>
|
184
|
+
|
185
|
+
<h3 id="label-Fetch+Single+Album">Fetch Single Album<span><a href="#label-Fetch+Single+Album">¶</a> <a href="#top">↑</a></span></h3>
|
186
|
+
|
187
|
+
<pre class="ruby"><span class="ruby-identifier">album_id</span> = <span class="ruby-string">'123'</span>
|
188
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
189
|
+
<span class="ruby-identifier">album</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_single_album</span>(<span class="ruby-identifier">album_id</span>, <span class="ruby-identifier">country_code</span>)
|
190
|
+
</pre>
|
191
|
+
|
192
|
+
<h3 id="label-Fetch+Albums+by+Artist">Fetch Albums by Artist<span><a href="#label-Fetch+Albums+by+Artist">¶</a> <a href="#top">↑</a></span></h3>
|
193
|
+
|
194
|
+
<pre class="ruby"><span class="ruby-identifier">artist_id</span> = <span class="ruby-string">'1234'</span>
|
195
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
196
|
+
<span class="ruby-identifier">albums</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_albums_by_artist</span>(<span class="ruby-identifier">artist_id</span>, <span class="ruby-identifier">country_code</span>)
|
197
|
+
</pre>
|
198
|
+
|
199
|
+
<h3 id="label-Fetch+Multiple+Artists+by+IDs">Fetch Multiple Artists by IDs<span><a href="#label-Fetch+Multiple+Artists+by+IDs">¶</a> <a href="#top">↑</a></span></h3>
|
200
|
+
|
201
|
+
<pre class="ruby"><span class="ruby-identifier">artist_ids</span> = [<span class="ruby-string">'123'</span>, <span class="ruby-string">'456'</span>, <span class="ruby-string">'789'</span>]
|
202
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
203
|
+
<span class="ruby-identifier">artists</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_multiple_artists</span>(<span class="ruby-identifier">artist_ids</span>, <span class="ruby-identifier">country_code</span>)
|
204
|
+
</pre>
|
205
|
+
|
206
|
+
<h3 id="label-Fetch+Similar+Artists">Fetch Similar Artists<span><a href="#label-Fetch+Similar+Artists">¶</a> <a href="#top">↑</a></span></h3>
|
207
|
+
|
208
|
+
<pre class="ruby"><span class="ruby-identifier">artist_id</span> = <span class="ruby-string">'1234'</span>
|
209
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
210
|
+
<span class="ruby-identifier">similar_artists</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_similar_artists</span>(<span class="ruby-identifier">artist_id</span>, <span class="ruby-identifier">country_code</span>)
|
211
|
+
</pre>
|
212
|
+
|
213
|
+
<h3 id="label-Fetch+Single+Artist">Fetch Single Artist<span><a href="#label-Fetch+Single+Artist">¶</a> <a href="#top">↑</a></span></h3>
|
214
|
+
|
215
|
+
<pre class="ruby"><span class="ruby-identifier">artist_id</span> = <span class="ruby-string">'1234'</span>
|
216
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
217
|
+
<span class="ruby-identifier">artist</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_single_artist</span>(<span class="ruby-identifier">artist_id</span>, <span class="ruby-identifier">country_code</span>)
|
218
|
+
</pre>
|
219
|
+
|
220
|
+
<h3 id="label-Fetch+Tracks+by+Artist">Fetch Tracks by Artist<span><a href="#label-Fetch+Tracks+by+Artist">¶</a> <a href="#top">↑</a></span></h3>
|
221
|
+
|
222
|
+
<pre class="ruby"><span class="ruby-identifier">artist_id</span> = <span class="ruby-string">'1234'</span>
|
223
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
224
|
+
<span class="ruby-identifier">tracks</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_tracks_by_artist</span>(<span class="ruby-identifier">artist_id</span>, <span class="ruby-identifier">country_code</span>)
|
225
|
+
</pre>
|
226
|
+
|
227
|
+
<h3 id="label-Fetch+Multiple+Tracks+by+IDs">Fetch Multiple Tracks by IDs<span><a href="#label-Fetch+Multiple+Tracks+by+IDs">¶</a> <a href="#top">↑</a></span></h3>
|
228
|
+
|
229
|
+
<pre class="ruby"><span class="ruby-identifier">track_ids</span> = [<span class="ruby-string">'123'</span>, <span class="ruby-string">'456'</span>, <span class="ruby-string">'789'</span>]
|
230
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
231
|
+
<span class="ruby-identifier">tracks</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_multiple_tracks</span>(<span class="ruby-identifier">track_ids</span>, <span class="ruby-identifier">country_code</span>)
|
232
|
+
</pre>
|
233
|
+
|
234
|
+
<h3 id="label-Fetch+Tracks+by+ISRC">Fetch Tracks by ISRC<span><a href="#label-Fetch+Tracks+by+ISRC">¶</a> <a href="#top">↑</a></span></h3>
|
235
|
+
|
236
|
+
<pre class="ruby"><span class="ruby-identifier">isrc</span> = <span class="ruby-string">'US1234567890'</span>
|
237
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
238
|
+
<span class="ruby-identifier">tracks</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_tracks_by_isrc</span>(<span class="ruby-identifier">isrc</span>, <span class="ruby-identifier">country_code</span>)
|
239
|
+
</pre>
|
240
|
+
|
241
|
+
<h3 id="label-Fetch+Single+Track">Fetch Single Track<span><a href="#label-Fetch+Single+Track">¶</a> <a href="#top">↑</a></span></h3>
|
242
|
+
|
243
|
+
<pre class="ruby"><span class="ruby-identifier">track_id</span> = <span class="ruby-string">'1234'</span>
|
244
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
245
|
+
<span class="ruby-identifier">track</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_single_track</span>(<span class="ruby-identifier">track_id</span>, <span class="ruby-identifier">country_code</span>)
|
246
|
+
</pre>
|
247
|
+
|
248
|
+
<h3 id="label-Fetch+Similar+Tracks">Fetch Similar Tracks<span><a href="#label-Fetch+Similar+Tracks">¶</a> <a href="#top">↑</a></span></h3>
|
249
|
+
|
250
|
+
<pre class="ruby"><span class="ruby-identifier">track_id</span> = <span class="ruby-string">'1234'</span>
|
251
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
252
|
+
<span class="ruby-identifier">similar_tracks</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_similar_tracks</span>(<span class="ruby-identifier">track_id</span>, <span class="ruby-identifier">country_code</span>)
|
253
|
+
</pre>
|
254
|
+
|
255
|
+
<h3 id="label-Fetch+Multiple+Videos+by+IDs">Fetch Multiple Videos by IDs<span><a href="#label-Fetch+Multiple+Videos+by+IDs">¶</a> <a href="#top">↑</a></span></h3>
|
256
|
+
|
257
|
+
<pre class="ruby"><span class="ruby-identifier">video_ids</span> = [<span class="ruby-string">'123'</span>, <span class="ruby-string">'456'</span>, <span class="ruby-string">'789'</span>]
|
258
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
259
|
+
<span class="ruby-identifier">videos</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_multiple_videos</span>(<span class="ruby-identifier">video_ids</span>, <span class="ruby-identifier">country_code</span>)
|
260
|
+
</pre>
|
261
|
+
|
262
|
+
<h3 id="label-Fetch+Single+Video">Fetch Single Video<span><a href="#label-Fetch+Single+Video">¶</a> <a href="#top">↑</a></span></h3>
|
263
|
+
|
264
|
+
<pre class="ruby"><span class="ruby-identifier">video_id</span> = <span class="ruby-string">'1234'</span>
|
265
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
266
|
+
<span class="ruby-identifier">video</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_single_video</span>(<span class="ruby-identifier">video_id</span>, <span class="ruby-identifier">country_code</span>)
|
267
|
+
</pre>
|
268
|
+
|
269
|
+
<h3 id="label-Search">Search<span><a href="#label-Search">¶</a> <a href="#top">↑</a></span></h3>
|
270
|
+
|
271
|
+
<pre class="ruby"><span class="ruby-identifier">query</span> = <span class="ruby-string">'Shape of You'</span>
|
272
|
+
<span class="ruby-identifier">country_code</span> = <span class="ruby-string">'US'</span>
|
273
|
+
<span class="ruby-identifier">search_results</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">get_search</span>(<span class="ruby-identifier">query</span>, <span class="ruby-identifier">country_code</span>)
|
274
|
+
</pre>
|
275
|
+
|
276
|
+
<h2 id="label-Development">Development<span><a href="#label-Development">¶</a> <a href="#top">↑</a></span></h2>
|
277
|
+
|
278
|
+
<p>After checking out the repo, run <code>bin/setup</code> to install dependencies. Then, run <code>rake spec</code> to run the tests. You can also run <code>bin/console</code> for an interactive prompt that will allow you to experiment.</p>
|
279
|
+
|
280
|
+
<p>To install this gem onto your local machine, run <code>bundle exec rake install</code>. To release a new version, update the version number in <code>version.rb</code>, and then run <code>bundle exec rake release</code>, which will create a git tag for the version, push git commits and the created tag, and push the <code>.gem</code> file to <a href="https://rubygems.org">rubygems.org</a>.</p>
|
281
|
+
|
282
|
+
<h2 id="label-Contributing">Contributing<span><a href="#label-Contributing">¶</a> <a href="#top">↑</a></span></h2>
|
283
|
+
|
284
|
+
<p>Bug reports and pull requests are welcome on GitHub at <a href="https://github.com/[USERNAME]/tidal">github.com/[USERNAME]/tidal</a>.</p>
|
285
|
+
|
286
|
+
<h2 id="label-License">License<span><a href="#label-License">¶</a> <a href="#top">↑</a></span></h2>
|
287
|
+
|
288
|
+
<p>The gem is available as open source under the terms of the <a href="https://opensource.org/licenses/MIT">MIT License</a>.</p>
|
289
|
+
|
290
|
+
</main>
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
<footer id="validator-badges" role="contentinfo">
|
295
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
296
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.7.0.
|
297
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
298
|
+
</footer>
|
299
|
+
|