diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 18 |
1 files changed, 17 insertions, 1 deletions
| @@ -27,7 +27,7 @@ int usage(void) | |||
| 27 | printf("follow {basedir} {uid} {actor} Follows an actor\n"); | 27 | printf("follow {basedir} {uid} {actor} Follows an actor\n"); |
| 28 | printf("unfollow {basedir} {uid} {actor} Unfollows an actor\n"); | 28 | printf("unfollow {basedir} {uid} {actor} Unfollows an actor\n"); |
| 29 | printf("request {basedir} {uid} {url} Requests an object\n"); | 29 | printf("request {basedir} {uid} {url} Requests an object\n"); |
| 30 | printf("actor {basedir} {uid} {url} Requests an actor\n"); | 30 | printf("actor {basedir} [{uid}] {url} Requests an actor\n"); |
| 31 | printf("note {basedir} {uid} {'text'} Sends a note to followers\n"); | 31 | printf("note {basedir} {uid} {'text'} Sends a note to followers\n"); |
| 32 | printf("resetpwd {basedir} {uid} Resets the password of a user\n"); | 32 | printf("resetpwd {basedir} {uid} Resets the password of a user\n"); |
| 33 | printf("ping {basedir} {uid} {actor} Pings an actor\n"); | 33 | printf("ping {basedir} {uid} {actor} Pings an actor\n"); |
| @@ -179,6 +179,22 @@ int main(int argc, char *argv[]) | |||
| 179 | return 0; | 179 | return 0; |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | if (argi == argc && strcmp(cmd, "actor") == 0) { /** **/ | ||
| 183 | /* query an actor without user (non-signed) */ | ||
| 184 | xs *actor = NULL; | ||
| 185 | int status; | ||
| 186 | |||
| 187 | status = actor_request(NULL, user, &actor); | ||
| 188 | |||
| 189 | printf("status: %d\n", status); | ||
| 190 | if (valid_status(status)) { | ||
| 191 | xs_json_dump(actor, 4, stdout); | ||
| 192 | printf("\n"); | ||
| 193 | } | ||
| 194 | |||
| 195 | return 0; | ||
| 196 | } | ||
| 197 | |||
| 182 | if (!user_open(&snac, user)) { | 198 | if (!user_open(&snac, user)) { |
| 183 | printf("invalid user '%s'\n", user); | 199 | printf("invalid user '%s'\n", user); |
| 184 | return 1; | 200 | return 1; |