ao-js-sdk - v0.0.9
    Preparing search index...

    Interface ISweepstakesClient

    Interface for the Sweepstakes Client that provides functionality for managing sweepstakess and viewing sweepstakes pulls.

    interface ISweepstakesClient {
        addSweepstakesEntrant(
            entrant: string,
            sweepstakesId: string,
        ): Promise<boolean>;
        deleteSweepstakesData(
            sweepstakesId: string,
            pullId?: string,
        ): Promise<Boolean>;
        pullSweepstakes(sweepstakesId: string, details: string): Promise<boolean>;
        registerSweepstakes(entrants: string[], details: string): Promise<Boolean>;
        setSweepstakesEntrants(
            entrants: string[],
            sweepstakesId: string,
        ): Promise<boolean>;
        viewAllSweepstakes(): Promise<ViewAllSweepstakesResponse>;
        viewSweepstakes(sweepstakesId: string): Promise<SweepstakesData>;
        viewSweepstakesPull(
            pullId: string,
            sweepstakesId: string,
        ): Promise<SweepstakesPull>;
    }

    Implemented by

    Index

    Methods

    • Deletes a sweepstakes or pull by ID

      Parameters

      • sweepstakesId: string

        ID of the sweepstakes to delete

      • OptionalpullId: string

        ID of the pull to delete

      Returns Promise<Boolean>

      Promise resolving to true if successful

    • Sets the list of entrants for the sweepstakes.

      Parameters

      • entrants: string[]

        Array of entrant names

      • sweepstakesId: string

      Returns Promise<boolean>

      Promise resolving to true if successful