Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
ec986adb
Commit
ec986adb
authored
10 years ago
by
inso
Browse files
Options
Downloads
Plain Diff
Merge branch 'refactor' of
https://github.com/ucoin-io/ucoin-python-api
into refactor
parents
4c6db245
9e06c393
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ucoinpy/api/bma/blockchain/__init__.py
+56
-0
56 additions, 0 deletions
ucoinpy/api/bma/blockchain/__init__.py
ucoinpy/api/bma/wot/__init__.py
+38
-0
38 additions, 0 deletions
ucoinpy/api/bma/wot/__init__.py
with
94 additions
and
0 deletions
ucoinpy/api/bma/blockchain/__init__.py
+
56
−
0
View file @
ec986adb
...
@@ -93,3 +93,59 @@ class Hardship(Blockchain):
...
@@ -93,3 +93,59 @@ class Hardship(Blockchain):
def
__get__
(
self
,
**
kwargs
):
def
__get__
(
self
,
**
kwargs
):
assert
self
.
fingerprint
is
not
None
assert
self
.
fingerprint
is
not
None
return
self
.
requests_get
(
'
/hardship/%s
'
%
self
.
fingerprint
.
upper
(),
**
kwargs
).
json
()
return
self
.
requests_get
(
'
/hardship/%s
'
%
self
.
fingerprint
.
upper
(),
**
kwargs
).
json
()
class
Newcomers
(
Blockchain
):
"""
GET, return block numbers containing newcomers.
"""
def
__get__
(
self
,
**
kwargs
):
return
self
.
requests_get
(
'
/with/newcomers
'
,
**
kwargs
).
json
()
class
Certifications
(
Blockchain
):
"""
GET, return block numbers containing certifications.
"""
def
__get__
(
self
,
**
kwargs
):
return
self
.
requests_get
(
'
/with/certs
'
,
**
kwargs
).
json
()
class
Joiners
(
Blockchain
):
"""
GET, return block numbers containing joiners.
"""
def
__get__
(
self
,
**
kwargs
):
return
self
.
requests_get
(
'
/with/joiners
'
,
**
kwargs
).
json
()
class
Actives
(
Blockchain
):
"""
GET, return block numbers containing actives.
"""
def
__get__
(
self
,
**
kwargs
):
return
self
.
requests_get
(
'
/with/actives
'
,
**
kwargs
).
json
()
class
Leavers
(
Blockchain
):
"""
GET, return block numbers containing leavers.
"""
def
__get__
(
self
,
**
kwargs
):
return
self
.
requests_get
(
'
/with/leavers
'
,
**
kwargs
).
json
()
class
Excluded
(
Blockchain
):
"""
GET, return block numbers containing excluded.
"""
def
__get__
(
self
,
**
kwargs
):
return
self
.
requests_get
(
'
/with/excluded
'
,
**
kwargs
).
json
()
class
UD
(
Blockchain
):
"""
GET, return block numbers containing universal dividend.
"""
def
__get__
(
self
,
**
kwargs
):
return
self
.
requests_get
(
'
/with/ud
'
,
**
kwargs
).
json
()
class
TX
(
Blockchain
):
"""
GET, return block numbers containing transactions.
"""
def
__get__
(
self
,
**
kwargs
):
return
self
.
requests_get
(
'
/with/tx
'
,
**
kwargs
).
json
()
This diff is collapsed.
Click to expand it.
ucoinpy/api/bma/wot/__init__.py
+
38
−
0
View file @
ec986adb
...
@@ -49,3 +49,41 @@ class Lookup(WOT):
...
@@ -49,3 +49,41 @@ class Lookup(WOT):
assert
self
.
search
is
not
None
assert
self
.
search
is
not
None
return
self
.
requests_get
(
'
/lookup/%s
'
%
self
.
search
,
**
kwargs
).
json
()
return
self
.
requests_get
(
'
/lookup/%s
'
%
self
.
search
,
**
kwargs
).
json
()
class
CertifiersOf
(
WOT
):
"""
GET Certification data over a member.
"""
def
__init__
(
self
,
connection_handler
,
search
,
module
=
'
wot
'
):
super
(
WOT
,
self
).
__init__
(
connection_handler
,
module
)
self
.
search
=
search
def
__get__
(
self
,
**
kwargs
):
assert
self
.
search
is
not
None
return
self
.
requests_get
(
'
/certifiers-of/%s
'
%
self
.
search
,
**
kwargs
).
json
()
class
CertifiedBy
(
WOT
):
"""
GET Certification data from a member.
"""
def
__init__
(
self
,
connection_handler
,
search
,
module
=
'
wot
'
):
super
(
WOT
,
self
).
__init__
(
connection_handler
,
module
)
self
.
search
=
search
def
__get__
(
self
,
**
kwargs
):
assert
self
.
search
is
not
None
return
self
.
requests_get
(
'
/certified-by/%s
'
%
self
.
search
,
**
kwargs
).
json
()
class
Members
(
WOT
):
"""
GET List all current members of the Web of Trust.
"""
def
__init__
(
self
,
connection_handler
,
module
=
'
wot
'
):
super
(
WOT
,
self
).
__init__
(
connection_handler
,
module
)
def
__get__
(
self
,
**
kwargs
):
return
self
.
requests_get
(
'
/members
'
,
**
kwargs
).
json
()
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