Multicode Tabs v2 - move dom shuffle to Dactyl filter instead of jQuery

This commit is contained in:
mDuo13
2016-05-11 15:10:00 -07:00
parent e5f7a60b17
commit 322fffcc88
27 changed files with 1318 additions and 1276 deletions

View File

@@ -1,3 +1,4 @@
//-------- this multicode stuff has been migrated to a Dactyl filter ---------
// Expects markup in the form of:
// <div class='multicode'>
// <p><em>tab 1 title</em></p>
@@ -5,29 +6,29 @@
// <p><em>tab 2 title</em></p>
// <pre><code>tab 2 code block</code></pre>
// </div>
jQuery.fn.multicode_tabs = function() {
$('.multicode').each(function(index,el) {
cb_area = $(el);
cb_area.attr('id', "code-"+index);
// make a ul to house the tab headers
cb_area.prepend("<ul class='codetabs'></ul>");
cb_area.children('pre').each(function(index2,el2) {
var linkid = 'code-'+index+'-'+index2;
$(el2).wrap("<div id='"+linkid+"' class='code_sample'>");
//also put in a link to this in the tab header ul
$('ul', cb_area).append("<li><a href='#"+linkid+"'></a></li>");
});
$(el).find('em').each(function(index2, el2) {
$('ul li:eq('+index2+') a', cb_area).text($(el2).text());
});
});
$('.multicode p').hide();
$('.multicode .code_sample').css("position","static");
$('.multicode').minitabs();
}
// jQuery.fn.multicode_tabs = function() {
// $('.multicode').each(function(index,el) {
// cb_area = $(el);
// cb_area.attr('id', "code-"+index);
// // make a ul to house the tab headers
// cb_area.prepend("<ul class='codetabs'></ul>");
//
// cb_area.children('pre').each(function(index2,el2) {
// var linkid = 'code-'+index+'-'+index2;
// $(el2).wrap("<div id='"+linkid+"' class='code_sample'>");
// //also put in a link to this in the tab header ul
// $('ul', cb_area).append("<li><a href='#"+linkid+"'></a></li>");
// });
//
// $(el).find('em').each(function(index2, el2) {
// $('ul li:eq('+index2+') a', cb_area).text($(el2).text());
// });
// });
// $('.multicode p').hide();
// $('.multicode .code_sample').css("position","static");
//
// $('.multicode').minitabs();
// }
// Minitabs adapted from https://code.google.com/p/minitabs/
// Changes made: support multiple tab booklets in one page

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -79,7 +79,7 @@ Retrieve a specific Ledger by hash, index, date, or latest validated.
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -87,7 +87,7 @@ Retrieve a specific Ledger by hash, index, date, or latest validated.
GET /v2/ledgers/{:identifier}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-ledger)
@@ -151,7 +151,7 @@ Retrieve a specific transaction by its identifying hash.
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -159,7 +159,7 @@ Retrieve a specific transaction by its identifying hash.
GET /v2/transactions/{:hash}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-transaction)
@@ -259,7 +259,7 @@ Retrieve transactions by time
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -267,7 +267,7 @@ Retrieve transactions by time
GET /v2/transactions/
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-transactions)
@@ -417,7 +417,7 @@ Results can be returned as individual payments, or aggregated to a specific list
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST - All Currencies*
@@ -431,7 +431,7 @@ GET /v2/payments/
GET /v2/payments/{:currency}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-payments)
@@ -568,7 +568,7 @@ Retrieve Exchanges for a given currency pair over time. Results can be returned
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -576,7 +576,7 @@ Retrieve Exchanges for a given currency pair over time. Results can be returned
GET /v2/exchanges/{:base}/{:counter}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-exchanges)
@@ -699,7 +699,7 @@ Retrieve an exchange rate for a given currency pair at a specific time.
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -707,7 +707,7 @@ Retrieve an exchange rate for a given currency pair at a specific time.
GET /v2/exchange_rates/{:base}/{:counter}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-exchange-rates)
@@ -766,7 +766,7 @@ Convert an amount from one currency and issuer to another, using the network exc
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -774,7 +774,7 @@ Convert an amount from one currency and issuer to another, using the network exc
GET /v2/normalize
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#normalize)
@@ -832,7 +832,7 @@ Retrieve per account per day aggregated payment summaries
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -840,7 +840,7 @@ Retrieve per account per day aggregated payment summaries
GET /v2/reports/{:date}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-daily-reports)
@@ -996,7 +996,7 @@ Retrieve statistics about transaction activity in the Ripple Consensus Ledger, d
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -1004,7 +1004,7 @@ Retrieve statistics about transaction activity in the Ripple Consensus Ledger, d
GET /v2/stats
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-stats)
@@ -1100,7 +1100,7 @@ Get the total amount of a single currency issued by a single issuer, also known
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -1108,7 +1108,7 @@ Get the total amount of a single currency issued by a single issuer, also known
GET /v2/capitaliztion/{:currency}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-capitalization)
@@ -1226,7 +1226,7 @@ Get information on which accounts are actively trading in a specific currency pa
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -1234,7 +1234,7 @@ Get information on which accounts are actively trading in a specific currency pa
GET /v2/active_accounts/{:base}/{:counter}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-active-accounts)
@@ -1379,7 +1379,7 @@ The API returns results in units of a single _display currency_ rather than many
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -1387,7 +1387,7 @@ The API returns results in units of a single _display currency_ rather than many
GET /v2/network/exchange_volume
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-exchange-volume)
@@ -1527,7 +1527,7 @@ The API returns results in units of a single _display currency_ rather than many
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -1535,7 +1535,7 @@ The API returns results in units of a single _display currency_ rather than many
GET /v2/network/payment_volume
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-payment-volume)
@@ -1656,7 +1656,7 @@ The API returns results in units of a single _display currency_ rather than many
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -1664,7 +1664,7 @@ The API returns results in units of a single _display currency_ rather than many
GET /v2/network/issued_value
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-issued-value)
@@ -1765,7 +1765,7 @@ Returns the top currencies on the Ripple Consensus Ledger, ordered from highest
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*Most Recent*
@@ -1779,7 +1779,7 @@ GET /v2/network/top_currencies
GET /v2/network/top_currencies/2016-01-01
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-top-currencies)
@@ -1865,7 +1865,7 @@ Returns the top exchange markets on the Ripple Consensus Ledger, ordered from hi
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*Most Recent*
@@ -1879,7 +1879,7 @@ GET /v2/network/top_markets
GET /v2/network/top_markets/2016-01-01
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
This method does not accept any query parameters.
@@ -1967,7 +1967,7 @@ Get information about [known gateways](https://github.com/ripple/rippled-histori
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -1975,7 +1975,7 @@ Get information about [known gateways](https://github.com/ripple/rippled-histori
GET /v2/gateways/
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-all-gateways)
@@ -2063,7 +2063,7 @@ Get information about a specific gateway from [the Data API's list of known gate
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -2071,7 +2071,7 @@ Get information about a specific gateway from [the Data API's list of known gate
GET /v2/gateways/{:gateway}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-gateway)
@@ -2155,7 +2155,7 @@ Retrieve vector icons for various currencies. _(New in [v2.0.4][])_
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -2163,7 +2163,7 @@ Retrieve vector icons for various currencies. _(New in [v2.0.4][])_
GET /v2/currencies/{:currencyimage}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
This method requires the following URL parameter:
@@ -2216,7 +2216,7 @@ Retrieve information about the creation of new accounts in the Ripple Consensus
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -2224,7 +2224,7 @@ Retrieve information about the creation of new accounts in the Ripple Consensus
GET /v2/accounts
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-accounts)
@@ -2313,7 +2313,7 @@ Get creation info for a specific ripple account
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -2321,7 +2321,7 @@ Get creation info for a specific ripple account
GET /v2/accounts/{:address}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-account)
@@ -2372,7 +2372,7 @@ Response:
Get all balances held or owed by a specific Ripple account.
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -2380,7 +2380,7 @@ Get all balances held or owed by a specific Ripple account.
GET /v2/accounts/{:address}/balances
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-account-balances)
@@ -2458,7 +2458,7 @@ Get orders in the order books, placed by a specific account. This does not retur
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -2466,7 +2466,7 @@ Get orders in the order books, placed by a specific account. This does not retur
GET /v2/account/{:address}/orders
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-account-orders)
@@ -2583,7 +2583,7 @@ Retrieve a history of transactions that affected a specific account. This includ
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -2591,7 +2591,7 @@ Retrieve a history of transactions that affected a specific account. This includ
GET /v2/accounts/{:address}/transactions
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-account-transaction-history)
@@ -2713,7 +2713,7 @@ Retrieve a specifc transaction originating from a specified account
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -2721,7 +2721,7 @@ Retrieve a specifc transaction originating from a specified account
GET /v2/accounts/{:address}/transactions/{:sequence}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-transaction-by-account-and-sequence)
@@ -2781,7 +2781,7 @@ Retrieve a payments for a specified account
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -2789,7 +2789,7 @@ Retrieve a payments for a specified account
GET /v2/accounts/{:address}/payments
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-account-payments)
@@ -2888,7 +2888,7 @@ Retrieve Exchanges for a given account over time.
There are two variations on this method:
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST - All Exchanges*
@@ -2902,7 +2902,7 @@ GET /v2/accounts/{:address}/exchanges/
GET /v2/accounts/{:address}/exchanges/{:base}/{:counter}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-account-exchanges-all)
@@ -3005,7 +3005,7 @@ Retrieve Balance changes for a given account over time.
#### Request Format ####
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -3013,7 +3013,7 @@ Retrieve Balance changes for a given account over time.
GET /v2/accounts/{:address}/balance_changes/
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-account-balance-changes)
@@ -3107,7 +3107,7 @@ Response:
Retrieve daily summaries of payment activity for an account.
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST - Date Omitted*
@@ -3121,7 +3121,7 @@ GET /v2/accounts/{:address}/reports/
GET /v2/accounts/{:address}/reports/{:date}
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-account-reports-by-day)
@@ -3219,7 +3219,7 @@ Response:
Retrieve daily summaries of transaction activity for an account. _(New in [v2.1.0][].)_
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -3227,7 +3227,7 @@ Retrieve daily summaries of transaction activity for an account. _(New in [v2.1.
GET /v2/accounts/{:address}/stats/transactions
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-account-transaction-stats)
@@ -3317,7 +3317,7 @@ Response:
Retrieve daily summaries of transaction activity for an account. _(New in [v2.1.0][].)_
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -3325,7 +3325,7 @@ Retrieve daily summaries of transaction activity for an account. _(New in [v2.1.
GET /v2/accounts/{:address}/stats/value
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
[Try it! >](data-api-v2-tool.html#get-account-value-stats)
@@ -3403,7 +3403,7 @@ Response:
Check the health of the API service.
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST*
@@ -3411,7 +3411,7 @@ Check the health of the API service.
GET /v2/health/api
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
Optionally, you can also include the following query parameters:
@@ -3464,7 +3464,7 @@ Response:
Check the health of the Ledger Importer Service.
<!--<div class='multicode'>-->
<!-- MULTICODE_BLOCK_START -->
*REST - Importer Health*
@@ -3472,7 +3472,7 @@ Check the health of the Ledger Importer Service.
GET /v2/health/importer
```
<!--</div>-->
<!-- MULTICODE_BLOCK_END -->
Optionally, you can also include the following query parameters:

View File

@@ -152,7 +152,7 @@ There are two kinds of Directories:
Example Directories:
<!-- <div class='multicode'> -->
<!-- MULTICODE_BLOCK_START -->
*Offer Directory*
@@ -189,7 +189,7 @@ Example Directories:
}
```
<!-- </div> -->
<!-- MULTICODE_BLOCK_END -->
| Name | JSON Type | [Internal Type][] | Description |
|-------------------|-----------|---------------|-------------|

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
@@ -276,10 +276,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/getLedger.js" title="Source">[Source]<br/></a></p>
<p>Retrieve a specific Ledger by hash, index, date, or latest validated.</p>
<h4 id="request-format">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/ledgers/{:identifier}
</code></pre>
<div class="multicode" id="code-0"><ul class="codetabs"><li><a href="#code-0-0">REST</a></li></ul>
<div class="code_sample" id="code-0-0" style="position: static;"><pre><code>GET /v2/ledgers/{:identifier}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-ledger">Try it! &gt;</a></p>
<p>The following URL parameters are required by this API endpoint:</p>
@@ -374,10 +374,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/getTransactions.js" title="Source">[Source]<br/></a></p>
<p>Retrieve a specific transaction by its identifying hash.</p>
<h4 id="request-format-1">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/transactions/{:hash}
</code></pre>
<div class="multicode" id="code-1"><ul class="codetabs"><li><a href="#code-1-0">REST</a></li></ul>
<div class="code_sample" id="code-1-0" style="position: static;"><pre><code>GET /v2/transactions/{:hash}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-transaction">Try it! &gt;</a></p>
<p>The following URL parameters are required by this API endpoint:</p>
@@ -498,10 +498,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/getTransactions.js" title="Source">[Source]<br/></a></p>
<p>Retrieve transactions by time</p>
<h4 id="request-format-2">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/transactions/
</code></pre>
<div class="multicode" id="code-2"><ul class="codetabs"><li><a href="#code-2-0">REST</a></li></ul>
<div class="code_sample" id="code-2-0" style="position: static;"><pre><code>GET /v2/transactions/
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-transactions">Try it! &gt;</a></p>
<p>Optionally, you can include the following query parameters:</p>
@@ -699,13 +699,13 @@
<p>Retrieve Payments over time, where Payments are defined as <code>Payment</code> type transactions where the sender of the transaction is not also the destination. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.0.4">v2.0.4</a>)</em></p>
<p>Results can be returned as individual payments, or aggregated to a specific list of intervals if currency and issuer are provided.</p>
<h4 id="request-format-3">Request Format</h4>
<div class="multicode">
<p><em>REST - All Currencies</em></p>
<pre><code>GET /v2/payments/
</code></pre>
<p><em>REST - Specific Currency</em></p>
<pre><code>GET /v2/payments/{:currency}
</code></pre>
<div class="multicode" id="code-3"><ul class="codetabs"><li><a href="#code-3-0">REST - All Currencies</a></li><li><a href="#code-3-1">REST - Specific Currency</a></li></ul>
<div class="code_sample" id="code-3-0" style="position: static;"><pre><code>GET /v2/payments/
</code></pre></div>
<div class="code_sample" id="code-3-1" style="position: static;"><pre><code>GET /v2/payments/{:currency}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-payments">Try it! &gt;</a></p>
<p>This method accepts the following URL parameters:</p>
@@ -923,10 +923,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/getExchanges.js" title="Source">[Source]<br/></a></p>
<p>Retrieve Exchanges for a given currency pair over time. Results can be returned as individual exchanges or aggregated to a specific list of intervals</p>
<h4 id="request-format-4">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/exchanges/{:base}/{:counter}
</code></pre>
<div class="multicode" id="code-4"><ul class="codetabs"><li><a href="#code-4-0">REST</a></li></ul>
<div class="code_sample" id="code-4-0" style="position: static;"><pre><code>GET /v2/exchanges/{:base}/{:counter}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-exchanges">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -1117,10 +1117,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/getExchangeRate.js" title="Source">[Source]<br/></a></p>
<p>Retrieve an exchange rate for a given currency pair at a specific time.</p>
<h4 id="request-format-5">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/exchange_rates/{:base}/{:counter}
</code></pre>
<div class="multicode" id="code-5"><ul class="codetabs"><li><a href="#code-5-0">REST</a></li></ul>
<div class="code_sample" id="code-5-0" style="position: static;"><pre><code>GET /v2/exchange_rates/{:base}/{:counter}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-exchange-rates">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -1206,10 +1206,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/normalize.js" title="Source">[Source]<br/></a></p>
<p>Convert an amount from one currency and issuer to another, using the network exchange rates.</p>
<h4 id="request-format-6">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/normalize
</code></pre>
<div class="multicode" id="code-6"><ul class="codetabs"><li><a href="#code-6-0">REST</a></li></ul>
<div class="code_sample" id="code-6-0" style="position: static;"><pre><code>GET /v2/normalize
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#normalize">Try it! &gt;</a></p>
<p>This method uses the following query parameters:</p>
@@ -1309,10 +1309,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/reports.js" title="Source">[Source]<br/></a></p>
<p>Retrieve per account per day aggregated payment summaries</p>
<h4 id="request-format-7">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/reports/{:date}
</code></pre>
<div class="multicode" id="code-7"><ul class="codetabs"><li><a href="#code-7-0">REST</a></li></ul>
<div class="code_sample" id="code-7-0" style="position: static;"><pre><code>GET /v2/reports/{:date}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-daily-reports">Try it! &gt;</a></p>
<p>This method uses the following URL parameters:</p>
@@ -1518,10 +1518,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/stats.js" title="Source">[Source]<br/></a></p>
<p>Retrieve statistics about transaction activity in the Ripple Consensus Ledger, divided into intervals of time.</p>
<h4 id="request-format-8">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/stats
</code></pre>
<div class="multicode" id="code-8"><ul class="codetabs"><li><a href="#code-8-0">REST</a></li></ul>
<div class="code_sample" id="code-8-0" style="position: static;"><pre><code>GET /v2/stats
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-stats">Try it! &gt;</a></p>
<p>Optionally, you can also include the following query parameters:</p>
@@ -1716,10 +1716,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/capitalization.js" title="Source">[Source]<br/></a></p>
<p>Get the total amount of a single currency issued by a single issuer, also known as the <a href="https://en.wikipedia.org/wiki/Market_capitalization">market capitalization</a>. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.0.4">v2.0.4</a>)</em></p>
<h4 id="request-format-9">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/capitaliztion/{:currency}
</code></pre>
<div class="multicode" id="code-9"><ul class="codetabs"><li><a href="#code-9-0">REST</a></li></ul>
<div class="code_sample" id="code-9-0" style="position: static;"><pre><code>GET /v2/capitaliztion/{:currency}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-capitalization">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -1916,10 +1916,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/activeAccounts.js" title="Source">[Source]<br/></a></p>
<p>Get information on which accounts are actively trading in a specific currency pair. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.0.4">v2.0.4</a>)</em></p>
<h4 id="request-format-10">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/active_accounts/{:base}/{:counter}
</code></pre>
<div class="multicode" id="code-10"><ul class="codetabs"><li><a href="#code-10-0">REST</a></li></ul>
<div class="code_sample" id="code-10-0" style="position: static;"><pre><code>GET /v2/active_accounts/{:base}/{:counter}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-active-accounts">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -2166,10 +2166,10 @@
<p>Get aggregated exchange volume for a given time period. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.0.4">v2.0.4</a>)</em></p>
<p>The API returns results in units of a single <em>display currency</em> rather than many different currencies. The conversion uses standard rates to and from XRP.</p>
<h4 id="request-format-11">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/network/exchange_volume
</code></pre>
<div class="multicode" id="code-11"><ul class="codetabs"><li><a href="#code-11-0">REST</a></li></ul>
<div class="code_sample" id="code-11-0" style="position: static;"><pre><code>GET /v2/network/exchange_volume
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-exchange-volume">Try it! &gt;</a></p>
<p>Optionally, you can include the following query parameters:</p>
@@ -2381,10 +2381,10 @@
<p>Get aggregated payment volume for a given time period. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.0.4">v2.0.4</a>)</em></p>
<p>The API returns results in units of a single <em>display currency</em> rather than many different currencies. The conversion uses standard rates to and from XRP.</p>
<h4 id="request-format-12">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/network/payment_volume
</code></pre>
<div class="multicode" id="code-12"><ul class="codetabs"><li><a href="#code-12-0">REST</a></li></ul>
<div class="code_sample" id="code-12-0" style="position: static;"><pre><code>GET /v2/network/payment_volume
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-payment-volume">Try it! &gt;</a></p>
<p>Optionally, you can include the following query parameters:</p>
@@ -2580,10 +2580,10 @@
<p>Get the total value of all currencies issued by a selection of major gateways over time. By default, returns only the most recent measurement. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.0.4">v2.0.4</a>)</em></p>
<p>The API returns results in units of a single <em>display currency</em> rather than many different currencies. The conversion uses standard rates to and from XRP.</p>
<h4 id="request-format-13">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/network/issued_value
</code></pre>
<div class="multicode" id="code-13"><ul class="codetabs"><li><a href="#code-13-0">REST</a></li></ul>
<div class="code_sample" id="code-13-0" style="position: static;"><pre><code>GET /v2/network/issued_value
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-issued-value">Try it! &gt;</a></p>
<p>Optionally, you can include the following query parameters:</p>
@@ -2749,13 +2749,13 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/network/topCurrencies.js" title="Source">[Source]<br/></a></p>
<p>Returns the top currencies on the Ripple Consensus Ledger, ordered from highest rank to lowest. The ranking is determined by the volume and count of transactions and the number of unique counterparties. By default, returns results for the 30-day rolling window ending on the current date. You can specify a date to get results for the 30-day window ending on that date. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.1.0">v2.1.0</a>)</em></p>
<h4 id="request-format-14">Request Format</h4>
<div class="multicode">
<p><em>Most Recent</em></p>
<pre><code>GET /v2/network/top_currencies
</code></pre>
<p><em>By Date</em></p>
<pre><code>GET /v2/network/top_currencies/2016-01-01
</code></pre>
<div class="multicode" id="code-14"><ul class="codetabs"><li><a href="#code-14-0">Most Recent</a></li><li><a href="#code-14-1">By Date</a></li></ul>
<div class="code_sample" id="code-14-0" style="position: static;"><pre><code>GET /v2/network/top_currencies
</code></pre></div>
<div class="code_sample" id="code-14-1" style="position: static;"><pre><code>GET /v2/network/top_currencies/2016-01-01
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-top-currencies">Try it! &gt;</a></p>
<p>This method does not accept any query parameters.</p>
@@ -2884,13 +2884,13 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/network/topMarkets.js" title="Source">[Source]<br/></a></p>
<p>Returns the top exchange markets on the Ripple Consensus Ledger, ordered from highest rank to lowest. The rank is determined by the number and volume of exchanges and the number of counterparties participating. By default, returns top markets for the 30-day rolling window ending on the current date. You can specify a date to get results for the 30-day window ending on that date. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.1.0">v2.1.0</a>)</em></p>
<h4 id="request-format-15">Request Format</h4>
<div class="multicode">
<p><em>Most Recent</em></p>
<pre><code>GET /v2/network/top_markets
</code></pre>
<p><em>By Date</em></p>
<pre><code>GET /v2/network/top_markets/2016-01-01
</code></pre>
<div class="multicode" id="code-15"><ul class="codetabs"><li><a href="#code-15-0">Most Recent</a></li><li><a href="#code-15-1">By Date</a></li></ul>
<div class="code_sample" id="code-15-0" style="position: static;"><pre><code>GET /v2/network/top_markets
</code></pre></div>
<div class="code_sample" id="code-15-1" style="position: static;"><pre><code>GET /v2/network/top_markets/2016-01-01
</code></pre></div>
</div>
<p>This method does not accept any query parameters.</p>
<p><a class="button" href="data-api-v2-tool.html#get-top-markets">Try it! &gt;</a></p>
@@ -3024,10 +3024,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/gateways.js" title="Source">[Source]<br/></a></p>
<p>Get information about <a href="https://github.com/ripple/rippled-historical-database/blob/v2.0.4/api/gateways/gateways.json">known gateways</a>. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.0.4">v2.0.4</a>)</em></p>
<h4 id="request-format-16">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/gateways/
</code></pre>
<div class="multicode" id="code-16"><ul class="codetabs"><li><a href="#code-16-0">REST</a></li></ul>
<div class="code_sample" id="code-16-0" style="position: static;"><pre><code>GET /v2/gateways/
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-all-gateways">Try it! &gt;</a></p>
<p>This method takes no query parameters.</p>
@@ -3125,10 +3125,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/gateways.js" title="Source">[Source]<br/></a></p>
<p>Get information about a specific gateway from <a href="https://github.com/ripple/rippled-historical-database/blob/v2.0.4/api/gateways/gateways.json">the Data API's list of known gateways</a>. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.0.4">v2.0.4</a>)</em></p>
<h4 id="request-format-17">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/gateways/{:gateway}
</code></pre>
<div class="multicode" id="code-17"><ul class="codetabs"><li><a href="#code-17-0">REST</a></li></ul>
<div class="code_sample" id="code-17-0" style="position: static;"><pre><code>GET /v2/gateways/{:gateway}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-gateway">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -3256,10 +3256,10 @@
<p><a href="https://github.com/ripple/rippled-historical-database/blob/v0.0.4-rc2/api/routesV2/gateways.js#L196" title="Source">[Source]<br/></a></p>
<p>Retrieve vector icons for various currencies. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.0.4">v2.0.4</a>)</em></p>
<h4 id="request-format-18">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/currencies/{:currencyimage}
</code></pre>
<div class="multicode" id="code-18"><ul class="codetabs"><li><a href="#code-18-0">REST</a></li></ul>
<div class="code_sample" id="code-18-0" style="position: static;"><pre><code>GET /v2/currencies/{:currencyimage}
</code></pre></div>
</div>
<p>This method requires the following URL parameter:</p>
<table>
@@ -3310,10 +3310,10 @@ Content-Type: image/svg+xml
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/accounts.js" title="Source">[Source]<br/></a></p>
<p>Retrieve information about the creation of new accounts in the Ripple Consensus Ledger.</p>
<h4 id="request-format-19">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/accounts
</code></pre>
<div class="multicode" id="code-19"><ul class="codetabs"><li><a href="#code-19-0">REST</a></li></ul>
<div class="code_sample" id="code-19-0" style="position: static;"><pre><code>GET /v2/accounts
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-accounts">Try it! &gt;</a></p>
<p>Optionally, you can include the following query parameters:</p>
@@ -3469,10 +3469,10 @@ Content-Type: image/svg+xml
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/getAccount.js" title="Source">[Source]<br/></a></p>
<p>Get creation info for a specific ripple account</p>
<h4 id="request-format-20">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/accounts/{:address}
</code></pre>
<div class="multicode" id="code-20"><ul class="codetabs"><li><a href="#code-20-0">REST</a></li></ul>
<div class="code_sample" id="code-20-0" style="position: static;"><pre><code>GET /v2/accounts/{:address}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-account">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -3535,10 +3535,10 @@ Content-Type: image/svg+xml
<h2 id="get-account-balances">Get Account Balances</h2>
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/accountBalances.js" title="Source">[Source]<br/></a></p>
<p>Get all balances held or owed by a specific Ripple account.</p>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/accounts/{:address}/balances
</code></pre>
<div class="multicode" id="code-21"><ul class="codetabs"><li><a href="#code-21-0">REST</a></li></ul>
<div class="code_sample" id="code-21-0" style="position: static;"><pre><code>GET /v2/accounts/{:address}/balances
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-account-balances">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -3681,10 +3681,10 @@ Content-Type: image/svg+xml
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/accountOrders.js" title="Source">[Source]<br/></a></p>
<p>Get orders in the order books, placed by a specific account. This does not return orders that have already been filled.</p>
<h4 id="request-format-21">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/account/{:address}/orders
</code></pre>
<div class="multicode" id="code-22"><ul class="codetabs"><li><a href="#code-22-0">REST</a></li></ul>
<div class="code_sample" id="code-22-0" style="position: static;"><pre><code>GET /v2/account/{:address}/orders
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-account-orders">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -3890,10 +3890,10 @@ Content-Type: image/svg+xml
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/accountTransactions.js" title="Source">[Source]<br/></a></p>
<p>Retrieve a history of transactions that affected a specific account. This includes all transactions the account sent, payments the account received, and payments that rippled through the account.</p>
<h4 id="request-format-22">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/accounts/{:address}/transactions
</code></pre>
<div class="multicode" id="code-23"><ul class="codetabs"><li><a href="#code-23-0">REST</a></li></ul>
<div class="code_sample" id="code-23-0" style="position: static;"><pre><code>GET /v2/accounts/{:address}/transactions
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-account-transaction-history">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -4083,10 +4083,10 @@ Content-Type: image/svg+xml
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/accountTxSeq.js" title="Source">[Source]<br/></a></p>
<p>Retrieve a specifc transaction originating from a specified account</p>
<h4 id="request-format-23">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/accounts/{:address}/transactions/{:sequence}
</code></pre>
<div class="multicode" id="code-24"><ul class="codetabs"><li><a href="#code-24-0">REST</a></li></ul>
<div class="code_sample" id="code-24-0" style="position: static;"><pre><code>GET /v2/accounts/{:address}/transactions/{:sequence}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-transaction-by-account-and-sequence">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -4171,10 +4171,10 @@ Content-Type: image/svg+xml
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/accountPayments.js" title="Source">[Source]<br/></a></p>
<p>Retrieve a payments for a specified account</p>
<h4 id="request-format-24">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/accounts/{:address}/payments
</code></pre>
<div class="multicode" id="code-25"><ul class="codetabs"><li><a href="#code-25-0">REST</a></li></ul>
<div class="code_sample" id="code-25-0" style="position: static;"><pre><code>GET /v2/accounts/{:address}/payments
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-account-payments">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -4340,13 +4340,13 @@ Content-Type: image/svg+xml
<p>Retrieve Exchanges for a given account over time.</p>
<h4 id="request-format-25">Request Format</h4>
<p>There are two variations on this method:</p>
<div class="multicode">
<p><em>REST - All Exchanges</em></p>
<pre><code>GET /v2/accounts/{:address}/exchanges/
</code></pre>
<p><em>REST - Specific Currency Pair</em></p>
<pre><code>GET /v2/accounts/{:address}/exchanges/{:base}/{:counter}
</code></pre>
<div class="multicode" id="code-26"><ul class="codetabs"><li><a href="#code-26-0">REST - All Exchanges</a></li><li><a href="#code-26-1">REST - Specific Currency Pair</a></li></ul>
<div class="code_sample" id="code-26-0" style="position: static;"><pre><code>GET /v2/accounts/{:address}/exchanges/
</code></pre></div>
<div class="code_sample" id="code-26-1" style="position: static;"><pre><code>GET /v2/accounts/{:address}/exchanges/{:base}/{:counter}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-account-exchanges-all">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -4506,10 +4506,10 @@ Content-Type: image/svg+xml
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/accountBalanceChanges.js" title="Source">[Source]<br/></a></p>
<p>Retrieve Balance changes for a given account over time.</p>
<h4 id="request-format-26">Request Format</h4>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/accounts/{:address}/balance_changes/
</code></pre>
<div class="multicode" id="code-27"><ul class="codetabs"><li><a href="#code-27-0">REST</a></li></ul>
<div class="code_sample" id="code-27-0" style="position: static;"><pre><code>GET /v2/accounts/{:address}/balance_changes/
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-account-balance-changes">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -4661,13 +4661,13 @@ Content-Type: image/svg+xml
<h2 id="get-account-reports">Get Account Reports</h2>
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/accountReports.js" title="Source">[Source]<br/></a></p>
<p>Retrieve daily summaries of payment activity for an account.</p>
<div class="multicode">
<p><em>REST - Date Omitted</em></p>
<pre><code>GET /v2/accounts/{:address}/reports/
</code></pre>
<p><em>REST - Date Specified</em></p>
<pre><code>GET /v2/accounts/{:address}/reports/{:date}
</code></pre>
<div class="multicode" id="code-28"><ul class="codetabs"><li><a href="#code-28-0">REST - Date Omitted</a></li><li><a href="#code-28-1">REST - Date Specified</a></li></ul>
<div class="code_sample" id="code-28-0" style="position: static;"><pre><code>GET /v2/accounts/{:address}/reports/
</code></pre></div>
<div class="code_sample" id="code-28-1" style="position: static;"><pre><code>GET /v2/accounts/{:address}/reports/{:date}
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-account-reports-by-day">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -4816,10 +4816,10 @@ Content-Type: image/svg+xml
<h2 id="get-account-transaction-stats">Get Account Transaction Stats</h2>
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/accountStats.js" title="Source">[Source]<br/></a></p>
<p>Retrieve daily summaries of transaction activity for an account. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.1.0">v2.1.0</a>.)</em></p>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/accounts/{:address}/stats/transactions
</code></pre>
<div class="multicode" id="code-29"><ul class="codetabs"><li><a href="#code-29-0">REST</a></li></ul>
<div class="code_sample" id="code-29-0" style="position: static;"><pre><code>GET /v2/accounts/{:address}/stats/transactions
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-account-transaction-stats">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -4979,10 +4979,10 @@ Content-Type: image/svg+xml
<h2 id="get-account-value-stats">Get Account Value Stats</h2>
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/accountStats.js" title="Source">[Source]<br/></a></p>
<p>Retrieve daily summaries of transaction activity for an account. <em>(New in <a href="https://github.com/ripple/rippled-historical-database/releases/tag/v2.1.0">v2.1.0</a>.)</em></p>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/accounts/{:address}/stats/value
</code></pre>
<div class="multicode" id="code-30"><ul class="codetabs"><li><a href="#code-30-0">REST</a></li></ul>
<div class="code_sample" id="code-30-0" style="position: static;"><pre><code>GET /v2/accounts/{:address}/stats/value
</code></pre></div>
</div>
<p><a class="button" href="data-api-v2-tool.html#get-account-value-stats">Try it! &gt;</a></p>
<p>This method requires the following URL parameters:</p>
@@ -5125,10 +5125,10 @@ Content-Type: image/svg+xml
<h2 id="health-check-api">Health Check - API</h2>
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/checkHealth.js" title="Source">[Source]<br/></a></p>
<p>Check the health of the API service.</p>
<div class="multicode">
<p><em>REST</em></p>
<pre><code>GET /v2/health/api
</code></pre>
<div class="multicode" id="code-31"><ul class="codetabs"><li><a href="#code-31-0">REST</a></li></ul>
<div class="code_sample" id="code-31-0" style="position: static;"><pre><code>GET /v2/health/api
</code></pre></div>
</div>
<p>Optionally, you can also include the following query parameters:</p>
<table>
@@ -5218,10 +5218,10 @@ Content-Type: image/svg+xml
<h2 id="health-check-ledger-importer">Health Check - Ledger Importer</h2>
<p><a href="https://github.com/ripple/rippled-historical-database/blob/develop/api/routesV2/checkHealth.js" title="Source">[Source]<br/></a></p>
<p>Check the health of the Ledger Importer Service.</p>
<div class="multicode">
<p><em>REST - Importer Health</em></p>
<pre><code>GET /v2/health/importer
</code></pre>
<div class="multicode" id="code-32"><ul class="codetabs"><li><a href="#code-32-0">REST - Importer Health</a></li></ul>
<div class="code_sample" id="code-32-0" style="position: static;"><pre><code>GET /v2/health/importer
</code></pre></div>
</div>
<p>Optionally, you can also include the following query parameters:</p>
<table>

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
@@ -494,9 +494,9 @@
<li><strong>Offer directories</strong> list the offers currently available in the distributed exchange. A single Offer Directory contains all the offers that have the same exchange rate for the same issuances.</li>
</ul>
<p>Example Directories:</p>
<div class="multicode">
<p><em>Offer Directory</em></p>
<pre><code>{
<div class="multicode" id="code-0"><ul class="codetabs"><li><a href="#code-0-0">Offer Directory</a></li><li><a href="#code-0-1">Owner Directory</a></li></ul>
<div class="code_sample" id="code-0-0" style="position: static;"><pre><code>{
"ExchangeRate": "4F069BA8FF484000",
"Flags": 0,
"Indexes": [
@@ -510,9 +510,9 @@
"TakerPaysIssuer": "5BBC0F22F61D9224A110650CFE21CC0C4BE13098",
"index": "1BBEF97EDE88D40CEE2ADE6FEF121166AFE80D99EBADB01A4F069BA8FF484000"
}
</code></pre>
<p><em>Owner Directory</em></p>
<pre><code>{
</code></pre></div>
<div class="code_sample" id="code-0-1" style="position: static;"><pre><code>{
"Flags": 0,
"Indexes": [
"AD7EAE148287EF12D213A251015F86E6D4BD34B3C4A0A1ED9A17198373F908AD",
@@ -523,7 +523,7 @@
"RootIndex": "193C591BF62482468422313F9D3274B5927CA80B4DD3707E42015DD609E39C94",
"index": "193C591BF62482468422313F9D3274B5927CA80B4DD3707E42015DD609E39C94"
}
</code></pre>
</code></pre></div>
</div>
<table>
<thead>

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -1,20 +1,61 @@
################################################################################
## Multicode Tabs filter ##
## Multicode Tabs 2 filter ##
## Author: Rome Reginelli ##
## Copyright: Ripple Labs, Inc. 2016 ##
## ##
## Finds and un-comments divs with the multicode class, for use with JS that ##
## turns the contents of those divs into tabs. ##
## It's necessary to have them as comments so the markdown inside the div ##
## gets processed correctly. ##
## Finds multicode tab sections and turns them into properly-formatted ##
## HTML syntax to use with minitabs jQuery ##
################################################################################
import re
import logging
def filter_html(html, target=None, page=None):
"""Uncomment multicode tab divs"""
MC_START_REGEX = re.compile("<!-- *<div class=['\"]multicode['\"][^>]*> *-->")
MC_END_REGEX = re.compile("<!-- *</div> *-->")
"""Turn multicode comments into a div (after markdown inside is parsed)"""
MC_START_REGEX = re.compile(r"<!--\s*MULTICODE_BLOCK_START\s*-->")
MC_END_REGEX = re.compile(r"<!--\s*MULTICODE_BLOCK_END\s*-->")
html = re.sub(MC_START_REGEX, "<div class='multicode'>", html)
html = re.sub(MC_END_REGEX, "</div>", html)
return html
def filter_soup(soup, target=None, page=None):
"""Turn a multicode block into the correct syntax for minitabs"""
multicodes = soup.find_all(class_="multicode")
index1 = 0
for cb_area in multicodes:
cb_area["id"] = "code-%d" % index1
codetabs_ul = soup.new_tag("ul")
codetabs_ul["class"] = "codetabs"
cb_area.insert(0,codetabs_ul)
pres = cb_area.find_all("pre")
index2 = 0
for pre in pres:
#make a unique ID for this code sample
linkid = "code-%d-%d" % (index1, index2)
#wrap this code sample in an ID'd div
code_sample_wrapper = soup.new_tag("div", id=linkid)
code_sample_wrapper["class"] = "code_sample"
code_sample_wrapper["style"] = "position: static;"
pre.wrap(code_sample_wrapper)
#add a link to the tabs ul
linkback = soup.new_tag("a", href=("#%s" % linkid))
linkback_li = soup.new_tag("li")
linkback_li.append(linkback)
codetabs_ul.append(linkback_li)
#find the text label for this sample
prev_p = code_sample_wrapper.find_previous_sibling("p")
try:
label = "".join(prev_p.em.strings)
except AttributeError:
label = "Code Sample %d-%d" % (index1, index2)
linkback.string = label
prev_p.decompose()
index2 += 1
index1 += 1

View File

@@ -9,7 +9,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});

View File

@@ -30,7 +30,7 @@
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$().multicode_tabs();
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});