Skip to content

Commit

Permalink
adding function docstrings for pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
rilesdun committed Sep 15, 2023
1 parent 753b7ea commit 0cf93d0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
This is the main application module.
"""

import logging
import time
from config import api_url
Expand Down Expand Up @@ -50,17 +54,26 @@

@app.route('/api/latest_block_num', methods=['GET'])
def latest_block_num():
"""
This endpoint returns the latest block number.
"""
latest_block = get_latest_block()
return jsonify(latest_block_num=latest_block['block_num'])

@app.route('/api/supply/ppy', methods=['GET'])
def supply_ppy():
"""
This endpoint returns the supply details for the asset 'ppy'.
"""
asset_id = request.args.get("asset", "1.3.0")
supplies = get_supply_details(asset_id)
return supplies

@app.route('/api/supply/btfun', methods=['GET'])
def supply_btfun():
"""
This endpoint returns the supply details for the asset 'btfun'.
"""
asset_id = request.args.get("asset", "1.3.1")
supplies = get_supply_details(asset_id)
return supplies
Expand Down

0 comments on commit 0cf93d0

Please sign in to comment.