this changes all api calls to respect the flags for tor and tor-port
- config now has TorPort method to return flag value if set, or default
- api now only has newClient, this creates a tor client when flag is
present. does not need to be exported anymore
- no methods take a tor argument as no longer needed
- all commands now share the same behaviour logging tor messages
- api.torClient was removed as not used anywhere
- all calls to api.newClient now check for and return the error
- api.HandlePost was removed as redundant of api.DoPost
- remove line about authentication not being supported
- add claim to list of commands in both README and GUIDE
- add auth, blogs and claim example usage in GUIDE
- Presents a summary before making the request when verbose (-v) enabled
- Successful claims only shown with verbose (-v) enabled
- Failed claims now always mention cause of failure
- A summary of successes / failures shows after logging any failures,
when verbose (-v) enabled
Ref T194
this moves string trimming into it's own helper which accounts for the
possibility of multi-byte runes.
includes tests for ascii and utf-8 language strings
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