robbie 2.1.2 → 2.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d2074093789ac3f1c1665def17931fb816aa4973
4
- data.tar.gz: 304466afde8f17dda4dd7ff4eee7b53edd4665df
3
+ metadata.gz: 5b9b52200d4521e75aea2d69bafd050f09d47abe
4
+ data.tar.gz: 136c5cd1c08b207cd4d503e35787506bdf7730c4
5
5
  SHA512:
6
- metadata.gz: 771d61dc57c370d6ab401cbe70c68665615af8794ccfe99a54e91f2d0d7dcd9a2cf761bdf7942fdfc58fff5676bee3d2bdd00477caf1aa5b850c83fe5308fc5e
7
- data.tar.gz: a07afc63f0ab90787736ddc23156b87c9963888882487cc3d27cbcb4d43844b8ca44fb5f048610847e220ea8c1bd81d820a523a02ab19f24d592dfed8d5f9737
6
+ metadata.gz: dddf4d28eb6898e3b98e35dafd31b536ca702969f65eaf2ce5886cb358a244f0bfcae5615b1fc317a8056c4c55ffa984e3c1c054b9ddab504296f622b0d0cc42
7
+ data.tar.gz: 7118329fd3cc0d1d00d34c2ebcbdbd79ac1750d51bcaed155f95c7fcf43db6d3f0fafaca5d6b65b70756ba144f4753c3ac3e4d4cef819d453175a2dba9f1436e
@@ -6,6 +6,8 @@ require 'goodreads'
6
6
  require 'canistreamit'
7
7
  require 'bitly'
8
8
 
9
+ require 'awesome_print'
10
+
9
11
  module Request
10
12
  module_function
11
13
 
@@ -36,10 +38,12 @@ module Request
36
38
  @res = HTTP.get("http://ws.audioscrobbler.com/2.0/?method=track.getInfo&track=#{@song}&artist=#{@artist}&api_key=0a7d3b25ed857f679eba1a353e98a658&format=json").body
37
39
  @json = JSON.parse(@res)
38
40
 
41
+ #@year = @json['track']['wiki']['published'] || "No Year data available"
42
+
39
43
  puts "Title: \t\t#{@json['track']['name']}"
40
44
  puts "Artist: \t#{@json['track']['artist']['name']}"
41
- puts "Year: \t\t#{@json['track']['wiki']['published']}"
42
- puts "Duration: \t#{@json['track']['duration']}"
45
+ # puts "Year: \t\t#{@year}"
46
+ puts "Duration: \t#{@json['track']['duration'].to_i/1000} seconds"
43
47
  end
44
48
 
45
49
  def album(args) # works, sort of
@@ -91,8 +95,12 @@ module Request
91
95
  Bitly.use_api_version_3
92
96
 
93
97
  bitly = Bitly.new('benp51', 'R_886e9ca24b25c1e91d66f5c6379568a9')
94
- title = URI.escape(title.first)
95
- omdbData = JSON.parse(HTTP.get('http://www.omdbapi.com/?t='+title+'&type=series&plot=short&r=json').body)
98
+
99
+ titleClean = title.first
100
+ overwrittenTitle = URI.escape(title.first)
101
+ canistreamit = client.search_and_query(titleClean, ["streaming"])
102
+
103
+ omdbData = JSON.parse(HTTP.get('http://www.omdbapi.com/?t='+overwrittenTitle+'&type=series&plot=short&r=json').body)
96
104
  puts "Title:\t\t#{omdbData["Title"]}"
97
105
  puts "Plot:\t\t#{omdbData["Plot"]}"
98
106
  puts "Poster:\t\t#{bitly.shorten(omdbData["Poster"]).short_url}"
@@ -1,4 +1,4 @@
1
1
  module Robbie
2
- VERSION = '2.1.2'
2
+ VERSION = '2.1.3'
3
3
  E_VERSION = "robbie v#{VERSION}"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robbie
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Poile