From 9d3769b21a81ac224d19a40b23dea374be89a940 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Wed, 6 Apr 2022 09:50:50 -0500 Subject: [PATCH] Tweet ODBM preliminar model working. TwitterUser storage needs fixing. --- Socialmetrica.package/Tweet.class/class/reStoreDefinition.st | 2 +- Socialmetrica.package/Tweet.class/instance/authorId.st | 3 +++ .../Tweet.class/instance/fromNitterRssItem..st | 3 ++- .../TwitterUser.class/class/reStoreDefinition.st | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 Socialmetrica.package/Tweet.class/instance/authorId.st diff --git a/Socialmetrica.package/Tweet.class/class/reStoreDefinition.st b/Socialmetrica.package/Tweet.class/class/reStoreDefinition.st index f2ce55c..9aa39a3 100644 --- a/Socialmetrica.package/Tweet.class/class/reStoreDefinition.st +++ b/Socialmetrica.package/Tweet.class/class/reStoreDefinition.st @@ -4,6 +4,6 @@ reStoreDefinition defineAsID: #id; define: #text as: String; define: #created as: String; - define: #user as: TwitterUser; + define: #authorId as: String; define: #timelines as: (Dictionary of: String -> String); yourself \ No newline at end of file diff --git a/Socialmetrica.package/Tweet.class/instance/authorId.st b/Socialmetrica.package/Tweet.class/instance/authorId.st new file mode 100644 index 0000000..f31f64f --- /dev/null +++ b/Socialmetrica.package/Tweet.class/instance/authorId.st @@ -0,0 +1,3 @@ +accessing +authorId + ^ authorId ifNil: [ self user id ] \ No newline at end of file diff --git a/Socialmetrica.package/Tweet.class/instance/fromNitterRssItem..st b/Socialmetrica.package/Tweet.class/instance/fromNitterRssItem..st index 3245508..cd493a7 100644 --- a/Socialmetrica.package/Tweet.class/instance/fromNitterRssItem..st +++ b/Socialmetrica.package/Tweet.class/instance/fromNitterRssItem..st @@ -6,4 +6,5 @@ fromNitterRssItem: xmlItem userName: author . created := (xmlItem xpath: 'pubDate') stringValue. text := (xmlItem xpath: 'description') stringValue. - id := ((xmlItem xpath: 'guid') stringValue splitOn: '/') last copyReplaceAll: '#m' with: '' \ No newline at end of file + id := ((xmlItem xpath: 'guid') stringValue splitOn: '/') last copyReplaceAll: '#m' with: ''. + authorId := self user id. \ No newline at end of file diff --git a/Socialmetrica.package/TwitterUser.class/class/reStoreDefinition.st b/Socialmetrica.package/TwitterUser.class/class/reStoreDefinition.st index 0773c3f..e8e7b22 100644 --- a/Socialmetrica.package/TwitterUser.class/class/reStoreDefinition.st +++ b/Socialmetrica.package/TwitterUser.class/class/reStoreDefinition.st @@ -1,7 +1,8 @@ accessing reStoreDefinition ^ super reStoreDefinition - define: #id as: String; + defineAsID: #id; define: #userName as: String; define: #profileImageUrl as: String; + define: #profileBio as: String; yourself. \ No newline at end of file