Merge dd655260b4
This commit is contained in:
commit
d66cc2a62c
@ -0,0 +1,10 @@
|
|||||||
|
accessing
|
||||||
|
getMessages
|
||||||
|
| lastTweetsRaw lastTweets |
|
||||||
|
lastTweetsRaw := self rssFeed xmlDocument xpath: '//item'.
|
||||||
|
lastTweets := TweetsCollection new.
|
||||||
|
lastTweetsRaw do: [ :rssTweet |
|
||||||
|
lastTweets add: ((Tweet new fromNitterRssItem: rssTweet ))
|
||||||
|
].
|
||||||
|
^ lastTweets
|
||||||
|
|
@ -0,0 +1,9 @@
|
|||||||
|
accessing
|
||||||
|
fromNitterRssItem: xmlItem
|
||||||
|
| author |
|
||||||
|
author := (xmlItem xpath: 'dc:creator') stringValue allButFirst.
|
||||||
|
user := NitterUser new
|
||||||
|
userName: author .
|
||||||
|
created := (xmlItem xpath: 'pubDate') stringValue.
|
||||||
|
text := (XMLHTMLParser on: (xmlItem xpath: 'description') stringValue) parseDocument stringValue.
|
||||||
|
id := ((xmlItem xpath: 'guid') stringValue splitOn: '/') last copyReplaceAll: '#m' with: ''
|
@ -41,7 +41,7 @@ asCardElement
|
|||||||
BrButton new
|
BrButton new
|
||||||
aptitude: BrGlamorousButtonWithLabelAptitude new;
|
aptitude: BrGlamorousButtonWithLabelAptitude new;
|
||||||
label: 'Tweets';
|
label: 'Tweets';
|
||||||
action: [ :e | e phlow spawnObject: self tweets ].
|
action: [ :e | e phlow spawnObject: self getMessages ].
|
||||||
BrButton new
|
BrButton new
|
||||||
aptitude: BrGlamorousButtonWithLabelAptitude new;
|
aptitude: BrGlamorousButtonWithLabelAptitude new;
|
||||||
label: 'Web view';
|
label: 'Web view';
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
accessing
|
accessing
|
||||||
tweets
|
tweets
|
||||||
^ tweets ifNil: [ self tweets: self getMessages ]
|
^ tweets ifNil: [ tweets := OrderedCollection new ]
|
Loading…
Reference in New Issue
Block a user