HomeMusing Studio

Resolves T604 Fetch users posts if authenticated

Description

Resolves T604 Fetch users posts if authenticated

This changes the 'posts' subcommand, previously 'list', to also list any
remote posts for the user if currently authenticated.

  • adds DoFetchPosts to the api pkg which returns all the logged in users

posts.

  • adds a RemotePost type to the api pkg which stores some of the return

information from DoFetchPosts for use in printing to stdout

  • adds GetUserPosts to the api pkg which converts the incoming

writeas.Posts into the smaller RemotePost type

  • adds getExcerpt which takes the incoming writeas.Post.Content and

returns a trimmed down excerpt of the content. Max 2 lines of 80 chars
and delimited by '...'

  • changes CmdList from pkg commands to CmdListPosts which now writes out

any local and remote posts in simple formatted tables

Details

Provenance
robjlorangerAuthored on May 30 2019, 8:37 PM
Parents
rWCLIbf389561d628: rename cmd writeas list >> writeas posts
Branches
Unknown
Tags
Unknown
Tasks
T604: Fetch user posts if authenticated