microraiden.proxy.resources.expensive.
Expensive
(channel_manager, light_client_proxy=None, paywall=None, price=None)[source]¶Bases: flask_restful.Resource
Expensive is basically a Flask’s resource with a custom method decorator. The decorator handles all the payment processing and user just needs to implement methods for HTTP verb he intends to use.
get_paywall
(url)[source]¶Implement this if you want to return a custom HTTP paywall code.
Returns: | HTML page with the paywall |
---|---|
Return type: | str |
method_decorators
= [<function paywall_decorator>]¶microraiden.proxy.resources.login.
ChannelManagementLogin
[source]¶Bases: flask_restful.Resource
methods
= {'GET'}¶microraiden.proxy.resources.login.
ChannelManagementLogout
[source]¶Bases: flask_restful.Resource
methods
= {'GET'}¶microraiden.proxy.resources.management.
ChannelManagementAdmin
(channel_manager)[source]¶Bases: flask_restful.Resource
methods
= {'GET'}¶microraiden.proxy.resources.management.
ChannelManagementAdminChannels
(channel_manager)[source]¶Bases: flask_restful.Resource
methods
= {'DELETE'}¶microraiden.proxy.resources.management.
ChannelManagementChannelInfo
(channel_manager)[source]¶Bases: flask_restful.Resource
methods
= {'DELETE', 'GET'}¶microraiden.proxy.resources.management.
ChannelManagementListChannels
(channel_manager)[source]¶Bases: flask_restful.Resource
get_all_channels
(channel_status='all', condition=<function ChannelManagementListChannels.<lambda>>)[source]¶methods
= {'DELETE', 'GET'}¶microraiden.proxy.resources.proxy_url.
PaywalledProxyUrl
(domain=None, *args, **kwargs)[source]¶Bases: microraiden.proxy.resources.expensive.Expensive
Proxified paywall - if payment is sucessful, it fetches a content from a remote server
get_paywall
(url)[source]¶Implement this if you want to return a custom HTTP paywall code.
Returns: | HTML page with the paywall |
---|---|
Return type: | str |
methods
= {'GET'}¶microraiden.proxy.resources.request_data.
RequestData
(headers, cookies=None)[source]¶Bases: object
__init__
(headers, cookies=None)[source]¶parse a flask request object and check if the data received are valid
balance
¶contract_address
¶open_block_number
¶payment
¶price
¶receiver_address
¶sender_address
¶