election

package
v0.0.0-...-931f746 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Election

type Election struct {
	Client *resty.Client
}

func New

func New(cfgs ...ElectionConfiguration) (Election, error)

func (Election) ClaimShopee

func (s Election) ClaimShopee(electionClaimBodyInfo entity.ElectionClaimBodyInfo) (entity.ElectionClaimResponseInfo, error)

func (Election) GetAllElectionCodeById

func (s Election) GetAllElectionCodeById(codeSetId int64) (entity.ElectionAllCodeSetResponseInfo, error)

func (Election) GetElectionCode

func (s Election) GetElectionCode(skip int, take int) ([]entity.ElectionCodeResponseInfo, error)

func (Election) GetElectionCodeById

func (s Election) GetElectionCodeById(codeSetId int64, latestCodeId int64) ([]entity.ElectionCodeSetByIdInfo, error)

func (Election) GetElectionHistory

func (s Election) GetElectionHistory(skip int, take int) ([]entity.ElectionHistoryResponseInfo, error)

func (Election) SentCodeToEmail

func (s Election) SentCodeToEmail(electionSentCodeToEmailBody entity.ElectionSentCodeToEmailBody) (resty.Response, error)

type ElectionConfiguration

type ElectionConfiguration func(*Election) error

func WithClient

func WithClient(client *resty.Client) ElectionConfiguration

type ElectionRepository

type ElectionRepository interface {
	// @POST("/claim/v2/shopee")
	// g.b.l<ElectionClaimResponseInfo> claimShopee(@Body @NotNull ElectionClaimBodyInfo electionClaimBodyInfo);
	ClaimShopee(electionClaimBodyInfo entity.ElectionClaimBodyInfo) (entity.ElectionClaimResponseInfo, error)

	// @GET("/code/{codeSetId}/all")
	// g.b.l<ElectionAllCodeSetResponseInfo> getAllElectionCodeById(@Path("codeSetId") long j2);
	GetAllElectionCodeById(codeSetId int64) (entity.ElectionAllCodeSetResponseInfo, error)

	// @GET("/code")
	// g.b.l<List<ElectionCodeResponseInfo>> getElectionCode(@Query("skip") int i2, @Query("take") int i3);
	GetElectionCode(skip int, take int) ([]entity.ElectionCodeResponseInfo, error)

	// @GET("/code/{codeSetId}")
	// g.b.l<List<ElectionCodeSetByIdInfo>> getElectionCodeById(@Path("codeSetId") long j2, @Query("latestCodeId") long j3);
	GetElectionCodeById(codeSetId int64, latestCodeId int64) ([]entity.ElectionCodeSetByIdInfo, error)

	// @GET("/history")
	// g.b.l<List<ElectionHistoryResponseInfo>> getElectionHistory(@Query("skip") int i2, @Query("take") int i3);
	GetElectionHistory(skip int, take int) ([]entity.ElectionHistoryResponseInfo, error)

	// @POST("/code/sent")
	// g.b.l<f0> sentCodeToEmail(@Body @NotNull ElectionSentCodeToEmailBody electionSentCodeToEmailBody);
	SentCodeToEmail(electionSentCodeToEmailBody entity.ElectionSentCodeToEmailBody) (resty.Response, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL