Populating the NitterUser contents and improving data extraction.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-01-02 19:55:03 -05:00
parent f6b14c086d
commit e7973abbac
3 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,3 @@
accessing
id
^ id ifNil: [id := self profileImageUrl segments third]

View File

@ -1,3 +1,4 @@
accessing
profileImageUrl
^ profileImageUrl ifNil: [ (self rssFeed xmlDocument xpath: '//image/url') stringValue copyReplaceAll: '%2F' with: '/' ]
^ profileImageUrl ifNil: [
profileImageUrl := ((self rssFeed xmlDocument xpath: '//image/url') stringValue copyReplaceAll: '%2F' with: '/') asUrl ]

View File

@ -0,0 +1,11 @@
accessing
retrieveContents
self userName ifNil: [^ self].
^ self
id;
name;
description;
createdAt;
url;
profileImageUrl;
yourself.