diff --git a/shitty_api.sh b/shitty_api.sh index 8675a3a..b8a33fb 100755 --- a/shitty_api.sh +++ b/shitty_api.sh @@ -16,8 +16,11 @@ showpost='(.post | (.id | tostring)+" "+(.name | tostring)), ((.comment // .post) | .published, (.body // .content)), ""' -showcomment='(.post | (.id | tostring)+" "+(.name | tostring)), -(.comment | (.parent_id | tostring)+"->"+(.id | tostring))+", "+(.creator.display_name // .creator.name)+":", +postsummary='(.post | (.id | tostring)+" "+(.name | tostring)), +(.post.url)+", "+(.creator.display_name // .creator.name)+":", +((.comment // .post) | .published), +""' +showcomment='(.comment | (.parent_id | tostring)+"->"+(.id | tostring))+", "+(.creator.display_name // .creator.name)+":", ((.comment // .post) | .published, (.body // .content)), ""' @@ -48,7 +51,7 @@ shitpost(){ getbody; postid=$1; parentid=$2; post "comment" "{\"post_id\":$posti #Post hoardan save(){ put "post/save" "{\"post_id\":$1,\"save\":true}"; } unsave(){ put "post/save" "{\"post_id\":$1,\"save\":false}"; } -load(){ getauth "post/list" ".posts | $posts" "type_=All&saved_only=true"; } +load(){ getauth "post/list" ".posts | .[] | $postsummary" "type_=All&saved_only=true"; } #Community hoardan follow(){ post "community/follow" "{\"community_id\":$1,\"follow\":true}"; } unfollow(){ post "community/follow" "{\"community_id\":$1,\"follow\":false}"; }