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 +0 -0
- data/examples/quick_tutorial.rb +12 -9
- data/lib/tunecore_direct/album.rb +1 -1
- data/lib/tunecore_direct/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/examples/quick_tutorial.rb
CHANGED
@@ -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.
|
3
|
-
tunecore_server = "http://
|
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.
|
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.
|
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-
|
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
|