Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DuniterPy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
DuniterPy
Merge requests
!84
#58
: WS2P support
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
#58
: WS2P support
ws2p
into
dev
Overview
40
Commits
35
Pipelines
23
Changes
22
Merged
Vincent Texier
requested to merge
ws2p
into
dev
5 years ago
Overview
30
Commits
35
Pipelines
23
Changes
22
Expand
#58 (closed)
: Add the ws2p API support and examples
Edited
5 years ago
by
Moul
1
0
Merge request reports
Compare
dev
version 21
9f73162c
5 years ago
version 20
ce600469
5 years ago
version 19
1b58b505
5 years ago
version 18
f7595d45
5 years ago
version 17
680d7e7a
5 years ago
version 16
cf3f07cc
5 years ago
version 15
19f4b35f
5 years ago
version 14
1ae550c6
5 years ago
version 13
bab1a392
5 years ago
version 12
901f5c8b
5 years ago
version 11
adc532f0
5 years ago
version 10
cdadeb55
5 years ago
version 9
2dad59c1
5 years ago
version 8
84288ef9
5 years ago
version 7
0c2e0c3c
5 years ago
version 6
57c604d3
5 years ago
version 5
33407856
5 years ago
version 4
7bee3cf1
5 years ago
version 3
c137eb4e
5 years ago
version 2
987ce723
5 years ago
version 1
b4bc62c3
5 years ago
dev (base)
and
latest version
latest version
f7f01678
35 commits,
5 years ago
version 21
9f73162c
35 commits,
5 years ago
version 20
ce600469
35 commits,
5 years ago
version 19
1b58b505
34 commits,
5 years ago
version 18
f7595d45
34 commits,
5 years ago
version 17
680d7e7a
34 commits,
5 years ago
version 16
cf3f07cc
35 commits,
5 years ago
version 15
19f4b35f
35 commits,
5 years ago
version 14
1ae550c6
34 commits,
5 years ago
version 13
bab1a392
34 commits,
5 years ago
version 12
901f5c8b
32 commits,
5 years ago
version 11
adc532f0
32 commits,
5 years ago
version 10
cdadeb55
32 commits,
5 years ago
version 9
2dad59c1
31 commits,
5 years ago
version 8
84288ef9
31 commits,
5 years ago
version 7
0c2e0c3c
30 commits,
5 years ago
version 6
57c604d3
30 commits,
5 years ago
version 5
33407856
25 commits,
5 years ago
version 4
7bee3cf1
26 commits,
5 years ago
version 3
c137eb4e
26 commits,
5 years ago
version 2
987ce723
24 commits,
5 years ago
version 1
b4bc62c3
23 commits,
5 years ago
22 files
+
1378
−
64
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
22
Search (e.g. *.vue) (Ctrl+P)
duniterpy/api/bma/ws.py
+
5
−
7
Options
@@ -18,10 +18,8 @@
# vit
import
logging
from
aiohttp.client
import
_WSRequestContextManager
from
duniterpy.api.bma.blockchain
import
BLOCK_SCHEMA
from
duniterpy.api.client
import
Client
from
duniterpy.api.client
import
Client
,
WSConnection
logger
=
logging
.
getLogger
(
"
duniter/ws
"
)
@@ -42,21 +40,21 @@ WS_PEER_SCHEMA = {
}
def
block
(
client
:
Client
)
->
_
WS
RequestContextManager
:
async
def
block
(
client
:
Client
)
->
WS
Connection
:
"""
Connect to block websocket
:param client: Client to connect to the api
:return:
"""
return
client
.
connect_ws
(
MODULE
+
"
/block
"
)
return
await
client
.
connect_ws
(
MODULE
+
"
/block
"
)
def
peer
(
client
:
Client
)
->
_
WS
RequestContextManager
:
async
def
peer
(
client
:
Client
)
->
WS
Connection
:
"""
Connect to peer websocket
:param client: Client to connect to the api
:return:
"""
return
client
.
connect_ws
(
MODULE
+
"
/peer
"
)
return
await
client
.
connect_ws
(
MODULE
+
"
/peer
"
)
Loading