A third party ATProto appview
at main 1.1 kB view raw
1#!/bin/bash 2 3# Test post creation and interaction endpoints 4 5source "$(dirname "$0")/config.sh" 6 7echo "================================" 8echo "Post & Interaction Tests" 9echo "================================" 10echo "" 11 12# Create post (requires authentication) 13make_request "POST" "/api/posts/create" '{ 14 "text": "Test post from API testing script", 15 "createdAt": "'"$(date -u +"%Y-%m-%dT%H:%M:%SZ")"'" 16}' 17 18# Create like (requires authentication) 19make_request "POST" "/api/likes/create" '{ 20 "subject": { 21 "uri": "'"$TEST_POST_URI"'", 22 "cid": "bafyreib2rxk3rybk3aobmv5cjuql3bm2twh4jo5ixbx7ydgvduvyzvvvve" 23 }, 24 "createdAt": "'"$(date -u +"%Y-%m-%dT%H:%M:%SZ")"'" 25}' 26 27# Delete like (requires authentication) 28make_request "DELETE" "/api/likes/at://did:plc:example/app.bsky.feed.like/test123" 29 30# Create follow (requires authentication) 31make_request "POST" "/api/follows/create" '{ 32 "subject": "'"$TEST_DID"'", 33 "createdAt": "'"$(date -u +"%Y-%m-%dT%H:%M:%SZ")"'" 34}' 35 36# Delete follow (requires authentication) 37make_request "DELETE" "/api/follows/at://did:plc:example/app.bsky.graph.follow/test123"