Starting profiles previews.
This commit is contained in:
parent
bb52a662c2
commit
e045592827
@ -3,5 +3,5 @@ userEndPointFor: username selecting: tweetsOrMentions
|
||||
"I build a shared URL for querying last 100 mentions or tweets for a particular user.
|
||||
Second parameter should be only 'tweets' or 'mentions', dateString, if present, should be YYYY-MM-DD."
|
||||
| commonQueryParameters |
|
||||
commonQueryParameters := '?expansions=author_id&tweet.fields=conversation_id,created_at&user.fields=username,profile_image_url&max_results=100'.
|
||||
commonQueryParameters := '?expansions=author_id&tweet.fields=conversation_id,created_at&user.fields=username,name,profile_image_url&max_results=100'.
|
||||
^ self usersBaseEndPoint, (self userIDFrom: username), '/', tweetsOrMentions, commonQueryParameters
|
@ -0,0 +1,49 @@
|
||||
accessing
|
||||
gtViewContactDetailsOn: aView
|
||||
<gtView>
|
||||
^ aView explicit
|
||||
title: 'Details' translated;
|
||||
priority: 5;
|
||||
stencil: [
|
||||
|container verticalContainer detailsTextContainer avatarContainer nameTextContainer details|
|
||||
details := String streamContents: [:aStream |
|
||||
aStream nextPutAll: self name.
|
||||
aStream cr.
|
||||
].
|
||||
|
||||
container := BlElement new
|
||||
layout: BlLinearLayout horizontal;
|
||||
background: Color white;
|
||||
aptitude: BrShadowAptitude;
|
||||
margin: (BlInsets all: 20);
|
||||
constraintsDo: [ :c |
|
||||
c horizontal fitContent.
|
||||
c vertical fitContent].
|
||||
avatarContainer := BlElement new
|
||||
size: 124@124;
|
||||
background: (self profileImage scaledToSize: 124@124);
|
||||
margin: (BlInsets all: 10).
|
||||
nameTextContainer := BlTextElement new
|
||||
constraintsDo: [ :c |
|
||||
c horizontal matchParent ];
|
||||
margin: (BlInsets top: 5 right: 0 bottom: 20 left: 5);
|
||||
text: (('@', self userName) asRopedText glamorousRegularFont
|
||||
fontSize: 30;
|
||||
foreground: Color black).
|
||||
detailsTextContainer := BrEditor new
|
||||
aptitude: (BrGlamorousRegularEditorAptitude new fontSize: 16);
|
||||
text: details;
|
||||
constraintsDo: [ :c |
|
||||
c horizontal matchParent.
|
||||
c vertical matchParent ].
|
||||
verticalContainer := BlElement new
|
||||
layout: BlLinearLayout vertical;
|
||||
margin: (BlInsets all: 10);
|
||||
constraintsDo: [ :c |
|
||||
c horizontal matchParent.
|
||||
c vertical matchParent].
|
||||
verticalContainer addChild: nameTextContainer.
|
||||
verticalContainer addChild: detailsTextContainer.
|
||||
container addChild: avatarContainer.
|
||||
container addChild: verticalContainer.
|
||||
container ].
|
3
Datanalitica.package/TwitterUser.class/instance/name.st
Normal file
3
Datanalitica.package/TwitterUser.class/instance/name.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
name
|
||||
^ name
|
@ -0,0 +1,12 @@
|
||||
accessing
|
||||
gtUsersMentioningOn: aView
|
||||
<gtView>
|
||||
^ aView columnedList
|
||||
title: self title translated;
|
||||
priority: 5;
|
||||
items: [ self users ];
|
||||
column: 'Imagen'
|
||||
icon: [ :aTwitterUser | aTwitterUser profileImage asElement asScalableElement size: 32 @ 32 ]
|
||||
width: 75;
|
||||
column: 'User Name' text: [ :aTwitterUser | aTwitterUser userName ];
|
||||
column: 'Name' text: [ :aTwitterUser | aTwitterUser name ]
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
title: aString
|
||||
title := aString
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
title
|
||||
^ title
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
users: aTwitterUsersCollection
|
||||
users := aTwitterUsersCollection
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
users
|
||||
^ users
|
14
Datanalitica.package/TwitterUsersGroup.class/properties.json
Normal file
14
Datanalitica.package/TwitterUsersGroup.class/properties.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"commentStamp" : "",
|
||||
"super" : "Object",
|
||||
"category" : "Datanalitica-Datanalitica",
|
||||
"classinstvars" : [ ],
|
||||
"pools" : [ ],
|
||||
"classvars" : [ ],
|
||||
"instvars" : [
|
||||
"users",
|
||||
"title"
|
||||
],
|
||||
"name" : "TwitterUsersGroup",
|
||||
"type" : "normal"
|
||||
}
|
Loading…
Reference in New Issue
Block a user