diff --git a/content/faq/how-to-change-port.md b/content/faq/how-to-change-port.md index 8881c252..f1fd1cca 100644 --- a/content/faq/how-to-change-port.md +++ b/content/faq/how-to-change-port.md @@ -11,7 +11,7 @@ To change the port once during runtime, set the LBRY_PEER_PORT env variable. Her Once the daemon is running, you can change the port permanently by using the following [api](/api) call - curl 'http://localhost:5279/lbryapi' --data '{"method":"settings_set", "params":{"peer_port":}}' + curl 'http://localhost:5279' --data '{"method":"settings_set", "params":{"peer_port":}}' or via cli command diff --git a/view/template/developer/_quickstartApi.php b/view/template/developer/_quickstartApi.php index 1f65000b..d336b035 100644 --- a/view/template/developer/_quickstartApi.php +++ b/view/template/developer/_quickstartApi.php @@ -1,6 +1,6 @@

API Basics

- When running, the LBRY daemon provides a JSON-RPC server running at http://localhost:5279/lbryapi. + When running, the LBRY daemon provides a JSON-RPC server running at http://localhost:5279.

It can be accessed by any utility capable of making HTTPS GET and POST requests, such as cURL or possibly your toaster. On Windows? You can also use PowerShell. Learn more. @@ -8,7 +8,7 @@

To verify the LBRY daemon is running correctly, let's try looking up a URI:

-$curl 'http://localhost:5279/lbryapi' --data '{"method":"resolve","params":{"uri":"what"}}' +$curl 'http://localhost:5279' --data '{"method":"resolve","params":{"uri":"what"}}' [ { "author": "Samuel Bryan", @@ -35,7 +35,7 @@

Now let's download it. This time we're going to call the method get with the same parameters.

-$curl 'http://localhost:5279/lbryapi' --data '{"method":"get","params":{"uri":"what"} }' +$curl 'http://localhost:5279' --data '{"method":"get","params":{"uri":"what"} }' [ { //some response fields omitted for brevity @@ -52,14 +52,14 @@

This file will download in the background to the download_directory specified in the returned data. Subsequent calls to get or file_list will return the status.

The LBRY API consists of about 50 calls, all related to discovering, distributing, and purchasing content. View the full API documentation.

You can also list all of the commands available by calling the help command.

-$curl 'http://localhost:5279/lbryapi' --data '{"method":"help"}' +$curl 'http://localhost:5279' --data '{"method":"help"}'

Windows

If you are running Windows and would like to follow this guide you could substitute curl with a PowerShell console and the following code.

-$Invoke-RestMethod -Uri 'http://localhost:5279/lbryapi' -Body 'THE_JSON_DATA' -Method POST | ConvertTo-Json +$Invoke-RestMethod -Uri 'http://localhost:5279' -Body 'THE_JSON_DATA' -Method POST | ConvertTo-Json

If PowerShell does not work and you want to continue with cURL, you'll need to escape inner double quotes with a \ to pass the JSON properly via Command Prompt.

-$curl "http://localhost:5279/lbryapi" --data "{\"method\":\"get\",\"params\":{\"uri\":\"what\"} }" +$curl "http://localhost:5279" --data "{\"method\":\"get\",\"params\":{\"uri\":\"what\"} }" diff --git a/view/template/developer/_quickstartCredits.php b/view/template/developer/_quickstartCredits.php index de8befed..3127b668 100644 --- a/view/template/developer/_quickstartCredits.php +++ b/view/template/developer/_quickstartCredits.php @@ -7,18 +7,18 @@

To receive credits, you will need to generate a wallet address:

-$curl 'http://localhost:5279/lbryapi' --data '{"method":"wallet_new_address"}' +$curl 'http://localhost:5279' --data '{"method":"wallet_new_address"}' ["bbFxRyWCFRkA9YcuuZD8nE7XTLUxYnddTs"]

Once you have received or purchased some credits, confirm your balance by calling wallet_balance:

-$curl 'http://localhost:5279/lbryapi' --data '{"method":"wallet_balance"}' +$curl 'http://localhost:5279' --data '{"method":"wallet_balance"}' [50.00000000]

Publishing

Publishing to LBRY is just as easy as everything else!

Not sure what to publish? We recommend your favorite picture or home video. Or just grab something from here.

-$curl 'http://localhost:5279/lbryapi' --data '{"method":"publish", "params": { +$curl 'http://localhost:5279' --data '{"method":"publish", "params": { "name": "electricsheep", "file_path": "/home/kauffj/Desktop/electric-sheep.mp4", "bid": 1, @@ -45,7 +45,7 @@

Enjoy a Hollywood Film

It's a Disaster starring David Cross is just one of tens of thousands of great pieces of content available. Check it out!

Note! This will cost you LBC. Run the resolve command to see the cost.

-$curl 'http://localhost:5279/lbryapi' --data '{"method":"get","params":{"uri":"itsadisaster"} }' +$curl 'http://localhost:5279' --data '{"method":"get","params":{"uri":"itsadisaster"} }' [ { //some response fields omitted for brevity