stronger code styling

This commit is contained in:
Jeremy Kauffman 2017-02-27 16:17:37 -05:00
parent ebece99a1f
commit dd7f3b99d7
3 changed files with 12 additions and 8 deletions

View file

@ -1,6 +1,6 @@
<h3 id="api">The API</h3> <h3 id="api">The API</h3>
<p> <p>
When running, the LBRY daemon provides a JSON-RPC server running at <span class="code-plain">https://localhost:5279/lbryapi</span>. When running, the LBRY daemon provides a JSON-RPC server running at <code class="code-inline">https://localhost:5279/lbryapi</code>.
</p> </p>
<p> <p>
It can be accessed by any utility capable of making HTTPS GET and POST requests, such as cURL or possibly your toaster. It can be accessed by any utility capable of making HTTPS GET and POST requests, such as cURL or possibly your toaster.
@ -25,8 +25,8 @@
"thumbnail": "https:\/\/s3.amazonaws.com\/files.lbry.io\/logo.png" "thumbnail": "https:\/\/s3.amazonaws.com\/files.lbry.io\/logo.png"
} }
]</span></code> ]</span></code>
<p>Above, we called the method <span class="code-plain"><a href="<?php echo DeveloperActions::API_DOC_URL ?>#resolve_name" class="link-primary">resolve_name</a></span> for the URL <span class="code-plain">lbry://what</span>. This returned the metadata associated with the URL.</p> <p>Above, we called the method <code class="code-inline"><a href="<?php echo DeveloperActions::API_DOC_URL ?>#resolve_name" class="link-primary">resolve_name</a></code> for the URL <code class="code-inline">lbry://what</code>. This returned the metadata associated with the URL.</p>
<p>Now let's download it. This time we're going to call the method <span class="code-plain">get</span> with the same parameters.</p> <p>Now let's download it. This time we're going to call the method <code class="code-inline">get</code> with the same parameters.</p>
<code class="code-bash"><span class="code-bash__prompt">$</span>curl 'http://localhost:5279/lbryapi' --data '{"method":"get","params":{"name":"what"} }' <code class="code-bash"><span class="code-bash__prompt">$</span>curl 'http://localhost:5279/lbryapi' --data '{"method":"get","params":{"name":"what"} }'
<span class="code-bash__response">["d5169241150022f996fa7cd6a9a1c421937276a3275eb912790bd07ba7aec1fac5fd45431d226b8fb402691e79aeb24b"]</span></code> <span class="code-bash__response">["d5169241150022f996fa7cd6a9a1c421937276a3275eb912790bd07ba7aec1fac5fd45431d226b8fb402691e79aeb24b"]</span></code>
<p>The LBRY API consists about 50 calls, all related to discovering, distributing, and purchasing content. <a class="link-primary" href="http://lbryio.github.io/lbry/api/">View the full API documentation</a>.</p> <p>The LBRY API consists about 50 calls, all related to discovering, distributing, and purchasing content. <a class="link-primary" href="http://lbryio.github.io/lbry/api/">View the full API documentation</a>.</p>

View file

@ -9,7 +9,7 @@
'returnUrl' => Request::getRelativeUri() . '#new-developer' 'returnUrl' => Request::getRelativeUri() . '#new-developer'
]) ?> ]) ?>
</div> </div>
<p>Next, confirm you've received your credits by calling <span class="code-plain">wallet_balance</span>:</p> <p>Next, confirm you've received your credits by calling <code class="code-inline">wallet_balance</code>:</p>
<code class="code-bash"><span class="code-bash__prompt">$</span>curl 'http://localhost:5279/lbryapi' --data '{"method":"wallet_balance"}' <code class="code-bash"><span class="code-bash__prompt">$</span>curl 'http://localhost:5279/lbryapi' --data '{"method":"wallet_balance"}'
<span class="code-bash__response">[50.00000000]</span></code> <span class="code-bash__response">[50.00000000]</span></code>
<h3 id="publish">Publishing</h3> <h3 id="publish">Publishing</h3>

View file

@ -9,10 +9,14 @@ code
padding: 3px 5px; padding: 3px 5px;
font-family: $font-mono; font-family: $font-mono;
color: darken($color-primary, 10%); color: darken($color-primary, 10%);
} &.code-inline {
.code-plain padding: 0;
{ margin-left: 1px;
font-family: $font-mono; margin-right: 1px;
font-weight: bold;
color: inherit;
background-color: transparent;
}
} }
pre pre
{ {