Starting profiles previews.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2021-08-18 17:00:15 -05:00
parent bb52a662c2
commit e045592827
10 changed files with 91 additions and 1 deletions

View File

@ -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

View File

@ -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 ].

View File

@ -0,0 +1,3 @@
accessing
name
^ name

View File

@ -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 ]

View File

@ -0,0 +1,3 @@
accessing
title: aString
title := aString

View File

@ -0,0 +1,3 @@
accessing
title
^ title

View File

@ -0,0 +1,3 @@
accessing
users: aTwitterUsersCollection
users := aTwitterUsersCollection

View File

@ -0,0 +1,3 @@
accessing
users
^ users

View File

@ -0,0 +1,14 @@
{
"commentStamp" : "",
"super" : "Object",
"category" : "Datanalitica-Datanalitica",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"users",
"title"
],
"name" : "TwitterUsersGroup",
"type" : "normal"
}