Listing Base class
- class starfish.listing.ListingBase(agent: starfish.agent.agent_base.AgentBase, listing_id: str, asset_did: str, data: Any, ddo: Optional[starfish.network.ddo.DDO] = None)
Bases:
abc.ABC
,Generic
[starfish.types.ListingBase
]Create a Listing object
- Parameters
- property agent: starfish.agent.agent_base.AgentBase
- Returns
Agent object that created this listing
- Type
SquidAgent
- property is_empty: bool
Checks to see if this Listinng is empty.
- Returns
True if this listing is empty else False.
- Type
boolean
- abstract purchase(account: starfish.network.account_base.AccountBase) None
Purchase the underlying asset within this listing using the account details, return a purchased asset with the service_agreement_id ( purchase_id ) set.
- Parameters
account (
Account
) – account to use to purchase this asset.- Returns
SquidPurchase object that has information about this listing, asset and purcase id.
- Type
SquidPurchase