USING: accessors continuations fry http.client images.loader
images.loader.private images.viewer io io.styles kernel memoize
-prettyprint sequences twitter ;
+prettyprint sequences twitter assocs ;
IN: twitter.prettyprint
MEMO: load-http-image ( url -- image/f )
{ font-size 10 }
}
+: profile. ( user -- )
+ tweet-table-style [
+ [
+ [ dup "profile_image_url" of load-http-image image. ] with-cell
+ [
+ tweet-username-style [
+ dup "name" of write nl
+ dup "screen_name" of write
+ ] with-style
+ ] with-cell
+ ] with-row
+ ] tabular-output nl
+ drop ;
+
: tweet. ( status -- )
tweet-table-style [
[
] tabular-output nl
drop ;
+: user-profile. ( user -- ) user-profile profile. ;
: friends-timeline. ( -- ) friends-timeline [ tweet. ] each ;
: public-timeline. ( -- ) public-timeline [ tweet. ] each ;
: user-timeline. ( user -- ) user-timeline [ tweet. ] each ;