diff --git a/shitty_api.sh b/shitty_api.sh index 4c39941..d0b065d 100755 --- a/shitty_api.sh +++ b/shitty_api.sh @@ -44,12 +44,13 @@ put(){ curl -sX PUT "$baseurl$1" --json "$(echo ${*:2} | jq .+{\"auth\":\"$TOKE\ #Utils getbody(){ a=$(cat); body=${a//\"/\\\"}; } -actions="notifs notifs2 comments freepost shitpost follow unfollow following deref whoami login" +actions="notifs notifs2 comments freepost shitpost follow unfollow home deref whoami login" #Endpoints. #Lurkan notifs(){ getauth "user/replies" ".replies | $notifs"; } notifs2(){ getauth "user/mention" ".mentions | $notifs"; } -following(){ getauth "post/list" ".posts | $posts" "type_=Subscribed"; } +following(){ home; } +home(){ getauth "post/list" ".posts | $posts" "type_=Subscribed"; } comments(){ getauth "post" "(.post_view | $showpost), (.comments | reverse | $comments)" "id=$1"; } #Postan freepost(){ getbody; post "post" "{\"community_id\":$1,\"name\":\"${*:2}\",\"body\":\"$body\"}"; }