Improving variables for tracking data origins as results for the same query can change over time (for example in case an account is deleted).
This commit is contained in:
parent
fc5f13e8d2
commit
b2acdeba55
@ -1,5 +1,3 @@
|
||||
accessing
|
||||
addKeyword: keyword to: subtopic
|
||||
self subtopics
|
||||
at: subtopic put: keyword;
|
||||
yourself.
|
||||
(self subtopics at: subtopic) add: keyword.
|
@ -1,5 +1,4 @@
|
||||
accessing
|
||||
userMentionsFor: username
|
||||
| rawResponse queryURL |
|
||||
"The following query gets the last 100 mentions that is the maximun allowed for a particular user without pagination:"
|
||||
^ self userQueryFor: username selecting: 'mentions'
|
@ -4,4 +4,7 @@ userQueryFor: username selecting: tweetsOrMentions
|
||||
"The following query gets the last 100 tweets or mentions that is the maximun allowed for a particular user without pagination:"
|
||||
queryURL := self userEndPointFor: username selecting: tweetsOrMentions.
|
||||
rawResponse := self rawResponseForURL:queryURL.
|
||||
^ TwitterAPIResponse new fromDictionary: (STONJSON fromString: rawResponse)
|
||||
^ TwitterAPIResponse new
|
||||
fromDictionary: (STONJSON fromString: rawResponse);
|
||||
queryURL: queryURL;
|
||||
date: DateAndTime now.
|
@ -1,5 +1,8 @@
|
||||
accessing
|
||||
usersGroupMentioning: userName
|
||||
| response |
|
||||
response := self userQueryFor: userName selecting: 'mentions'.
|
||||
^ TwitterUsersGroup new
|
||||
users: (self usersMentioning: userName);
|
||||
title: 'Users mentioning @', userName
|
||||
users: response messagesAuthors;
|
||||
title: 'Users mentioning @', userName;
|
||||
origin: response queryURL
|
@ -0,0 +1,4 @@
|
||||
accessing
|
||||
date: aDateAndTime
|
||||
"As answers to the same query can change over time, for example regarding deteled users, its important to know where a query was ran."
|
||||
date := aDateAndTime
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
date
|
||||
^ date
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
fromQueryURL: aQueryURLString
|
||||
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
queryURL: aQueryURLString
|
||||
queryURL := aQueryURLString
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
queryURL
|
||||
^ queryURL
|
@ -8,7 +8,9 @@
|
||||
"instvars" : [
|
||||
"data",
|
||||
"includes",
|
||||
"meta"
|
||||
"meta",
|
||||
"queryURL",
|
||||
"date"
|
||||
],
|
||||
"name" : "TwitterAPIResponse",
|
||||
"type" : "normal"
|
||||
|
@ -0,0 +1,5 @@
|
||||
I model a group of Twitter users. Generally I am the result of running a query on the Twitter API or refining over another
|
||||
Twitter users group.
|
||||
|
||||
I have methods that allow the running of such queries and making visualizations on particular properties of my users
|
||||
or their tweets and in the future I will support topic modelling.
|
@ -0,0 +1,4 @@
|
||||
accessing
|
||||
origin: anObject
|
||||
|
||||
origin := anObject
|
@ -0,0 +1,4 @@
|
||||
accessing
|
||||
origin
|
||||
|
||||
^ origin
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"commentStamp" : "",
|
||||
"commentStamp" : "<historical>",
|
||||
"super" : "Object",
|
||||
"category" : "Datanalitica-Datanalitica",
|
||||
"classinstvars" : [ ],
|
||||
@ -8,7 +8,8 @@
|
||||
"instvars" : [
|
||||
"users",
|
||||
"title",
|
||||
"discourseTopics"
|
||||
"discourseTopics",
|
||||
"origin"
|
||||
],
|
||||
"name" : "TwitterUsersGroup",
|
||||
"type" : "normal"
|
||||
|
Loading…
Reference in New Issue
Block a user