mirror of
https://github.com/mempool/mempool.git
synced 2026-08-17 13:07:07 +02:00
Add python example for websocket api docs
This commit is contained in:
parent
0a645431ae
commit
fc57effd5c
3 changed files with 45 additions and 0 deletions
|
|
@ -287,6 +287,10 @@ yarn add @mempool/liquid.js`;
|
|||
return code.codeSampleMainnet.response;
|
||||
}
|
||||
|
||||
wrapPythonTemplate(code: any) {
|
||||
return ( ( this.network === 'testnet' || this.network === 'signet' ) ? ( code.codeTemplate.python.replace( "wss://mempool.space/api/v1/ws", "wss://mempool.space/" + this.network + "/api/v1/ws" ) ) : code.codeTemplate.python );
|
||||
}
|
||||
|
||||
replaceJSPlaceholder(text: string, code: any) {
|
||||
for (let index = 0; index < code.length; index++) {
|
||||
const textReplace = code[index];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue