aleph-im / aleph-sdk-python

Python SDK library for the Aleph.im network
MIT License
3 stars 5 forks source link

Feature: get_program_price #143

Closed 1yam closed 2 months ago

1yam commented 2 months ago

Problem: In the Pay-As-You-Go (PAYG) flow, we need to retrieve the price of a program.

Solution: Implement the get_program_price function to query the /api/v0/price/ endpoint and fetch the price of the program.

github-actions[bot] commented 2 months ago

"summary": "This PR introduces a new feature and modifies existing logic, which could have moderate risks and require system-level understanding.", "highlights": [ { "line": "@@ -40,7 +40,7 @@", "highlight": "from ..query.responses import PostsResponse, PriceResponse" }, { "line": "@@ -241,6 +241,18 @@", "highlight": "def watch_messages(self, ..." }, { "line": "@@ -241,18 +241,18 @@", "highlight": "async def watch_messages(self, ..." }, { "line": "@@ -392,3 +397,17 @@", "highlight": "async def watch_messages(self, ..." }, { "line": "@@ -392,17 +397,17 @@", "highlight": "async def get_program_price(self, item_hash: str) -> PriceResponse:" }, { "line": "@@ -397,3 +397,17 @@", "highlight": "async def get_program_price(self, item_hash: str) -> PriceResponse:" }, { "line": "@@ -397,17 +397,17 @@", "highlight": "async with self.http_session.get(f\"/api/v0/price/{item_hash}\") as resp:" }, { "line": "@@ -402,3 +407,17 @@", "highlight": "async def get_program_price(self, item_hash: str) -> PriceResponse:" } ] }