tia 2.2.4

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 (4) hide show
  1. checksums.yaml +7 -0
  2. data/lib/tia.rb +31 -0
  3. data/lib/tia/version.rb +0 -0
  4. metadata +45 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 865a6dc08b66cdd9c1feaa6b568447cfebb59f8e
4
+ data.tar.gz: 281504a0ed68179dff80b14157d3527445f19368
5
+ SHA512:
6
+ metadata.gz: 11d5302da31bd1cd7495770789b1cb4ed6784107e9e1a0848c79e232ad90ebf4c3b9632ff7dac10945b7dbb5e2ce0c6d8b5b71f4b415335b9ea10534cacf8851
7
+ data.tar.gz: 06856340a66d825ec4e21f6205f3dfbecc8e1682885b9fa86988b3370ed11e2da732f3a7f7da5d94e0e24a9b1f0385da5449871312a4a26ad7394c9c9e93eccf
data/lib/tia.rb ADDED
@@ -0,0 +1,31 @@
1
+ require 'net/http'
2
+ require 'json'
3
+ require 'awesome_print'
4
+ # this file will go into a certain file within our directory
5
+
6
+ class APIS::Itunes
7
+ # this class could be called anything
8
+ #by having this initial method initializes for if ARGV.
9
+ #in terms of the API we're working with- if you're doing the same type of search-
10
+ #create or wrap this in it's own method (def search)
11
+ #URI converts the strings to a URL
12
+ #def itunes_api_response. encode the URI using the URI constant
13
+
14
+ def itunes_api_response
15
+ uri = URI("https://itunes.apple.com/search?term=nirvana&entity=song")
16
+ response = Net::HTTP.get(uri)
17
+ end
18
+ def turn_to_name_id_hash
19
+ parsed = JSON.parse(itunes_api_response)
20
+ songs = []
21
+ parsed["results"].each{|song|songs<<{name: song["trackName"], album:song["collectionName"],
22
+ id: song["trackid"]}}
23
+ #ap p[name]
24
+ #|word| inside of pipes is creating a variable
25
+ #this method returns song name, album name, id
26
+
27
+ end
28
+ def fun_times
29
+ parsed["results"].each{|song|songs<<{name: song}}
30
+ end
31
+ end
File without changes
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tia
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.4
5
+ platform: ruby
6
+ authors:
7
+ - Christina Platt
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-10-26 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: describe the gem
14
+ email: christinamarieplatt@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/tia.rb
20
+ - lib/tia/version.rb
21
+ homepage: https://github.com/christinaplatt
22
+ licenses:
23
+ - GPLv2
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 1.9.2
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubyforge_project:
41
+ rubygems_version: 2.0.14
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: put in info on what the gem actually does
45
+ test_files: []