tunecore_direct 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.
data.tar.gz.sig CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  # This script will demonstrate how to create a user at TuneCore and add an Album and Song.
2
- email = 'alex.kane@gmail.com'
3
- tunecore_server = "http://localhost:3000"
2
+ email = 'alex.kane7@gmail.com'
3
+ tunecore_server = "http://test.tunecore.com"
4
4
  api_key = "testkey"
5
5
 
6
6
  # Set up our environment
@@ -10,7 +10,6 @@ include TunecoreDirect
10
10
  TunecoreDirect::Base.tunecore_server = tunecore_server
11
11
  TunecoreDirect::Base.api_key = api_key
12
12
 
13
- person = Person.get("alex.kane@gmail.com")
14
13
 
15
14
 
16
15
  # Create a person
@@ -23,7 +22,8 @@ person.country = "United States"
23
22
  person.postal_code = "11201"
24
23
  # person.create should return true. If it returns false check person.errors to see why the person
25
24
  # couldn't be created. Assuming that it returned true, the person_id attribute will now be set.
26
- person.create
25
+ puts person.create
26
+ puts person.errors
27
27
 
28
28
  # Create an Album for our person
29
29
  album = TunecoreDirect::Album.new
@@ -40,6 +40,9 @@ album.p_copyright = "1999"
40
40
  album.recording_location = "Brooklyn"
41
41
  album.parental_advisory = false
42
42
  album.stores = "iTunesUS,iTunesAU,iTunesCA,iTunesEU,iTunesJP,iTunesEU,RhapsodyRH,MusicNet,Napster,eMusic,Amazon,Lala"
43
+ artwork = TunecoreDirect::Artwork.new
44
+ artwork.asset_url = "http://my.host.com/assets/1234.jpg"
45
+ album.artwork = artwork
43
46
  # Our album object is built, now let's create it on the TuneCore server. Like person, the Album object will
44
47
  # return true if the album was created, and false if there was a problem. If false check album.errors to see
45
48
  # what the problem was.
@@ -47,11 +50,11 @@ album.create
47
50
 
48
51
 
49
52
  # Create a song to go on the Album we just created
50
- song = TunecoreDirect::Song.new
51
- song.album_id = album.album_id
52
- song.name = "My song"
53
- song.track_num = 1
54
- song.save
53
+ #song = TunecoreDirect::Song.new
54
+ #song.album_id = album.album_id
55
+ #song.name = "My song"
56
+ #song.track_num = 1
57
+ #song.save
55
58
 
56
59
  # Now that we've created the Song in TuneCore's server the next step is to upload the audio file
57
60
  # to TuneCore. We do this by using TuneCore's flash uploade tool.
@@ -74,7 +74,7 @@ module TunecoreDirect
74
74
  "stores" => @stores }
75
75
 
76
76
  if @artwork.asset_url
77
- params["artwork_asset_url"] = @artwork.url
77
+ params["artwork_asset_url"] = @artwork.asset_url
78
78
  end
79
79
 
80
80
  res = req.create_album(params)
@@ -2,7 +2,7 @@ module TunecoreDirect #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tunecore_direct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Kane
@@ -30,7 +30,7 @@ cert_chain:
30
30
  f3TSOQ==
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2008-09-18 00:00:00 -04:00
33
+ date: 2008-09-29 00:00:00 -04:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file