spof 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +38 -0
- data/lib/spof/version.rb +1 -1
- data/spof.gemspec +23 -23
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14e4d99c31f28c5dfa38a952cb824c919d57d060
|
4
|
+
data.tar.gz: 4a912d496c0ce57d59a8f7969f33165d4c3d80af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08dc22de887e35eaaae93875009580a69fa7d2755528ca8372694e8c9b10f50d1227eb171eff94f9dfc3f055f79ef5829b426354da95ec5642592ea602eda160
|
7
|
+
data.tar.gz: daaf8cc22d21929419fb278842150bdcf503be0a754193e53f1c10777210d0ba231e833a2e02a6458a32c842c60b27cd67c0aea0fd4a9710b021afeac5b666a6
|
data/README.md
CHANGED
@@ -7,6 +7,44 @@ Ruby wrapper for the Spotify Search & Lookup API. Under development.
|
|
7
7
|
|
8
8
|
[![Gem Version](https://badge.fury.io/rb/spof.png)](http://badge.fury.io/rb/spof)
|
9
9
|
|
10
|
+
|
11
|
+
Usage
|
12
|
+
-----
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'spof'
|
16
|
+
```
|
17
|
+
|
18
|
+
### Search
|
19
|
+
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
r = Spof::Search.artist('nine inch nails') # or album or track
|
23
|
+
|
24
|
+
# a page can be specified
|
25
|
+
r = Spof::Search.track('life on mars', page = 2)
|
26
|
+
```
|
27
|
+
|
28
|
+
### Lookup
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
r = Spof::Lookup.get('spotify:uri:album:xy...z')
|
32
|
+
|
33
|
+
# extras can be specified
|
34
|
+
r = Spof::Lookup.get('spotify:uri:album:xy...z', :track)
|
35
|
+
|
36
|
+
# convenience methods Lookup.album/artist/track check the provided extras
|
37
|
+
r = Spof::Lookup.artist('spotify:uri:artist:ab...c', :trackdetail)
|
38
|
+
# raises Spof::SpofError, "Illegal extra"
|
39
|
+
```
|
40
|
+
|
41
|
+
|
42
|
+
For both `Lookup` and `Search` methods, the result contains the parsed JSON response. For now it's like:
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
r = JSON.parse(spotify_api_json_response, :symbolize_names => true) # hash with symbols as keys
|
46
|
+
```
|
47
|
+
|
10
48
|
License
|
11
49
|
-------
|
12
50
|
|
data/lib/spof/version.rb
CHANGED
data/spof.gemspec
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'spof/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "spof"
|
8
|
-
spec.version = Spof::VERSION
|
9
|
-
spec.authors = ["
|
10
|
-
spec.email = ["ignacio@ignacio.cat"]
|
11
|
-
spec.description = %q{Spotify Search & Lookup API Ruby wrapper}
|
12
|
-
spec.summary = %q{Spotify Search & Lookup}
|
13
|
-
spec.homepage = "http://github.com/ignaciocontreras/spof"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files`.split($/)
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.
|
22
|
-
spec.add_development_dependency "rake"
|
23
|
-
end
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'spof/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "spof"
|
8
|
+
spec.version = Spof::VERSION
|
9
|
+
spec.authors = ["Ignacio Contreras"]
|
10
|
+
spec.email = ["ignacio@ignacio.cat"]
|
11
|
+
spec.description = %q{Spotify Search & Lookup API Ruby wrapper}
|
12
|
+
spec.summary = %q{Spotify Search & Lookup}
|
13
|
+
spec.homepage = "http://github.com/ignaciocontreras/spof"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.2"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spof
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Ignacio Contreras
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.2'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|