Skip to main content

payments.getSuggestedStarRefBots

Obtain a list of suggested mini apps with available affiliate programs order_by_revenue and order_by_date are mutually exclusive: if neither is set, results are sorted by profitability.

func (c *Client) PaymentsGetSuggestedStarRefBots(ctx context.Context, request *PaymentsGetSuggestedStarRefBotsRequest) (*PaymentsSuggestedStarRefBots, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.PaymentsGetSuggestedStarRefBots(ctx, &tg.PaymentsGetSuggestedStarRefBotsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *PaymentsSuggestedStarRefBots
return nil
})

Parameters

NameTypeRequiredDescription
OrderByRevenueboolIf set, orders results by the expected revenue
OrderByDateboolIf set, orders results by the creation date of the affiliate program
PeerInputPeerClassyesThe peer that will become the affiliate: star commissions will be transferred to this peer's star balance.
OffsetstringyesOffset for pagination, taken from payments.suggestedStarRefBots.next_offset, initially empty.
LimitintyesMaximum number of results to return, see pagination

Returns

*PaymentsSuggestedStarRefBots

Possible errors

CodeTypeDescription
403PEER_ID_INVALIDThe provided peer id is invalid.

References