SubscriptionApi
public protocol SubscriptionApi : BaseApi
Undocumented
-
get(byId:)
Default implementationGet a subscription object by id.
Throws
DCoreException.Network.notFound
if subscription does not exist.Default Implementation
Declaration
Swift
func get(byId id: ObjectIdConvertible) -> Single<Subscription>
Parameters
id
Subscription object id, eg. 2.15.*, as
SubscriptionObjectId
orString
format.Return Value
Subscription
object. -
getAllActive(byConsumerId:limit:)
Default implementationCheck if the account exist.
Default Implementation
Declaration
Swift
func getAllActive(byConsumerId id: AccountObjectIdConvertible, limit: Int) -> Single<[Subscription]>
Parameters
id
Consumer account object id, eg. 1.2.*, as
AccountObjectId
orString
format.limit
Maximum number of subscription objects to fetch, must not exceed 100.
Return Value
true
if account exist. -
getAllActive(byAuthorId:limit:)
Default implementationCheck if the account exist.
Default Implementation
Declaration
Swift
func getAllActive(byAuthorId id: AccountObjectIdConvertible, limit: Int) -> Single<[Subscription]>
Parameters
id
Author account object id, eg. 1.2.*, as
AccountObjectId
orString
format.limit
Maximum number of subscription objects to fetch, must not exceed 100.
Return Value
true
if account exist. -
getAll(byConsumerId:limit:)
Default implementationCheck if the account exist.
Default Implementation
Declaration
Swift
func getAll(byConsumerId id: AccountObjectIdConvertible, limit: Int) -> Single<[Subscription]>
Parameters
id
Consumer account object id, eg. 1.2.*, as
AccountObjectId
orString
format.limit
Maximum number of subscription objects to fetch, must not exceed 100.
Return Value
true
if account exist. -
getAll(byAuthorId:limit:)
Default implementationCheck if the account exist.
Default Implementation
Declaration
Swift
func getAll(byAuthorId id: AccountObjectIdConvertible, limit: Int) -> Single<[Subscription]>
Parameters
id
Author account object id, eg. 1.2.*, as
AccountObjectId
orString
format.limit
Maximum number of subscription objects to fetch, must not exceed 100.
Return Value
true
if account exist.