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
Commits
01d1c4b9
Commit
01d1c4b9
authored
6 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
Add node/sandboxes in bma api
parent
7d822aee
No related branches found
No related tags found
No related merge requests found
Pipeline
#4094
passed
6 years ago
Stage: github-sync
Stage: build
Stage: test
Stage: release
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
duniterpy/api/bma/node.py
+55
-22
55 additions, 22 deletions
duniterpy/api/bma/node.py
with
55 additions
and
22 deletions
duniterpy/api/bma/node.py
+
55
−
22
View file @
01d1c4b9
...
@@ -23,15 +23,7 @@ logger = logging.getLogger("duniter/node")
...
@@ -23,15 +23,7 @@ logger = logging.getLogger("duniter/node")
MODULE
=
'
node
'
MODULE
=
'
node
'
SUMMARY_SCHEMA
=
{
async
def
summary
(
client
:
Client
)
->
dict
:
"""
GET Duniter node version and infos
:param client: Client to connect to the api
:return:
"""
schema
=
{
"
type
"
:
"
object
"
,
"
type
"
:
"
object
"
,
"
properties
"
:
{
"
properties
"
:
{
"
duniter
"
:
{
"
duniter
"
:
{
...
@@ -53,4 +45,45 @@ async def summary(client: Client) -> dict:
...
@@ -53,4 +45,45 @@ async def summary(client: Client) -> dict:
"
required
"
:
[
"
duniter
"
]
"
required
"
:
[
"
duniter
"
]
}
}
return
await
client
.
get
(
MODULE
+
'
/summary
'
,
schema
=
schema
)
SANDBOX_SCHEMA
=
{
"
type
"
:
"
object
"
,
"
properties
"
:
{
"
size
"
:
{
"
type
"
:
"
number
"
},
"
free
"
:
{
"
type
"
:
"
number
"
}
},
"
required
"
:
[
"
size
"
,
"
free
"
]
}
SANDBOXES_SCHEMA
=
{
"
type
"
:
"
object
"
,
"
properties
"
:
{
"
identities
"
:
SANDBOX_SCHEMA
,
"
memberships
"
:
SANDBOX_SCHEMA
,
"
transactions
"
:
SANDBOX_SCHEMA
},
"
required
"
:
[
"
identities
"
,
"
memberships
"
,
"
transactions
"
]
}
async
def
summary
(
client
:
Client
)
->
dict
:
"""
GET Duniter node version and infos
:param client: Client to connect to the api
:return:
"""
return
await
client
.
get
(
MODULE
+
'
/summary
'
,
schema
=
SUMMARY_SCHEMA
)
async
def
sandboxes
(
client
:
Client
)
->
dict
:
"""
GET Duniter node version and infos
:param client: Client to connect to the api
:return:
"""
return
await
client
.
get
(
MODULE
+
'
/sandboxes
'
,
schema
=
SANDBOXES_SCHEMA
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment