You are reading content from Scuttlebutt
@ओषधिः %bXLXfYoN0Sq7eDtrdN6uBWJBwXNkDfms2rxqHvRbTuU=.sha256
Re: %/q6q4t3WM

@moid I believe this might be from the documentation being out of sync. I just confirmed that the following curl commands work for me:

first start solar via the solar_cli binary with a command like:

./target/release/solar -j true -p 8009 --lan=true -s false

then while that is running, here are examples of curl commands:

whoami:

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "whoami", "id":1 }' 127.0.0.1:3030

publish:

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "publish", "params": {"msg": {"type":  "post", "text": "this is a test post for moid"} }, "id":1 }' 127.0.0.1:3030

feed (of the ID returned by whoami in my case):

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "feed", "params": {"pub_key": "@3TOzePzvEXgEDf7/jKmpDjlTHRs1e98GDzfIItAQHM0=.ed25519" }, "id":1 }' 127.0.0.1:3030

before making this example, I was interacting with solar via solar_client, a jsonrpc client in rust, but its just making json requests like curl in the background, and I confirmed these direct curl requests also worked for me.

the interface definition of solar_client is a good reference for what methods are available and what params are needed. in this file you can see all the available methods.

this folder also contains examples of using these methods (in rust): examples

it does look like listing more examples using curl, like I did above, would be helpful for the README. I've added an issue and will see if I muster the spoons, but for now could check out based on the examples above, or the literal "rust examples" to "curl" translation I was describing for other endpoints, if inspired 🦀

#solar-ssb #kuska #kuska-ssb

Join Scuttlebutt now