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
| Name | Type | Required | Description |
|---|---|---|---|
OrderByRevenue | bool | — | If set, orders results by the expected revenue |
OrderByDate | bool | — | If set, orders results by the creation date of the affiliate program |
Peer | InputPeerClass | yes | The peer that will become the affiliate: star commissions will be transferred to this peer's star balance. |
Offset | string | yes | Offset for pagination, taken from payments.suggestedStarRefBots.next_offset, initially empty. |
Limit | int | yes | Maximum number of results to return, see pagination |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 403 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.getSuggestedStarRefBots#d6b48f7