activity_streams 0.1.0 → 0.2.0

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/README.rdoc CHANGED
@@ -12,6 +12,7 @@ Example usage:
12
12
  twitter = 'http://api.cliqset.com/feed/?svcuser=rubenfonseca&feedid=twitternotesposted'
13
13
  feed = ActivityStreams::Feed.from_xml(open(twitter).read)
14
14
  feed.entries.size #=> 20
15
+ feed.entries.first.id = "http://twitter.com/rubenfonseca/statuses/10075665287"
15
16
  feed.entries.first.verbs.size #=> 1
16
17
  feed.entries.first.verbs.first #=> "http://activitystrea.ms/schema/1.0/post"
17
18
  ...
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{activity_streams}
8
- s.version = "0.1.0"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ruben Fonseca"]
12
- s.date = %q{2010-02-23}
12
+ s.date = %q{2010-03-08}
13
13
  s.description = %q{Ruby module to eat and parse ActivityStreams in various formats}
14
14
  s.email = %q{root@cpan.org}
15
15
  s.extra_rdoc_files = [
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
38
38
  s.homepage = %q{http://github.com/rubenfonseca/activity_streams}
39
39
  s.rdoc_options = ["--charset=UTF-8"]
40
40
  s.require_paths = ["lib"]
41
- s.rubygems_version = %q{1.3.5}
41
+ s.rubygems_version = %q{1.3.6}
42
42
  s.summary = %q{Ruby module to eat and parse ActivityStreams in various formats}
43
43
  s.test_files = [
44
44
  "spec/activity_streams_spec.rb",
@@ -50,6 +50,11 @@ module ActivityStreams
50
50
  res.raw_structure.entries.each do |entry|
51
51
  e = Hashie::Mash.new
52
52
 
53
+ # entry atom fields
54
+ e[:id] = entry.id
55
+ e[:published] = entry.published
56
+ e[:title] = entry.title
57
+
53
58
  # verbs
54
59
  e.verbs = []
55
60
  entry.activity_verbs.each do |verb|
@@ -94,38 +99,47 @@ module ActivityStreams
94
99
  res.raw_structure = JSON.parse(json)
95
100
  res.entries = []
96
101
 
97
- res.raw_structure.map { |x| x['activity'] }.delete_if(&:nil?).each do |entry|
102
+ res.raw_structure.delete_if { |x| x['activity'].nil? }.each do |item|
98
103
  e = Hashie::Mash.new
99
104
 
100
- # verbs
101
- e.verbs = []
102
- entry['verbs'] && entry['verbs'].each do |verb|
103
- e.verbs << verb
105
+ # id, title, published
106
+ if(entry = item['entry'])
107
+ e.id = entry['id']
108
+ e.title = entry['title']
109
+ e.published = DateTime.parse(entry['published']).feed_utils_to_gm_time rescue nil
104
110
  end
105
111
 
106
- # actor, target, context
107
- [:actor, :target, :context].each do |area|
108
- e[:actor] ||= Hashie::Mash.new
109
- e[:target] ||= Hashie::Mash.new
110
- e[:context] ||= Hashie::Hash.new
112
+ if(entry = item['activity'])
113
+ # verbs
114
+ e.verbs = []
115
+ entry['verbs'] && entry['verbs'].each do |verb|
116
+ e.verbs << verb
117
+ end
118
+
119
+ # actor, target, context
120
+ [:actor, :target, :context].each do |area|
121
+ e[:actor] ||= Hashie::Mash.new
122
+ e[:target] ||= Hashie::Mash.new
123
+ e[:context] ||= Hashie::Hash.new
111
124
 
112
- [:id, :links, :object_types, :title, :author, :content].each do |attr|
113
- unless entry.send(:[], area.to_s).nil?
114
- json_attr = attr.to_s.gsub(/\_(\w)/) { $1.upcase }
115
- e.send(:[], area).send(:[]=, attr, entry.send(:[], area.to_s).send(:[], json_attr))
125
+ [:id, :links, :object_types, :title, :author, :content].each do |attr|
126
+ unless entry.send(:[], area.to_s).nil?
127
+ json_attr = attr.to_s.gsub(/\_(\w)/) { $1.upcase }
128
+ e.send(:[], area).send(:[]=, attr, entry.send(:[], area.to_s).send(:[], json_attr))
129
+ end
116
130
  end
117
131
  end
118
- end
119
132
 
120
- # objects
121
- e.objects = []
122
- entry['objects'] && entry['objects'].each do |object|
123
- o = Hashie::Mash.new
124
- [:id, :links, :object_types, :title, :author, :content].each do |attr|
125
- json_attr = attr.to_s.gsub(/\_(\w)/) { $1.upcase }
126
- o[attr] = object.send(:[], json_attr)
133
+ # objects
134
+ e.objects = []
135
+ entry['objects'] && entry['objects'].each do |object|
136
+ o = Hashie::Mash.new
137
+ [:id, :links, :object_types, :title, :author, :content].each do |attr|
138
+ json_attr = attr.to_s.gsub(/\_(\w)/) { $1.upcase }
139
+ o[attr] = object.send(:[], json_attr)
140
+ end
141
+ e.objects << o
127
142
  end
128
- e.objects << o
129
143
  end
130
144
 
131
145
  res.entries << e
@@ -14,6 +14,13 @@ describe "ActivityStreams", "twitter" do
14
14
  @feed.entries.size.should == 20
15
15
  end
16
16
 
17
+ it "should have id, title and published on the first entry" do
18
+ entry = @feed.entries.first
19
+ entry.id.should == "http://twitter.com/rubenfonseca/statuses/9108531677"
20
+ entry.title.should == "rubenfonseca: @microft humm what about dropbox?"
21
+ entry.published.class.should == Time
22
+ end
23
+
17
24
  it "should have a list of activity:verb on the first entry" do
18
25
  verbs = @feed.entries.first.verbs
19
26
  verbs.class.should == Array
@@ -64,6 +71,12 @@ describe "ActivityStreams", "lastfm" do
64
71
  @feed.entries.size.should == 10
65
72
  end
66
73
 
74
+ it "should have tite, id and published on each entry" do
75
+ @feed.entries.first.title.should == "Alicia Keys – Sure Looks Good To Me"
76
+ @feed.entries.first.id.should == "http://www.last.fm/user/krani1#1266166889"
77
+ @feed.entries.first.published.class.should == Time
78
+ end
79
+
67
80
  it "should have a list of activity:verb on the first entry" do
68
81
  verbs = @feed.entries.first.verbs
69
82
  verbs.class.should == Array
@@ -115,6 +128,12 @@ describe ActivityStreams, "myspace" do
115
128
  @feed.entries.size.should == 1
116
129
  end
117
130
 
131
+ it "should have tite, id and published on each entry" do
132
+ @feed.entries.first.title.should == "Someone posted a photo"
133
+ @feed.entries.first.id.should == "11923759128375912735912"
134
+ @feed.entries.first.published.class.should == Time
135
+ end
136
+
118
137
  it "should have a list of activity:verb on the first entry" do
119
138
  verbs = @feed.entries.first.verbs
120
139
  verbs.class.should == Array
data/spec/lastfm.xml CHANGED
@@ -1 +1,265 @@
1
- <feed xmlns="http://www.w3.org/2005/Atom"><title type="text">krani1's Recently Played Tracks</title><id>http://www.last.fm/user/krani1</id><entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/"><activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb><published>2010-02-14T17:01:29.000Z</published><updated>2010-02-14T17:01:29.000Z</updated><id>http://www.last.fm/user/krani1#1266166889</id><title type="text">Alicia Keys – Sure Looks Good To Me</title><summary type="html">Alicia Keys – Sure Looks Good To Me</summary><service:provider><name>lastfm</name><uri>http://lastfm</uri><icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon></service:provider><activity:object><activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type><title type="text">Sure Looks Good To Me</title><author><name>Alicia Keys</name></author><link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Sure+Looks+Good+To+Me" /></activity:object><activity:actor><activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type><title type="text">krani1</title></activity:actor><link href="http://www.last.fm/music/Alicia+Keys/_/Sure+Looks+Good+To+Me" /></entry><entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/"><activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb><published>2010-02-14T16:57:00.000Z</published><updated>2010-02-14T16:57:00.000Z</updated><id>http://www.last.fm/user/krani1#1266166620</id><title type="text">Alicia Keys – Tell You Something (Nana's Reprise)</title><summary type="html">Alicia Keys – Tell You Something (Nana's Reprise)</summary><service:provider><name>lastfm</name><uri>http://lastfm</uri><icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon></service:provider><activity:object><activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type><title type="text">Tell You Something (Nana's Reprise)</title><author><name>Alicia Keys</name></author><link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Tell+You+Something+%28Nana%27s+Reprise%29" /></activity:object><activity:actor><activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type><title type="text">krani1</title></activity:actor><link href="http://www.last.fm/music/Alicia+Keys/_/Tell+You+Something+%28Nana%27s+Reprise%29" /></entry><entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/"><activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb><published>2010-02-14T16:54:52.000Z</published><updated>2010-02-14T16:54:52.000Z</updated><id>http://www.last.fm/user/krani1#1266166492</id><title type="text">Alicia Keys – Prelude To A Kiss</title><summary type="html">Alicia Keys – Prelude To A Kiss</summary><service:provider><name>lastfm</name><uri>http://lastfm</uri><icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon></service:provider><activity:object><activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type><title type="text">Prelude To A Kiss</title><author><name>Alicia Keys</name></author><link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Prelude+To+A+Kiss" /></activity:object><activity:actor><activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type><title type="text">krani1</title></activity:actor><link href="http://www.last.fm/music/Alicia+Keys/_/Prelude+To+A+Kiss" /></entry><entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/"><activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb><published>2010-02-14T16:50:42.000Z</published><updated>2010-02-14T16:50:42.000Z</updated><id>http://www.last.fm/user/krani1#1266166242</id><title type="text">Alicia Keys – Where Do We Go From Here</title><summary type="html">Alicia Keys – Where Do We Go From Here</summary><service:provider><name>lastfm</name><uri>http://lastfm</uri><icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon></service:provider><activity:object><activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type><title type="text">Where Do We Go From Here</title><author><name>Alicia Keys</name></author><link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Where+Do+We+Go+From+Here" /></activity:object><activity:actor><activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type><title type="text">krani1</title></activity:actor><link href="http://www.last.fm/music/Alicia+Keys/_/Where+Do+We+Go+From+Here" /></entry><entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/"><activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb><published>2010-02-14T16:45:32.000Z</published><updated>2010-02-14T16:45:32.000Z</updated><id>http://www.last.fm/user/krani1#1266165932</id><title type="text">Alicia Keys – I Need You</title><summary type="html">Alicia Keys – I Need You</summary><service:provider><name>lastfm</name><uri>http://lastfm</uri><icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon></service:provider><activity:object><activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type><title type="text">I Need You</title><author><name>Alicia Keys</name></author><link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/I+Need+You" /></activity:object><activity:actor><activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type><title type="text">krani1</title></activity:actor><link href="http://www.last.fm/music/Alicia+Keys/_/I+Need+You" /></entry><entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/"><activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb><published>2010-02-14T16:42:22.000Z</published><updated>2010-02-14T16:42:22.000Z</updated><id>http://www.last.fm/user/krani1#1266165742</id><title type="text">Alicia Keys – Teenage Love Affair</title><summary type="html">Alicia Keys – Teenage Love Affair</summary><service:provider><name>lastfm</name><uri>http://lastfm</uri><icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon></service:provider><activity:object><activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type><title type="text">Teenage Love Affair</title><author><name>Alicia Keys</name></author><link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Teenage+Love+Affair" /></activity:object><activity:actor><activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type><title type="text">krani1</title></activity:actor><link href="http://www.last.fm/music/Alicia+Keys/_/Teenage+Love+Affair" /></entry><entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/"><activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb><published>2010-02-14T16:38:32.000Z</published><updated>2010-02-14T16:38:32.000Z</updated><id>http://www.last.fm/user/krani1#1266165512</id><title type="text">Alicia Keys – The Thing About Love</title><summary type="html">Alicia Keys – The Thing About Love</summary><service:provider><name>lastfm</name><uri>http://lastfm</uri><icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon></service:provider><activity:object><activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type><title type="text">The Thing About Love</title><author><name>Alicia Keys</name></author><link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/The+Thing+About+Love" /></activity:object><activity:actor><activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type><title type="text">krani1</title></activity:actor><link href="http://www.last.fm/music/Alicia+Keys/_/The+Thing+About+Love" /></entry><entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/"><activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb><published>2010-02-14T16:34:39.000Z</published><updated>2010-02-14T16:34:39.000Z</updated><id>http://www.last.fm/user/krani1#1266165279</id><title type="text">Alicia Keys – Wreckless Love</title><summary type="html">Alicia Keys – Wreckless Love</summary><service:provider><name>lastfm</name><uri>http://lastfm</uri><icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon></service:provider><activity:object><activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type><title type="text">Wreckless Love</title><author><name>Alicia Keys</name></author><link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Wreckless+Love" /></activity:object><activity:actor><activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type><title type="text">krani1</title></activity:actor><link href="http://www.last.fm/music/Alicia+Keys/_/Wreckless+Love" /></entry><entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/"><activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb><published>2010-02-14T16:30:25.000Z</published><updated>2010-02-14T16:30:25.000Z</updated><id>http://www.last.fm/user/krani1#1266165025</id><title type="text">Alicia Keys – Lesson Learned (featuring John Mayer)</title><summary type="html">Alicia Keys – Lesson Learned (featuring John Mayer)</summary><service:provider><name>lastfm</name><uri>http://lastfm</uri><icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon></service:provider><activity:object><activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type><title type="text">Lesson Learned (featuring John Mayer)</title><author><name>Alicia Keys</name></author><link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Lesson+Learned+%28featuring+John+Mayer%29" /></activity:object><activity:actor><activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type><title type="text">krani1</title></activity:actor><link href="http://www.last.fm/music/Alicia+Keys/_/Lesson+Learned+%28featuring+John+Mayer%29" /></entry><entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/"><activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb><published>2010-02-14T16:25:10.000Z</published><updated>2010-02-14T16:25:10.000Z</updated><id>http://www.last.fm/user/krani1#1266164710</id><title type="text">Alicia Keys – Like You'll Never See Me Again</title><summary type="html">Alicia Keys – Like You'll Never See Me Again</summary><service:provider><name>lastfm</name><uri>http://lastfm</uri><icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon></service:provider><activity:object><activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type><title type="text">Like You'll Never See Me Again</title><author><name>Alicia Keys</name></author><link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Like+You%27ll+Never+See+Me+Again" /></activity:object><activity:actor><activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type><title type="text">krani1</title></activity:actor><link href="http://www.last.fm/music/Alicia+Keys/_/Like+You%27ll+Never+See+Me+Again" /></entry></feed>
1
+ <?xml version="1.0"?>
2
+ <feed xmlns="http://www.w3.org/2005/Atom">
3
+ <title type="text">krani1's Recently Played Tracks</title>
4
+ <id>http://www.last.fm/user/krani1</id>
5
+ <entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/">
6
+ <activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb>
7
+ <published>2010-02-14T17:01:29.000Z</published>
8
+ <updated>2010-02-14T17:01:29.000Z</updated>
9
+ <id>http://www.last.fm/user/krani1#1266166889</id>
10
+ <title type="text">Alicia Keys &#x2013; Sure Looks Good To Me</title>
11
+ <summary type="html">Alicia Keys &#x2013; Sure Looks Good To Me</summary>
12
+ <service:provider>
13
+ <name>lastfm</name>
14
+ <uri>http://lastfm</uri>
15
+ <icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon>
16
+ </service:provider>
17
+ <activity:object>
18
+ <activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type>
19
+ <title type="text">Sure Looks Good To Me</title>
20
+ <author>
21
+ <name>Alicia Keys</name>
22
+ </author>
23
+ <link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Sure+Looks+Good+To+Me"/>
24
+ </activity:object>
25
+ <activity:actor>
26
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
27
+ <title type="text">krani1</title>
28
+ </activity:actor>
29
+ <link href="http://www.last.fm/music/Alicia+Keys/_/Sure+Looks+Good+To+Me"/>
30
+ </entry>
31
+ <entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/">
32
+ <activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb>
33
+ <published>2010-02-14T16:57:00.000Z</published>
34
+ <updated>2010-02-14T16:57:00.000Z</updated>
35
+ <id>http://www.last.fm/user/krani1#1266166620</id>
36
+ <title type="text">Alicia Keys &#x2013; Tell You Something (Nana's Reprise)</title>
37
+ <summary type="html">Alicia Keys &#x2013; Tell You Something (Nana's Reprise)</summary>
38
+ <service:provider>
39
+ <name>lastfm</name>
40
+ <uri>http://lastfm</uri>
41
+ <icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon>
42
+ </service:provider>
43
+ <activity:object>
44
+ <activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type>
45
+ <title type="text">Tell You Something (Nana's Reprise)</title>
46
+ <author>
47
+ <name>Alicia Keys</name>
48
+ </author>
49
+ <link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Tell+You+Something+%28Nana%27s+Reprise%29"/>
50
+ </activity:object>
51
+ <activity:actor>
52
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
53
+ <title type="text">krani1</title>
54
+ </activity:actor>
55
+ <link href="http://www.last.fm/music/Alicia+Keys/_/Tell+You+Something+%28Nana%27s+Reprise%29"/>
56
+ </entry>
57
+ <entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/">
58
+ <activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb>
59
+ <published>2010-02-14T16:54:52.000Z</published>
60
+ <updated>2010-02-14T16:54:52.000Z</updated>
61
+ <id>http://www.last.fm/user/krani1#1266166492</id>
62
+ <title type="text">Alicia Keys &#x2013; Prelude To A Kiss</title>
63
+ <summary type="html">Alicia Keys &#x2013; Prelude To A Kiss</summary>
64
+ <service:provider>
65
+ <name>lastfm</name>
66
+ <uri>http://lastfm</uri>
67
+ <icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon>
68
+ </service:provider>
69
+ <activity:object>
70
+ <activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type>
71
+ <title type="text">Prelude To A Kiss</title>
72
+ <author>
73
+ <name>Alicia Keys</name>
74
+ </author>
75
+ <link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Prelude+To+A+Kiss"/>
76
+ </activity:object>
77
+ <activity:actor>
78
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
79
+ <title type="text">krani1</title>
80
+ </activity:actor>
81
+ <link href="http://www.last.fm/music/Alicia+Keys/_/Prelude+To+A+Kiss"/>
82
+ </entry>
83
+ <entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/">
84
+ <activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb>
85
+ <published>2010-02-14T16:50:42.000Z</published>
86
+ <updated>2010-02-14T16:50:42.000Z</updated>
87
+ <id>http://www.last.fm/user/krani1#1266166242</id>
88
+ <title type="text">Alicia Keys &#x2013; Where Do We Go From Here</title>
89
+ <summary type="html">Alicia Keys &#x2013; Where Do We Go From Here</summary>
90
+ <service:provider>
91
+ <name>lastfm</name>
92
+ <uri>http://lastfm</uri>
93
+ <icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon>
94
+ </service:provider>
95
+ <activity:object>
96
+ <activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type>
97
+ <title type="text">Where Do We Go From Here</title>
98
+ <author>
99
+ <name>Alicia Keys</name>
100
+ </author>
101
+ <link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Where+Do+We+Go+From+Here"/>
102
+ </activity:object>
103
+ <activity:actor>
104
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
105
+ <title type="text">krani1</title>
106
+ </activity:actor>
107
+ <link href="http://www.last.fm/music/Alicia+Keys/_/Where+Do+We+Go+From+Here"/>
108
+ </entry>
109
+ <entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/">
110
+ <activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb>
111
+ <published>2010-02-14T16:45:32.000Z</published>
112
+ <updated>2010-02-14T16:45:32.000Z</updated>
113
+ <id>http://www.last.fm/user/krani1#1266165932</id>
114
+ <title type="text">Alicia Keys &#x2013; I Need You</title>
115
+ <summary type="html">Alicia Keys &#x2013; I Need You</summary>
116
+ <service:provider>
117
+ <name>lastfm</name>
118
+ <uri>http://lastfm</uri>
119
+ <icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon>
120
+ </service:provider>
121
+ <activity:object>
122
+ <activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type>
123
+ <title type="text">I Need You</title>
124
+ <author>
125
+ <name>Alicia Keys</name>
126
+ </author>
127
+ <link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/I+Need+You"/>
128
+ </activity:object>
129
+ <activity:actor>
130
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
131
+ <title type="text">krani1</title>
132
+ </activity:actor>
133
+ <link href="http://www.last.fm/music/Alicia+Keys/_/I+Need+You"/>
134
+ </entry>
135
+ <entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/">
136
+ <activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb>
137
+ <published>2010-02-14T16:42:22.000Z</published>
138
+ <updated>2010-02-14T16:42:22.000Z</updated>
139
+ <id>http://www.last.fm/user/krani1#1266165742</id>
140
+ <title type="text">Alicia Keys &#x2013; Teenage Love Affair</title>
141
+ <summary type="html">Alicia Keys &#x2013; Teenage Love Affair</summary>
142
+ <service:provider>
143
+ <name>lastfm</name>
144
+ <uri>http://lastfm</uri>
145
+ <icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon>
146
+ </service:provider>
147
+ <activity:object>
148
+ <activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type>
149
+ <title type="text">Teenage Love Affair</title>
150
+ <author>
151
+ <name>Alicia Keys</name>
152
+ </author>
153
+ <link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Teenage+Love+Affair"/>
154
+ </activity:object>
155
+ <activity:actor>
156
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
157
+ <title type="text">krani1</title>
158
+ </activity:actor>
159
+ <link href="http://www.last.fm/music/Alicia+Keys/_/Teenage+Love+Affair"/>
160
+ </entry>
161
+ <entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/">
162
+ <activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb>
163
+ <published>2010-02-14T16:38:32.000Z</published>
164
+ <updated>2010-02-14T16:38:32.000Z</updated>
165
+ <id>http://www.last.fm/user/krani1#1266165512</id>
166
+ <title type="text">Alicia Keys &#x2013; The Thing About Love</title>
167
+ <summary type="html">Alicia Keys &#x2013; The Thing About Love</summary>
168
+ <service:provider>
169
+ <name>lastfm</name>
170
+ <uri>http://lastfm</uri>
171
+ <icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon>
172
+ </service:provider>
173
+ <activity:object>
174
+ <activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type>
175
+ <title type="text">The Thing About Love</title>
176
+ <author>
177
+ <name>Alicia Keys</name>
178
+ </author>
179
+ <link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/The+Thing+About+Love"/>
180
+ </activity:object>
181
+ <activity:actor>
182
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
183
+ <title type="text">krani1</title>
184
+ </activity:actor>
185
+ <link href="http://www.last.fm/music/Alicia+Keys/_/The+Thing+About+Love"/>
186
+ </entry>
187
+ <entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/">
188
+ <activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb>
189
+ <published>2010-02-14T16:34:39.000Z</published>
190
+ <updated>2010-02-14T16:34:39.000Z</updated>
191
+ <id>http://www.last.fm/user/krani1#1266165279</id>
192
+ <title type="text">Alicia Keys &#x2013; Wreckless Love</title>
193
+ <summary type="html">Alicia Keys &#x2013; Wreckless Love</summary>
194
+ <service:provider>
195
+ <name>lastfm</name>
196
+ <uri>http://lastfm</uri>
197
+ <icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon>
198
+ </service:provider>
199
+ <activity:object>
200
+ <activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type>
201
+ <title type="text">Wreckless Love</title>
202
+ <author>
203
+ <name>Alicia Keys</name>
204
+ </author>
205
+ <link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Wreckless+Love"/>
206
+ </activity:object>
207
+ <activity:actor>
208
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
209
+ <title type="text">krani1</title>
210
+ </activity:actor>
211
+ <link href="http://www.last.fm/music/Alicia+Keys/_/Wreckless+Love"/>
212
+ </entry>
213
+ <entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/">
214
+ <activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb>
215
+ <published>2010-02-14T16:30:25.000Z</published>
216
+ <updated>2010-02-14T16:30:25.000Z</updated>
217
+ <id>http://www.last.fm/user/krani1#1266165025</id>
218
+ <title type="text">Alicia Keys &#x2013; Lesson Learned (featuring John Mayer)</title>
219
+ <summary type="html">Alicia Keys &#x2013; Lesson Learned (featuring John Mayer)</summary>
220
+ <service:provider>
221
+ <name>lastfm</name>
222
+ <uri>http://lastfm</uri>
223
+ <icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon>
224
+ </service:provider>
225
+ <activity:object>
226
+ <activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type>
227
+ <title type="text">Lesson Learned (featuring John Mayer)</title>
228
+ <author>
229
+ <name>Alicia Keys</name>
230
+ </author>
231
+ <link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Lesson+Learned+%28featuring+John+Mayer%29"/>
232
+ </activity:object>
233
+ <activity:actor>
234
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
235
+ <title type="text">krani1</title>
236
+ </activity:actor>
237
+ <link href="http://www.last.fm/music/Alicia+Keys/_/Lesson+Learned+%28featuring+John+Mayer%29"/>
238
+ </entry>
239
+ <entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/">
240
+ <activity:verb>http://activitystrea.ms/schema/1.0/play</activity:verb>
241
+ <published>2010-02-14T16:25:10.000Z</published>
242
+ <updated>2010-02-14T16:25:10.000Z</updated>
243
+ <id>http://www.last.fm/user/krani1#1266164710</id>
244
+ <title type="text">Alicia Keys &#x2013; Like You'll Never See Me Again</title>
245
+ <summary type="html">Alicia Keys &#x2013; Like You'll Never See Me Again</summary>
246
+ <service:provider>
247
+ <name>lastfm</name>
248
+ <uri>http://lastfm</uri>
249
+ <icon>http://cliqset-services.s3.amazonaws.com/lastfm.png</icon>
250
+ </service:provider>
251
+ <activity:object>
252
+ <activity:object-type>http://activitystrea.ms/schema/1.0/song</activity:object-type>
253
+ <title type="text">Like You'll Never See Me Again</title>
254
+ <author>
255
+ <name>Alicia Keys</name>
256
+ </author>
257
+ <link rel="alternate" type="text/html" href="http://www.last.fm/music/Alicia+Keys/_/Like+You%27ll+Never+See+Me+Again"/>
258
+ </activity:object>
259
+ <activity:actor>
260
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
261
+ <title type="text">krani1</title>
262
+ </activity:actor>
263
+ <link href="http://www.last.fm/music/Alicia+Keys/_/Like+You%27ll+Never+See+Me+Again"/>
264
+ </entry>
265
+ </feed>
data/spec/myspace.json CHANGED
@@ -1,5 +1,10 @@
1
1
  [
2
2
  {
3
+ "entry": {
4
+ "title": "Someone posted a photo",
5
+ "id": "11923759128375912735912",
6
+ "published": "2010-02-14T17:01:29.000Z"
7
+ },
3
8
  "activity": {
4
9
  "actor": {
5
10
  "id": "tag:myspace.com,2009:/Person/81472123",