ilinkmaker 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # iLinkmaker
2
+
3
+ This is a Ruby wrapper for the iTunes Store Search API [http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html](http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html).
4
+
5
+ ## Installation
6
+
7
+ As a gem:
8
+
9
+ gem install ilinkmaker
10
+
11
+ In your Gemfile
12
+
13
+ gem "ilinkmaker"
14
+
15
+ ## Usage
16
+
17
+ ### Instantiate a client
18
+
19
+ >> ilinkmaker = Ilinkmaker::Client.new
20
+
21
+ #### Example
22
+
23
+ >> results = ilinkmaker.search(:term => "tribes", :media => "ebook", :limit => 1)
24
+ => #<HTTParty::Response:0x101876430 @parsed_response={"results"=>[{"trackViewUrl"=>"http://itunes.apple.com/us/book/tribes/id361926215?mt=11&uo=4", "price"=>16.99, "kind"=>"ebook", "genreIds"=>["10014"], "artworkUrl100"=>"http://a4.mzstatic.com/us/r30/Features/d9/12/ad/dj.cbleznyd.100x100-75.jpg", "trackName"=>"Tribes", "artistId"=>2072165, "artworkUrl60"=>"http://a4.mzstatic.com/us/r30/Features/d9/12/ad/dj.cbleznyd.60x60-50.jpg", "releaseDate"=>Thu Oct 16 07:00:00 UTC 2008, "artistViewUrl"=>"http://itunes.apple.com/us/artist/seth-godin/id2072165?mt=11&uo=4", "artistName"=>"Seth Godin", "artistIds"=>[2072165], "currency"=>"USD", "description"=>"A tribe is any group of people, large or small, who are connected to one another, a leader, and an idea. For millions of years, humans have been seeking out tribes, be they religious, ethnic, economic, political, or even musical (think of the Deadheads). It\342\200\231s our nature.Now the Internet has eliminated the barriers of geography, cost, and time. All those blogs and social networking sites are helping existing tribes get bigger. But more important, they\342\200\231re enabling countless new tribes to be born\342\200\224groups of ten or ten thousand or ten million who care about their iPhones, or a political campaign, or a new way to fight global warming.And so the key question: Who is going to lead us?The Web can do amazing things, but it can\342\200\231t provide leadership. That still has to come from individuals\342\200\224 people just like you who have passion about something. The explosion in tribes means that anyone who wants to make a difference now has the tools at her fingertips.If you think leadership is for other people, think again\342\200\224leaders come in surprising packages. Consider Joel Spolsky and his international tribe of scary-smart software engineers. Or Gary Vaynerhuck, a wine expert with a devoted following of enthusiasts. Chris Sharma leads a tribe of rock climbers up impossible cliff faces, while Mich Mathews, a VP at Microsoft, runs her internal tribe of marketers from her cube in Seattle. All they have in common is the desire to change things, the ability to connect a tribe, and the willingness to lead.If you ignore this opportunity, you risk turning into a \\u201Csheepwalker\\u201D\342\200\224someone who fights to protect the status quo at all costs, never asking if obedience is doing you (or your organization) any good. Sheepwalkers don\342\200\231t do very well these days.Tribes will make you think (really think) about the opportunities in leading your fellow employees, customers, investors, believers, hobbyists, or readers. . . . It\342\200\231s not easy, but it\342\200\231s easier than you think.", "userRatingCount"=>35, "averageUserRating"=>4.5, "trackCensoredName"=>"Tribes", "genres"=>["Management & Leadership"], "trackId"=>361926215}], "resultCount"=>1}, @response=#<Net::HTTPOK 200 OK readbody=true>, @headers={"x-apple-orig-url-path"=>["/WebObjects/MZStoreServices.woa/wa/wsSearch/?limit=1&term=tribes&output=json&media=ebook"], "x-webobjects-loadaverage"=>["0"], "x-apple-application-site"=>["ST11"], "expires"=>["Thu, 26 May 2011 18:21:09 GMT"], "x-apple-partner"=>["origin.0"], "content-type"=>["text/javascript; charset=utf-8"], "connection"=>["close"], "x-apple-max-age"=>["3600"], "date"=>["Thu, 26 May 2011 18:21:09 GMT"], "x-apple-woa-inbound-url"=>["/WebObjects/MZStoreServices.woa/wa/wsSearch/?limit=1&term=tribes&output=json&media=ebook"], "x-apple-application-instance"=>["2036002"], "content-length"=>["2758"], "cache-control"=>["max-age=0, no-cache"], "vary"=>["X-Apple-Store-Front"], "pragma"=>["no-cache"]}>
25
+
26
+ #### Get an affiliate link
27
+ >> ilinkmaker.get_affiliate_link(results["results"], {:partner_id => "XXXXXX", :linkshare_url => "http://click.linksynergy.com/fs-bin/stat?id=XXXXXXXX&offerid=XXXXX&type=X&subid=X&tmpid=XXXX&RD_PARM1"})
28
+ => "http://click.linksynergy.com/fs-bin/stat?id=XXXXXXXX&offerid=XXXXX&type=X&subid=X&tmpid=XXXX&RD_PARM1=http://itunes.apple.com/us/book/tribes/id361926215?mt=11&uo=4?partner_id=XXXXXX"
29
+
30
+ ## Copyright
31
+
32
+ Contact me if you have any suggestions and feel free to fork it!
33
+
34
+ Copyright (c) 2009 Johnny Khai Nguyen, released under the MIT license
data/Rakefile ADDED
@@ -0,0 +1,31 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
3
+ require 'rake/rdoctask'
4
+
5
+ begin
6
+ require 'jeweler'
7
+ Jeweler::Tasks.new do |gem|
8
+ gem.name = "ilinkmaker"
9
+ gem.summary = %Q{Ruby wrapper for the iTunes Store Search API}
10
+ gem.description = %Q{Ruby wrapper for the iTunes Store Search API}
11
+ gem.email = "johnnyn@gmail.com"
12
+ gem.homepage = "http://github.com/phuphighter/ilinkmaker"
13
+ gem.authors = ["Johnny Khai Nguyen"]
14
+
15
+ gem.add_dependency('httparty', '>= 0.5.0')
16
+ end
17
+ Jeweler::GemcutterTasks.new
18
+ rescue LoadError
19
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
20
+ end
21
+
22
+ desc 'Default: run unit tests.'
23
+ task :default => :test
24
+
25
+ desc 'Test ilinkmaker'
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'lib'
28
+ t.libs << 'test'
29
+ t.pattern = 'test/**/*_test.rb'
30
+ t.verbose = true
31
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.0
@@ -0,0 +1,47 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{ilinkmaker}
8
+ s.version = "0.0.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Johnny Khai Nguyen"]
12
+ s.date = %q{2011-05-26}
13
+ s.description = %q{Ruby wrapper for the iTunes Store Search API}
14
+ s.email = %q{johnnyn@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "README.md"
17
+ ]
18
+ s.files = [
19
+ "README.md",
20
+ "Rakefile",
21
+ "VERSION",
22
+ "ilinkmaker.gemspec",
23
+ "lib/ilinkmaker.rb",
24
+ "lib/ilinkmaker/client.rb",
25
+ "pkg/ilinkmaker-0.0.0.gem",
26
+ "test/fixtures/search.json",
27
+ "test/ilinkmaker_test.rb",
28
+ "test/test_helper.rb"
29
+ ]
30
+ s.homepage = %q{http://github.com/phuphighter/ilinkmaker}
31
+ s.require_paths = ["lib"]
32
+ s.rubygems_version = %q{1.6.2}
33
+ s.summary = %q{Ruby wrapper for the iTunes Store Search API}
34
+
35
+ if s.respond_to? :specification_version then
36
+ s.specification_version = 3
37
+
38
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
39
+ s.add_runtime_dependency(%q<httparty>, [">= 0.5.0"])
40
+ else
41
+ s.add_dependency(%q<httparty>, [">= 0.5.0"])
42
+ end
43
+ else
44
+ s.add_dependency(%q<httparty>, [">= 0.5.0"])
45
+ end
46
+ end
47
+
@@ -0,0 +1,40 @@
1
+ module Ilinkmaker
2
+
3
+ class Client
4
+ include HTTParty
5
+ base_uri "http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/wa/wsSearch"
6
+ format :json
7
+
8
+ attr_reader :partner_id, :linkshare_url
9
+
10
+ def initialize(options={})
11
+ @partner_id = options[:partner_id] || Ilinkmaker.partner_id
12
+ @linkshare_url = options[:linkshare_url] || Ilinkmaker.linkshare_url
13
+ end
14
+
15
+ def search(options={})
16
+ response = self.class.get("/", :query => options.merge(self.default_options))
17
+ end
18
+
19
+ def get_affiliate_link(result, options={})
20
+ url = result["trackViewUrl"]
21
+
22
+ if @partner_id && @linkshare_url
23
+ url = "#{@linkshare_url}=#{url}?partner_id=#{@partner_id}"
24
+ elsif options[:partner_id] && options[:linkshare_url]
25
+ url = "#{options[:linkshare_url]}=#{url}?partner_id=#{options[:partner_id]}"
26
+ end
27
+ end
28
+
29
+ protected
30
+
31
+ def default_options
32
+ if @partner_id
33
+ {:partner_id => @partner_id, :output => "json"}
34
+ else
35
+ {:output => "json"}
36
+ end
37
+ end
38
+
39
+ end
40
+ end
data/lib/ilinkmaker.rb ADDED
@@ -0,0 +1,38 @@
1
+ # iLinkmaker
2
+ require 'rubygems'
3
+ gem 'httparty'
4
+ require 'httparty'
5
+
6
+ directory = File.expand_path(File.dirname(__FILE__))
7
+
8
+ module Ilinkmaker
9
+
10
+ # create config/initializers/ilinkmaker.rb
11
+ #
12
+ # Ilinkmaker.configure do |config|
13
+ # config.partner_id = 'partner_id'
14
+ # config.linkshare_url = 'linkshare_url'
15
+ # end
16
+ # client = Ilinkmaker::Client.new
17
+ #
18
+ # or
19
+ #
20
+ # Ilinkmaker.partner_id = 'partner_id'
21
+ # Ilinkmaker.linkshare_url = 'linkshare_url'
22
+ #
23
+ # or
24
+ #
25
+ # Ilinkmaker::Client.new(:partner_id => 'partner_id', :linkshare_url => 'linkshare_url')
26
+
27
+ def self.configure
28
+ yield self
29
+ true
30
+ end
31
+
32
+ class << self
33
+ attr_accessor :partner_id, :linkshare_url
34
+ end
35
+
36
+ end
37
+
38
+ require File.join(directory, 'ilinkmaker', 'client')
Binary file
@@ -0,0 +1,44 @@
1
+ {
2
+ "resultCount":25,
3
+ "results": [
4
+ {"kind":"ebook", "artistId":2072165, "artistName":"Seth Godin", "price":16.99,
5
+ "description":"A tribe is any group of people, large or small, who are connected to one another, a leader, and an idea. For millions of years, humans have been seeking out tribes, be they religious, ethnic, economic, political, or even musical (think of the Deadheads). It\u2019s our nature.Now the Internet has eliminated the barriers of geography, cost, and time. All those blogs and social networking sites are helping existing tribes get bigger. But more important, they\u2019re enabling countless new tribes to be born\u2014groups of ten or ten thousand or ten million who care about their iPhones, or a political campaign, or a new way to fight global warming.And so the key question: Who is going to lead us?The Web can do amazing things, but it can\u2019t provide leadership. That still has to come from individuals\u2014 people just like you who have passion about something. The explosion in tribes means that anyone who wants to make a difference now has the tools at her fingertips.If you think leadership is for other people, think again\u2014leaders come in surprising packages. Consider Joel Spolsky and his international tribe of scary-smart software engineers. Or Gary Vaynerhuck, a wine expert with a devoted following of enthusiasts. Chris Sharma leads a tribe of rock climbers up impossible cliff faces, while Mich Mathews, a VP at Microsoft, runs her internal tribe of marketers from her cube in Seattle. All they have in common is the desire to change things, the ability to connect a tribe, and the willingness to lead.If you ignore this opportunity, you risk turning into a \u201Csheepwalker\u201D\u2014someone who fights to protect the status quo at all costs, never asking if obedience is doing you (or your organization) any good. Sheepwalkers don\u2019t do very well these days.Tribes will make you think (really think) about the opportunities in leading your fellow employees, customers, investors, believers, hobbyists, or readers. . . . It\u2019s not easy, but it\u2019s easier than you think.", "genreIds":["10014"], "releaseDate":"2008-10-16T07:00:00Z", "currency":"USD", "trackId":361926215, "trackName":"Tribes", "genres":["Management & Leadership"], "artistIds":[2072165], "artworkUrl60":"http://a4.mzstatic.com/us/r30/Features/d9/12/ad/dj.cbleznyd.60x60-50.jpg", "artworkUrl100":"http://a4.mzstatic.com/us/r30/Features/d9/12/ad/dj.cbleznyd.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/seth-godin/id2072165?mt=11&uo=4", "trackCensoredName":"Tribes", "trackViewUrl":"http://itunes.apple.com/us/book/tribes/id361926215?mt=11&uo=4", "averageUserRating":4.5, "userRatingCount":35},
6
+ {"kind":"ebook", "artistId":366113419, "artistName":"John Stevens Cabot Abbott", "price":0.00, "description":null, "genreIds":["9031"], "releaseDate":"2010-04-03T07:00:00Z", "currency":"USD", "trackId":361502293,
7
+ "trackName":"The Adventures of the Chevalier De La Salle and His Companions, in Their Explorations of the Prairies, Forests, Lakes, and Rivers, of the New World, and Their Interviews with the Savage Tribes, Two Hundred Years Ago", "genres":["Fiction & Literature"], "artistIds":[366113419], "artworkUrl60":"http://a2.mzstatic.com/us/r30/Publication/8d/4a/97/mzi.kjtfpwcb.60x60-50.jpg", "artworkUrl100":"http://a4.mzstatic.com/us/r30/Publication/8d/4a/97/mzi.kjtfpwcb.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/john-stevens-cabot-abbott/id366113419?mt=11&uo=4",
8
+ "trackCensoredName":"The Adventures of the Chevalier De La Salle and His Companions, in Their Explorations of the Prairies, Forests, Lakes, and Rivers, of the New World, and Their Interviews with the Savage Tribes, Two Hundred Years Ago", "trackViewUrl":"http://itunes.apple.com/us/book/the-adventures-chevalier-de/id361502293?mt=11&uo=4", "averageUserRating":2.5, "userRatingCount":3},
9
+ {"kind":"ebook", "artistId":366176013, "artistName":"Robert Vane Russell", "price":0.00, "description":null, "genreIds":["9031"], "releaseDate":"2010-04-03T07:00:00Z", "currency":"USD", "trackId":361559076, "trackName":"The Tribes and Castes of the Central Provinces of India - Volume IV of IV", "genres":["Fiction & Literature"], "artistIds":[366176013], "artworkUrl60":"http://a3.mzstatic.com/us/r30/Publication/39/6f/a0/mzi.wsuuzgou.60x60-50.jpg", "artworkUrl100":"http://a1.mzstatic.com/us/r30/Publication/39/6f/a0/mzi.wsuuzgou.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/robert-vane-russell/id366176013?mt=11&uo=4", "trackCensoredName":"The Tribes and Castes of the Central Provinces of India - Volume IV of IV", "trackViewUrl":"http://itunes.apple.com/us/book/the-tribes-castes-central/id361559076?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
10
+ {"kind":"ebook", "artistId":364643827, "artistName":"Cory Doctorow", "price":0.00, "description":null, "genreIds":["9031"], "releaseDate":"2010-04-03T07:00:00Z", "currency":"USD", "trackId":361519169, "trackName":"Eastern Standard Tribe", "genres":["Fiction & Literature"], "artistIds":[364643827], "artworkUrl60":"http://a2.mzstatic.com/us/r30/Publication/7d/8b/26/mzi.dxlwthhj.60x60-50.jpg", "artworkUrl100":"http://a5.mzstatic.com/us/r30/Publication/7d/8b/26/mzi.dxlwthhj.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/cory-doctorow/id364643827?mt=11&uo=4", "trackCensoredName":"Eastern Standard Tribe", "trackViewUrl":"http://itunes.apple.com/us/book/eastern-standard-tribe/id361519169?mt=11&uo=4", "averageUserRating":4.0, "userRatingCount":8},
11
+ {"kind":"ebook", "artistId":366182934, "artistName":"Henry Rowe Schoolcraft", "price":0.00, "description":null, "genreIds":["9004"], "releaseDate":"2010-04-03T07:00:00Z", "currency":"USD", "trackId":361530617, "trackName":"Personal Memoirs of a Residence of Thirty Years with the Indian Tribes on the American Frontiers", "genres":["Travel & Adventure"], "artistIds":[366182934], "artworkUrl60":"http://a5.mzstatic.com/us/r30/Publication/95/da/1f/mzi.jlmnceui.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Publication/95/da/1f/mzi.jlmnceui.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/henry-rowe-schoolcraft/id366182934?mt=11&uo=4", "trackCensoredName":"Personal Memoirs of a Residence of Thirty Years with the Indian Tribes on the American Frontiers", "trackViewUrl":"http://itunes.apple.com/us/book/personal-memoirs-residence/id361530617?mt=11&uo=4", "averageUserRating":5.0, "userRatingCount":1},
12
+ {"kind":"ebook", "artistId":366176013, "artistName":"Robert Vane Russell", "price":0.00, "description":null, "genreIds":["9031"], "releaseDate":"2010-04-03T07:00:00Z", "currency":"USD", "trackId":361511226, "trackName":"The Tribes and Castes of the Central Provinces of India", "genres":["Fiction & Literature"], "artistIds":[366176013], "artworkUrl60":"http://a3.mzstatic.com/us/r30/Publication/1b/ae/d9/mzi.vvzbstni.60x60-50.jpg", "artworkUrl100":"http://a1.mzstatic.com/us/r30/Publication/1b/ae/d9/mzi.vvzbstni.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/robert-vane-russell/id366176013?mt=11&uo=4", "trackCensoredName":"The Tribes and Castes of the Central Provinces of India", "trackViewUrl":"http://itunes.apple.com/us/book/the-tribes-castes-central/id361511226?mt=11&uo=4", "averageUserRating":5.0, "userRatingCount":1},
13
+ {"kind":"ebook", "artistId":366216976, "artistName":"Carl Lumholtz", "price":0.00, "description":null, "genreIds":["9004"], "releaseDate":"2010-04-03T07:00:00Z", "currency":"USD", "trackId":361582787, "trackName":"Unknown Mexico, Volume 1 (of 2)", "genres":["Travel & Adventure"], "artistIds":[366216976], "artworkUrl60":"http://a2.mzstatic.com/us/r30/Publication/46/4b/08/mzi.lgmxvamq.60x60-50.jpg", "artworkUrl100":"http://a3.mzstatic.com/us/r30/Publication/46/4b/08/mzi.lgmxvamq.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/carl-lumholtz/id366216976?mt=11&uo=4", "trackCensoredName":"Unknown Mexico, Volume 1 (of 2)", "trackViewUrl":"http://itunes.apple.com/us/book/unknown-mexico-volume-1-of-2/id361582787?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
14
+ {"kind":"ebook", "artistId":420158034, "artistName":"Arthur Slade", "price":0.99,
15
+ "description":"<font face=\"Verdana\" size=\"4\"><i>Let me explain. Numerous tribes exist in friction at our school. The LogoTribe exhibit name brands wherever and whenever possible. The Digerati Tribe worship bytes and silicon chips. The Lipstick/Hair Spray Tribe perform elaborate appearance alterations to attract mates. The \u2018Gee-The-Seventies-Were-Great-Even-Though-I-Wasn\u2019t-Born-Yet\u2019 Tribe have predictable backwards habits. The Hockey Tribe subdivides into Oilers,Canadiens, Rangers and other assorted clans.<\/i><\/font><br>\n<font face=\"Verdana\" size=\"4\"><i>And finally there\u2019s us, the quasi-omniscient Observers.<\/i><\/font><br>\n<font face=\"Verdana\" size=\"4\">Percy Montmount, Jr., along with his best friend Elissa, have dubbed themselves the Observers of their grade 12 graduating class at Saskatoon\u2019s Groverly High. Ever since the death of his father \u2013 a renowned anthropologist whom Percy believes died in the Congo from a bite of a tsetse fly -- Percy has mysteriously taken on his dad\u2019s eyes, and his occupation, to examine the often inexplicable and ritualistic behaviors of his peers. Armed with his field study notebook, Percy tries to remain detached from his subjects, including Justin, an Alpha Male bully from the Jock Tribe, and Marcia Grady, a beautiful member of the Lipstick/Hairspray Tribe and various other sects: the Teacher tribe; theBorn Again tribe; the Cool and Detached tribe; not to mention Mr. Verplaz, theShaman.<\/font><br>\n<font face=\"Verdana\" size=\"4\">For Percy it\u2019s crucial to withdraw, analyze, and remain coolly above it all. But he\u2019s studying real people, who complicate things. Like Elissa, the only person who can come close to him, maybe too close and his no longer not-so-scientific interest in her (or her webbed foot) is battling his desperate need not to feel any emotion. As graduation approaches, the looming ritual ratchets up Percy\u2019s deepest, hidden feelings and reveals the truth about his father\u2019s disappearance.<\/font><br>\n<font face=\"Verdana\" size=\"4\"><i>Tribes <\/i>is marked by caustic humour and wry overtones but it is also layered with a subtle and poignant sensitivity about the often unquantifiable condition of adolescence. With a surprise ending and a hero whose offbeat behavior belies his all-too-human feelings of love, pain and adolescent angst, <i>Tribes <\/i>is a rare breed \u2013 a young adult novel that speaks a language that teens understand.<\/font>", "genreIds":["10081"], "releaseDate":"2011-03-15T07:00:00Z", "currency":"USD", "trackId":426523982, "trackName":"Tribes", "genres":["Children's Fiction"], "artistIds":[420158034], "artworkUrl60":"http://a1.mzstatic.com/us/r30/Publication/b8/8e/14/mzi.siuhmkdb.60x60-50.jpg", "artworkUrl100":"http://a5.mzstatic.com/us/r30/Publication/b8/8e/14/mzi.siuhmkdb.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/arthur-slade/id420158034?mt=11&uo=4", "trackCensoredName":"Tribes", "trackViewUrl":"http://itunes.apple.com/us/book/tribes/id426523982?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
16
+ {"kind":"ebook", "artistId":366151181, "artistName":"Joseph Wild", "price":0.00, "description":null, "genreIds":["9031"], "releaseDate":"2010-04-03T07:00:00Z", "currency":"USD", "trackId":361672545, "trackName":"The Lost Ten Tribes, and 1882", "genres":["Fiction & Literature"], "artistIds":[366151181], "artworkUrl60":"http://a3.mzstatic.com/us/r30/Publication/96/af/c9/mzi.pkmpyplb.60x60-50.jpg", "artworkUrl100":"http://a3.mzstatic.com/us/r30/Publication/96/af/c9/mzi.pkmpyplb.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/joseph-wild/id366151181?mt=11&uo=4", "trackCensoredName":"The Lost Ten Tribes, and 1882", "trackViewUrl":"http://itunes.apple.com/us/book/the-lost-ten-tribes-and-1882/id361672545?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
17
+ {"kind":"ebook", "artistId":378008143, "artistName":"John Norman", "price":9.99,
18
+ "description":"In this tenth volume of John Norman's Gor series, Tarl Cabot must prove his final loyalty to the harsh and caste-bound planet known as counter-earth. \"Surrender Gor,\" reads a message sent from the Others, a mysterious people from the worlds of steel. Either the proud rulers of Gor submit or be destroyed. Now Tarl Cabot is leaving the decadent city of Port Kar to wander in the wilds of Gor, taking up the sword to defend his rulers and enemies, the Priest-kings. For he knows that the fate of his home planet, earth, is inextricably tied to the fate of Gor.", "genreIds":["10044"], "releaseDate":"1998-05-31T07:00:00Z", "currency":"USD", "trackId":379988922, "trackName":"Tribesmen of Gor", "genres":["Fantasy"], "artistIds":[378008143], "artworkUrl60":"http://a1.mzstatic.com/us/r30/Publication/0a/df/e9/mzi.fyfjvsyp.60x60-50.jpg", "artworkUrl100":"http://a5.mzstatic.com/us/r30/Publication/0a/df/e9/mzi.fyfjvsyp.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/john-norman/id378008143?mt=11&uo=4", "trackCensoredName":"Tribesmen of Gor", "trackViewUrl":"http://itunes.apple.com/us/book/tribesmen-of-gor/id379988922?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
19
+ {"kind":"ebook", "artistId":366124839, "artistName":"Charles Hose & William McDougall", "price":0.00, "description":null, "genreIds":["9031"], "releaseDate":"2010-04-03T07:00:00Z", "currency":"USD", "trackId":361670173, "trackName":"The Pagan Tribes of Borneo", "genres":["Fiction & Literature"], "artistIds":[366124839, 366124844], "artworkUrl60":"http://a3.mzstatic.com/us/r30/Publication/84/e9/fe/mzi.slvyodpy.60x60-50.jpg", "artworkUrl100":"http://a1.mzstatic.com/us/r30/Publication/84/e9/fe/mzi.slvyodpy.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/charles-hose-william-mcdougall/id366124839?mt=11&uo=4", "trackCensoredName":"The Pagan Tribes of Borneo", "trackViewUrl":"http://itunes.apple.com/us/book/the-pagan-tribes-of-borneo/id361670173?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
20
+ {"kind":"ebook", "artistId":358333157, "artistName":"S. C. Gwynne", "price":9.99,
21
+ "description":"<B><P>In the tradition of <I>Bury My Heart at Wounded Knee, <\/I>a stunningly vivid historical account of the forty-year battle between Comanche Indians and white settlers for control of the American West, centering on Quanah, the greatest Comanche chief of them all.<P><\/B>S. C. Gwynne&#8217;s <I>Empire of the Summer Moon<\/I><B> <\/B>spans two astonishing stories. The first traces the rise and fall of the Comanches, the most powerful Indian tribe in American history. The second entails one of the most remarkable narratives ever to come out of the Old West: the epic saga of the pioneer woman Cynthia Ann Parker and her mixed-blood son Quanah, who became the last and greatest chief of the Comanches. <P>Although readers may be more familiar with the tribal names Apache and Sioux, it was in fact the legendary fighting ability of the Comanches that determined just how and when the American West opened up. Comanche boys became adept bareback riders by age six; full Comanche braves were considered the best horsemen who ever rode. They were so masterful at war and so skillful with their arrows and lances that they stopped the northern drive of colonial Spain from Mexico and halted the French expansion westward from Louisiana. White settlers arriving in Texas from the eastern United States were surprised to find the frontier being rolled <I>backward <\/I>by Comanches incensed by the invasion of their tribal lands. So effective were the Comanches that they forced the creation of the Texas Rangers and account for the advent of the new weapon specifically designed to fight them: the six-gun. <P>The war with the Comanches lasted four decades, in effect holding up the development of the new American nation. Gwynne&#8217;s exhilarating account delivers a sweeping narrative that encompasses Spanish colonialism, the Civil War, the destruction of the buffalo herds, and the arrival of the railroads&#8212;a historical feast for anyone interested in how the United States came into being. <P>Against this backdrop Gwynne presents the compelling drama of Cynthia Ann Parker, a lovely nine-year-old girl with cornflower-blue eyes who was kidnapped by Comanches from the far Texas frontier in 1836. She grew to love her captors and became infamous as the \"White Squaw\" who refused to return until her tragic capture by Texas Rangers in 1860. More famous still was her son Quanah, a warrior who was never defeated and whose guerrilla wars in the Texas Panhandle made him a legend. <P><P>S. C. Gwynne&#8217;s account of these events is meticulously researched, intellectually provocative, and, above all, thrillingly told. <I>Empire of the Summer Moon <\/I>announces him as a major new writer of American history.", "genreIds":["9015", "10079"], "releaseDate":"2010-05-25T07:00:00Z", "currency":"USD", "trackId":381587084, "trackName":"Empire of the Summer Moon", "genres":["History", "United States"], "artistIds":[358333157], "artworkUrl60":"http://a5.mzstatic.com/us/r30/Publication/0c/e9/e7/mzi.msviejgd.60x60-50.jpg", "artworkUrl100":"http://a1.mzstatic.com/us/r30/Publication/0c/e9/e7/mzi.msviejgd.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/s-c-gwynne/id358333157?mt=11&uo=4", "trackCensoredName":"Empire of the Summer Moon", "trackViewUrl":"http://itunes.apple.com/us/book/empire-of-the-summer-moon/id381587084?mt=11&uo=4", "averageUserRating":4.5, "userRatingCount":23},
22
+ {"kind":"ebook", "artistId":366216171, "artistName":"Charles C. Royce", "price":0.00, "description":null, "genreIds":["10083"], "releaseDate":"2010-04-03T07:00:00Z", "currency":"USD", "trackId":361572637, "trackName":"Cessions of Land by Indian Tribes to the United States: Illustrated by Those in the State of Indiana", "genres":["Law"], "artistIds":[366216171], "artworkUrl60":"http://a5.mzstatic.com/us/r30/Publication/68/d6/71/mzi.ulpspgzm.60x60-50.jpg", "artworkUrl100":"http://a3.mzstatic.com/us/r30/Publication/68/d6/71/mzi.ulpspgzm.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/charles-c-royce/id366216171?mt=11&uo=4", "trackCensoredName":"Cessions of Land by Indian Tribes to the United States: Illustrated by Those in the State of Indiana", "trackViewUrl":"http://itunes.apple.com/us/book/cessions-land-by-indian-tribes/id361572637?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
23
+ {"kind":"ebook", "artistId":366176013, "artistName":"Robert Vane Russell", "price":0.00, "description":null, "genreIds":["9031"], "releaseDate":"2010-04-03T07:00:00Z", "currency":"USD", "trackId":361732656, "trackName":"The Tribes and Castes of the Central Provinces of India\u2014Volume I (of IV)", "genres":["Fiction & Literature"], "artistIds":[366176013], "artworkUrl60":"http://a5.mzstatic.com/us/r30/Publication/81/91/ca/mzi.ybetjdno.60x60-50.jpg", "artworkUrl100":"http://a1.mzstatic.com/us/r30/Publication/81/91/ca/mzi.ybetjdno.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/robert-vane-russell/id366176013?mt=11&uo=4", "trackCensoredName":"The Tribes and Castes of the Central Provinces of India\u2014Volume I (of IV)", "trackViewUrl":"http://itunes.apple.com/us/book/the-tribes-castes-central/id361732656?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
24
+ {"kind":"ebook", "artistId":295698610, "artistName":"Evan Wright", "price":12.99,
25
+ "description":"<b> The <I>New York Times<\/I> bestselling author of <I>Generation Kill<\/I> immerses himself in even more cultures on the edge. <\/B> <BR><BR> Evan Wright's affinity for outsiders has inspired this deeply personal journey through what he calls \"the lost tribes of America.\" A collection of previously published pieces, <I>Hella Nation<\/I> delivers provocative accounts of sex workers in Porn Valley, a Hollywood \u00fcber-agent-turned-war documentarian and hero of America's far right, runaway teens earning corporate dollars as skateboard pitchmen, radical anarchists plotting the overthrow of corporate America, and young American troops on the hunt for terrorists in the combat zones of the Middle East<BR><BR>", "genreIds":["10120"], "releaseDate":"2009-04-02T07:00:00Z", "currency":"USD", "trackId":357924619, "trackName":"Hella Nation", "genres":["Social Science"], "artistIds":[295698610], "artworkUrl60":"http://a1.mzstatic.com/us/r30/Publication/a7/3a/01/mzi.bqpdocat.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Publication/a7/3a/01/mzi.bqpdocat.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/evan-wright/id295698610?mt=11&uo=4", "trackCensoredName":"Hella Nation", "trackViewUrl":"http://itunes.apple.com/us/book/hella-nation/id357924619?mt=11&uo=4", "averageUserRating":2.0, "userRatingCount":3},
26
+ {"kind":"ebook", "artistId":425727683, "artistName":"Steven T. Jones", "price":9.99,
27
+ "description":"\"From massive fire art to tiny gestures of kindness, Steve Jones surveys and captures from an insider's perspective.\" \u2014Brian Doherty, author, <i>This Is<\/i> <i>Burning Man<\/i> <br>\n<br>\n<br>\nFrom its anarchic early days to its present dreams of world domination, this is the untold story of Burning Man\u2014the most popular, unique, and enduring countercultural event of recent times in which alternative lifestyle enthusiasts erect a giant statue and construct a temporary city to live in for about a week in the Nevada desert. Hundreds of thousands of people from all over the world have made the dusty pilgrimage to Black Rock City to take part in this experiment in participatory art, gift culture, and bacchanalian celebration\u2014and many say their lives were fundamentally changed by the experience. This current look at the expansion of the lifestyle reveals how in recent years Burning Man has taken on a new character, with the frontier becoming a real city and the many tribes of the event\u2014the fire artists, circus freaks, music lovers, do-gooders, grungy builders, and myriad other burner collectives\u2014developing a perennial presence in sister cities all over the world. Chronicling Burning Man's renaissance years from 2004 to the present, this epic journey features some of the culture's most inspiring and colorful leaders and is a search for meaning in the most unexpected places.\u00a0", "genreIds":["10120"], "releaseDate":"2011-02-01T08:00:00Z", "currency":"USD", "trackId":425727679, "trackName":"The Tribes of Burning Man", "genres":["Social Science"], "artistIds":[425727683], "artworkUrl60":"http://a1.mzstatic.com/us/r30/Publication/a1/ae/7f/mzi.vaufomsu.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Publication/a1/ae/7f/mzi.vaufomsu.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/steven-t-jones/id425727683?mt=11&uo=4", "trackCensoredName":"The Tribes of Burning Man", "trackViewUrl":"http://itunes.apple.com/us/book/the-tribes-of-burning-man/id425727679?mt=11&uo=4", "averageUserRating":5.0, "userRatingCount":1},
28
+ {"kind":"ebook", "artistId":366141457, "artistName":"Katie Langloh Parker", "price":0.00, "description":null, "genreIds":["9031"], "releaseDate":"2010-04-03T07:00:00Z", "currency":"USD", "trackId":361673005, "trackName":"The Euahlayi Tribe; a study of aboriginal life in Australia", "genres":["Fiction & Literature"], "artistIds":[366141457], "artworkUrl60":"http://a2.mzstatic.com/us/r30/Publication/39/aa/d5/mzi.wowyhymr.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Publication/39/aa/d5/mzi.wowyhymr.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/katie-langloh-parker/id366141457?mt=11&uo=4", "trackCensoredName":"The Euahlayi Tribe; a study of aboriginal life in Australia", "trackViewUrl":"http://itunes.apple.com/us/book/the-euahlayi-tribe-study-aboriginal/id361673005?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
29
+ {"kind":"ebook", "artistId":420010019, "artistName":"Bing West", "price":12.99,
30
+ "description":"From a universally respected combat journalist, a gripping history based on five years of front-line reporting about how the war was turned around-&ndash;and the choice now facing America.&nbsp;<br><br>In the course of 14 extended trips over five years, West embedded with more than 60front-line units, discussing strategy with generals and tactics with corporals. He provides an expert&rsquo;s account of counterinsurgency, disposing of myths. By describing the characters and combat in city after city, West gives the reader an in-depth understanding that will inform the debate about the war. This is the definitive study of how American soldiers actually fought--a gripping and visceral book that changes the way we think about the war, and essential reading for understanding the next critical steps to be taken.", "genreIds":["9034", "10078"], "releaseDate":"2008-08-12T07:00:00Z", "currency":"USD", "trackId":422549947, "trackName":"The Strongest Tribe", "genres":["Politics & Current Events", "Military"], "artistIds":[420010019], "artworkUrl60":"http://a4.mzstatic.com/us/r30/Publication/ce/27/87/mzi.nkgzshzk.60x60-50.jpg", "artworkUrl100":"http://a5.mzstatic.com/us/r30/Publication/ce/27/87/mzi.nkgzshzk.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/bing-west/id420010019?mt=11&uo=4", "trackCensoredName":"The Strongest Tribe", "trackViewUrl":"http://itunes.apple.com/us/book/the-strongest-tribe/id422549947?mt=11&uo=4", "averageUserRating":5.0, "userRatingCount":1},
31
+ {"kind":"ebook", "artistId":322115381, "artistName":"Gillian Tett", "price":12.99,
32
+ "description":"From award-winning <I>Financial Times<\/i> journalist Gillian Tett, who enraged Wall Street leaders with her newsbreaking warnings of a crisis more than a year ahead of the curve, <I>Fool's Gold<\/i> tells the astonishing unknown story at the heart of the 2008 meltdown. <P> Drawing on exclusive access to J.P. Morgan CEO Jamie Dimon and a tightly bonded team of bankers known on Wall Street as the \"Morgan Mafia,\" as well as in-depth interviews with dozens of other key players, including Treasury Secretary Timothy Geithner, Tett brings to life in gripping detail how the Morgan team's bold ideas for a whole new kind of financial alchemy helped to ignite a revolution in banking, and how that revolution escalated wildly out of control. <P> The deeply reported and lively narrative takes readers behind the scenes, to the inner sanctums of elite finance and to the secretive reaches of what came to be known as the \"shadow banking\" world. The story begins with the intense Morgan brainstorming session in 1994 beside a pool in Boca Raton, where the team cooked up a dazzling new idea for the exotic financial product known as credit derivatives. That idea would rip around the banking world, catapult Morgan to the top of the turbocharged derivatives trade, and fuel an extraordinary banking boom that seemed to have unleashed banks from ages-old constraints of risk. <P> But when the Morgan team's derivatives dream collided with the housing boom, and was perverted -- through hubris, delusion, and sheer greed -- by titans of banking that included Citigroup, UBS, Deutsche Bank, and the thundering herd at Merrill Lynch -- even as J.P. Morgan itself stayed well away from the risky concoctions others were peddling -- catastrophe followed. Tett's access to Dimon and the J.P. Morgan leaders who so skillfully steered their bank away from the wild excesses of others sheds invaluable light not only on the untold story of how they engineered their bank's escape from carnage but also on how possible it was for the larger banking world, regulators, and rating agencies to have spotted, and heeded, the terrible risks of a meltdown. <P> A tale of blistering brilliance and willfully blind ambition, <I>Fool's Gold<\/i> is both a rare journey deep inside the arcane and wildly competitive world of high finance and a vital contribution to understanding how the worst economic crisis since the Great Depression was perpetrated.", "genreIds":["9009", "10013", "10005"], "releaseDate":"2009-05-12T07:00:00Z", "currency":"USD", "trackId":381552960, "trackName":"Fool's Gold", "genres":["Business & Personal Finance", "Finance", "Industries & Professions"], "artistIds":[322115381], "artworkUrl60":"http://a3.mzstatic.com/us/r30/Publication/28/14/a6/mzi.ldakzmdc.60x60-50.jpg", "artworkUrl100":"http://a4.mzstatic.com/us/r30/Publication/28/14/a6/mzi.ldakzmdc.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/gillian-tett/id322115381?mt=11&uo=4", "trackCensoredName":"Fool's Gold", "trackViewUrl":"http://itunes.apple.com/us/book/fools-gold/id381552960?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
33
+ {"kind":"ebook", "artistId":364545091, "artistName":"Karl Taro Greenfeld", "price":10.99, "description":"This foray into the often violent subcultures of Japan dramatically debunks the Western perception of a seemingly controlled and orderly society.", "genreIds":["10140"], "releaseDate":"2010-08-03T07:00:00Z", "currency":"USD", "trackId":363698654, "trackName":"Speed Tribes", "genres":["Asia"], "artistIds":[364545091], "artworkUrl60":"http://a2.mzstatic.com/us/r30/Publication/fe/d1/99/mzi.dcgklndb.60x60-50.jpg", "artworkUrl100":"http://a4.mzstatic.com/us/r30/Publication/fe/d1/99/mzi.dcgklndb.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/karl-taro-greenfeld/id364545091?mt=11&uo=4", "trackCensoredName":"Speed Tribes", "trackViewUrl":"http://itunes.apple.com/us/book/speed-tribes/id363698654?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
34
+ {"kind":"ebook", "artistId":366197694, "artistName":"William Apess", "price":0.00, "description":null, "genreIds":["9031"], "releaseDate":"2010-04-03T07:00:00Z", "currency":"USD", "trackId":361693623, "trackName":"Indian Nullification of the Unconstitutional Laws of Massachusetts Relative to the Marshpee Tribe", "genres":["Fiction & Literature"], "artistIds":[366197694], "artworkUrl60":"http://a2.mzstatic.com/us/r30/Publication/e1/51/4f/mzi.wblivdun.60x60-50.jpg", "artworkUrl100":"http://a4.mzstatic.com/us/r30/Publication/e1/51/4f/mzi.wblivdun.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/william-apess/id366197694?mt=11&uo=4", "trackCensoredName":"Indian Nullification of the Unconstitutional Laws of Massachusetts Relative to the Marshpee Tribe", "trackViewUrl":"http://itunes.apple.com/us/book/indian-nullification-unconstitutional/id361693623?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
35
+ {"kind":"ebook", "artistId":420546723, "artistName":"Thomas Cahill", "price":11.99,
36
+ "description":"The author of the runaway bestseller <i>How the Irish Saved Civilization<\/i> has done it again. In <i>The Gifts of the Jews<\/i> Thomas Cahill takes us on another enchanting journey into history, once again recreating a time when the actions of a small band of people had repercussions that are still felt today.<br><br><br><br><i>The Gifts of the Jews<\/i> reveals the critical change that made western civilization possible. Within the matrix of ancient religions and philosophies, life was seen as part of an endless cycle of birth and death; time was like a wheel, spinning ceaselessly. Yet somehow, the ancient Jews began to see time differently. For them, time had a beginning and an end; it was a narrative, whose triumphant conclusion would come in the future. From this insight came a new conception of men and women as individuals with unique destinies--a conception that would inform the Declaration of Independence--and our hopeful belief in progress and the sense that tomorrow can be better than today. As Thomas Cahill narrates this momentous shift, he also explains the real significance of such Biblical figures as Abraham and Sarah, Moses and the Pharaoh, Joshua, Isaiah, and Jeremiah.<br><br><br><br>Full of compelling stories, insights and humor, <i>The Gifts of the Jews<\/i> is an irresistible exploration of history as fascinating and fun as <i>How the Irish Saved Civilization.<\/i><br><br><br><i>From the Trade Paperback edition.<\/i>", "genreIds":["9015"], "releaseDate":"1998-03-16T08:00:00Z", "currency":"USD", "trackId":420546625, "trackName":"The Gifts of the Jews", "genres":["History"], "artistIds":[420546723], "artworkUrl60":"http://a5.mzstatic.com/us/r30/Publication/31/ce/19/mzi.pgwkqeni.60x60-50.jpg", "artworkUrl100":"http://a3.mzstatic.com/us/r30/Publication/31/ce/19/mzi.pgwkqeni.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/thomas-cahill/id420546723?mt=11&uo=4", "trackCensoredName":"The Gifts of the Jews", "trackViewUrl":"http://itunes.apple.com/us/book/the-gifts-of-the-jews/id420546625?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
37
+ {"kind":"ebook", "artistId":358483385, "artistName":"Monte Reel", "price":12.99,
38
+ "description":"Throughout the centuries, the Amazon has yielded many of its secrets, but it still holds a few great mysteries. In 1996 experts got their first glimpse of one: a lone Indian, a tribe of one, hidden in the forests of southwestern Brazil. Previously uncontacted tribes are extremely rare, but a one-man tribe was unprecedented. And like all of the isolated tribes in the Amazonian frontier, he was in danger. <P>Resentment of Indians can run high among settlers, and the consequences can be fatal. The discovery of the Indian prevented local ranchers from seizing his land, and led a small group of men who believed that he was the last of a murdered tribe to dedicate themselves to protecting him. These men worked for the government, overseeing indigenous interests in an odd job that was part Indiana Jones, part social worker, and were among the most experienced adventurers in the Amazon. They were a motley crew that included a rebel who spent more than a decade living with a tribe, a young man who left home to work in the forest at age fourteen, and an old-school <I>sertanista <\/I>with a collection of tall tales amassed over five decades of jungle exploration. <P>Their quest would prove far more difficult than any of them could imagine. Over the course of a decade, the struggle to save the Indian and his land would pit them against businessmen, politicians, and even the Indian himself, a man resolved to keep the outside world at bay at any cost. It would take them into the furthest reaches of the forest and to the halls of Brazil&#8217;s Congress, threatening their jobs and even their lives. Ensuring the future of the Indian and his land would lead straight to the heart of the conflict over the Amazon itself. <P><P>A heart-pounding modern-day adventure set in one of the world&#8217;s last truly wild places, <I>The Last of the Tribe <\/I>is a riveting, brilliantly told tale of encountering the unknown and the unfathomable, and the value of preserving it.", "genreIds":["10076", "10120", "10088"], "releaseDate":"2010-06-15T07:00:00Z", "currency":"USD", "trackId":381498847, "trackName":"The Last of the Tribe", "genres":["Latin America", "Social Science", "Nature"], "artistIds":[358483385], "artworkUrl60":"http://a3.mzstatic.com/us/r30/Publication/58/e8/29/mzi.cxsllyyw.60x60-50.jpg", "artworkUrl100":"http://a4.mzstatic.com/us/r30/Publication/58/e8/29/mzi.cxsllyyw.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/monte-reel/id358483385?mt=11&uo=4", "trackCensoredName":"The Last of the Tribe", "trackViewUrl":"http://itunes.apple.com/us/book/the-last-of-the-tribe/id381498847?mt=11&uo=4", "averageUserRating":5.0, "userRatingCount":1},
39
+ {"kind":"ebook", "artistId":358487470, "artistName":"Kim Isaac Eisler", "price":16.99,
40
+ "description":"In the mid-1970s, the Mashantucket Pequot tribe had only one member -- an elderly woman who pleaded with her grandson to come live on the impoverished reservation and save it from falling into government hands upon her death. In <I>Revenge of the Pequots,<\/I> journalist Kim Isaac Eisler tells the remarkable story of how Richard \"Skip\" Hayward, then an unemployed ship-worker, granted his grandmother's dying wish, revived the moribund clan, and transformed the Pequots into the richest and most influential band of Native Americans in history. <P> Established in 1992, Foxwoods Resort and Casino is the world's most profitable gambling establishment, grossing over $1 billion a year at its sprawling complex in the backwoods of Ledyard, Connecticut. Making use of arcane laws and court decisions never intended to benefit Native Americans as they have, Hayward brilliantly laid the groundwork for this staggering economic empire. In a story rife with drama, he challenged a succession of Connecticut governors and such worthy adversaries as casino moguls Steve Wynn and Donald Trump, while forming alliances with Malaysian industrialist Lim Goh Tong, renegade Seminole chief James Billie, and President Bill Clinton. As a result of Hayward's strategizing, for one of the few times in history -- and in a truly ironic reversal -- the bizarre legal structure governing Native Americans actually worked to their advantage in a mainstream enterprise. But the Pequots' meteoric rise to fortune has left many wondering: Is this turnabout fair play? <P> In this riveting rags-to-riches tale, Eisler deftly explores the wide-ranging issues that have framed the great Native American casino debate and the ramifications of the Native American casino boom in a nation still uneasy about its roots.", "genreIds":["10083", "10067", "9009"], "releaseDate":"2001-03-25T08:00:00Z", "currency":"USD", "trackId":381463061, "trackName":"Revenge of the Pequots", "genres":["Law", "Games", "Business & Personal Finance"], "artistIds":[358487470], "artworkUrl60":"http://a1.mzstatic.com/us/r30/Publication/53/f2/31/mzi.hgjghcio.60x60-50.jpg", "artworkUrl100":"http://a1.mzstatic.com/us/r30/Publication/53/f2/31/mzi.hgjghcio.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/kim-isaac-eisler/id358487470?mt=11&uo=4", "trackCensoredName":"Revenge of the Pequots", "trackViewUrl":"http://itunes.apple.com/us/book/revenge-of-the-pequots/id381463061?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null},
41
+ {"kind":"ebook", "artistId":366778579, "artistName":"Joshua Calkins-Treworgy", "price":0.99,
42
+ "description":"Welcome to Amelia, an area of land that's filled with the creatures from your darkest nightmares. In this first visit, a homeless man finds himself up against a creature determined to kill him and his fellow street people. This release includes ROADMAP TO AMELIA, an introduction to the series by the author.", "genreIds":["10048"], "releaseDate":"2010-04-21T07:00:00Z", "currency":"USD", "trackId":371317580, "trackName":"Roads Through Amelia: The Beast And The Forgotten Tribesman (Book 1)", "genres":["Horror"], "artistIds":[366778579], "artworkUrl60":"http://a2.mzstatic.com/us/r30/Publication/9d/ee/1d/mzi.ylpfstqi.60x60-50.jpg", "artworkUrl100":"http://a5.mzstatic.com/us/r30/Publication/9d/ee/1d/mzi.ylpfstqi.100x100-75.jpg", "artistViewUrl":"http://itunes.apple.com/us/artist/joshua-calkins-treworgy/id366778579?mt=11&uo=4", "trackCensoredName":"Roads Through Amelia: The Beast And The Forgotten Tribesman (Book 1)", "trackViewUrl":"http://itunes.apple.com/us/book/roads-through-amelia-the-beast/id371317580?mt=11&uo=4", "averageUserRating":null, "userRatingCount":null}]
43
+ }
44
+
@@ -0,0 +1,38 @@
1
+ require 'test_helper'
2
+
3
+ class IlinkmakerTest < Test::Unit::TestCase
4
+
5
+ context "iTunes Search API" do
6
+ context "and searching for a product" do
7
+ setup do
8
+ @client = Ilinkmaker::Client.new
9
+ end
10
+
11
+ should "find a specific product" do
12
+ stub_get("http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/wa/wsSearch?term=tribes&media=ebook", "search.json")
13
+ search_result = @client.search(:term => "tribes", :media => "ebook", :limit => 25)
14
+ search_result["results"].first["trackViewUrl"].should == "http://itunes.apple.com/us/book/tribes/id361926215?mt=11&uo=4"
15
+ end
16
+ end
17
+
18
+ context "and searching for a product with affiliate" do
19
+ setup do
20
+ @client = Ilinkmaker::Client.new(:partner_id => "wtf", :linkshare_url => "http://click.linksynergy.com/fs-bin/stat?id=XXXXXXXX&offerid=XXXXX&type=X&subid=X&tmpid=XXXX&RD_PARM1")
21
+ end
22
+
23
+ should "find a specific product and get proper affiliate link" do
24
+ stub_get("http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/wa/wsSearch?term=tribes&media=ebook", "search.json")
25
+ search_result = @client.search(:term => "tribes", :media => "ebook", :limit => 25)
26
+ @client.get_affiliate_link(search_result["results"].first).should == "http://click.linksynergy.com/fs-bin/stat?id=XXXXXXXX&offerid=XXXXX&type=X&subid=X&tmpid=XXXX&RD_PARM1=http://itunes.apple.com/us/book/tribes/id361926215?mt=11&uo=4?partner_id=wtf"
27
+ end
28
+ should "find a specific product and get proper affiliate link by passing options" do
29
+ @client = Ilinkmaker::Client.new
30
+
31
+ stub_get("http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/wa/wsSearch?term=tribes&media=ebook", "search.json")
32
+ search_result = @client.search(:term => "tribes", :media => "ebook", :limit => 25)
33
+ @client.get_affiliate_link(search_result["results"].first, {:partner_id => "wtf", :linkshare_url => "http://click.linksynergy.com/fs-bin/stat?id=XXXXXXXX&offerid=XXXXX&type=X&subid=X&tmpid=XXXX&RD_PARM1"}).should == "http://click.linksynergy.com/fs-bin/stat?id=XXXXXXXX&offerid=XXXXX&type=X&subid=X&tmpid=XXXX&RD_PARM1=http://itunes.apple.com/us/book/tribes/id361926215?mt=11&uo=4?partner_id=wtf"
34
+ end
35
+ end
36
+ end
37
+
38
+ end
@@ -0,0 +1,32 @@
1
+ require 'test/unit'
2
+ require 'pathname'
3
+ require 'rubygems'
4
+
5
+ require 'shoulda'
6
+ require 'matchy'
7
+ require 'fakeweb'
8
+
9
+ begin require 'redgreen'; rescue LoadError; end
10
+
11
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
12
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
13
+ require 'ilinkmaker'
14
+
15
+ class Test::Unit::TestCase
16
+ end
17
+
18
+ def fixture_file(filename)
19
+ return '' if filename == ''
20
+ file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename)
21
+ File.read(file_path)
22
+ end
23
+
24
+ def ilinkmaker_url(url, options={})
25
+ url =~ /^http/ ? url : "http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/wa/wsSearch#{url}"
26
+ end
27
+
28
+ def stub_get(url, filename, options={})
29
+ opts = {:body => fixture_file(filename)}.merge(options)
30
+
31
+ FakeWeb.register_uri(:get, ilinkmaker_url(url), opts)
32
+ end
metadata ADDED
@@ -0,0 +1,91 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ilinkmaker
3
+ version: !ruby/object:Gem::Version
4
+ hash: 31
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 0
10
+ version: 0.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Johnny Khai Nguyen
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-05-26 00:00:00 -05:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: httparty
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 11
30
+ segments:
31
+ - 0
32
+ - 5
33
+ - 0
34
+ version: 0.5.0
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ description: Ruby wrapper for the iTunes Store Search API
38
+ email: johnnyn@gmail.com
39
+ executables: []
40
+
41
+ extensions: []
42
+
43
+ extra_rdoc_files:
44
+ - README.md
45
+ files:
46
+ - README.md
47
+ - Rakefile
48
+ - VERSION
49
+ - ilinkmaker.gemspec
50
+ - lib/ilinkmaker.rb
51
+ - lib/ilinkmaker/client.rb
52
+ - pkg/ilinkmaker-0.0.0.gem
53
+ - test/fixtures/search.json
54
+ - test/ilinkmaker_test.rb
55
+ - test/test_helper.rb
56
+ has_rdoc: true
57
+ homepage: http://github.com/phuphighter/ilinkmaker
58
+ licenses: []
59
+
60
+ post_install_message:
61
+ rdoc_options: []
62
+
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ hash: 3
71
+ segments:
72
+ - 0
73
+ version: "0"
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ hash: 3
80
+ segments:
81
+ - 0
82
+ version: "0"
83
+ requirements: []
84
+
85
+ rubyforge_project:
86
+ rubygems_version: 1.6.2
87
+ signing_key:
88
+ specification_version: 3
89
+ summary: Ruby wrapper for the iTunes Store Search API
90
+ test_files: []
91
+