sagas/auth

sagas/auth

Methods

(async, generator, static) checkSession() → {call|put|put|put|put}

Source:

Check user session

Yields:
  • /session/checksession
    Type
    call
  • SET_LOADER
    Type
    put
  • SET_USER_DATA
    Type
    put
  • GET_LOYALTY
    Type
    put
  • SHOW_ERROR_MODAL
    Type
    put

(async, generator, static) getBalanceAndBonus() → {call|select|put|put}

Source:

Update balance

Yields:
  • /user/balance
    Type
    call
  • getUser
    Type
    select
  • UPDATE_BALANCE
    Type
    put
  • SHOW_ERROR_MODAL
    Type
    put

(async, generator, static) getLoyalty(action) → {call|call|put|put}

Source:
Properties:
Name Type Description
action object
Properties
Name Type Description
payload object
Properties
Name Type Attributes Description
isAfterPlacebet boolean <optional>

Optional param to see if we come from placebet so we should wait 3 seconds for loyalty to get updated

Get bonus for user

Parameters:
Name Type Description
action object
Yields:
  • delay 3000
    Type
    call
  • /loyalty/userbonus
    Type
    call
  • SET_LOYALTY
    Type
    put
  • SHOW_ERROR_MODAL
    Type
    put

(async, generator, static) goToMyAccount(action)

Source:
Properties:
Name Type Description
action object
Properties
Name Type Description
payload object
Properties
Name Type Description
destination string

Get src for iframe

Parameters:
Name Type Description
action object

(async, generator, static) login(action) → {put|call|put|select|select|select|select|select|put|put|put|put|put|put}

Source:
Properties:
Name Type Description
action object
Properties
Name Type Description
payload object
Properties
Name Type Description
username string
password string
Parameters:
Name Type Description
action object
Yields:
  • SET_LOADER
    Type
    put
  • /session/login
    Type
    call
  • LOGIN_ERROR
    Type
    put
  • getPlacebetAfterLogin
    Type
    select
  • getRoundId
    Type
    select
  • getLiveId
    Type
    select
  • getHaveLiveMatches
    Type
    select
  • getTargetPageAfterLogin
    Type
    select
  • SET_USER_DATA
    Type
    put
  • GET_LOYALTY
    Type
    put
  • PLACEBET
    Type
    put
  • GET_PLACED_BETS
    Type
    put
  • OPEN_MODAL
    Type
    put
  • SHOW_ERROR_MODAL
    Type
    put

(async, generator, static) logout(action) → {put|call|put}

Source:
Properties:
Name Type Description
action object
Properties
Name Type Description
payload object
Properties
Name Type Attributes Description
gameType string <optional>
Parameters:
Name Type Description
action object
Yields:
  • LOGOUT_SUCCESS
    Type
    put
  • /session/logout
    Type
    call
  • SHOW_ERROR_MODAL
    Type
    put

(async, static) module.exports() → {void}

Source:
Returns:
Type
void

Type Definitions

"getBalanceAndBonus/response.data"

Source:
Properties:
Name Type Description
amount number
bonusAmount number
currency string
Type:
  • object

"loyalty/response.data"

Source:
Properties:
Name Type Description
bonusAmount number
expirationDate Time
bonusLevelId number
bonusName string
completionPercentage number
active boolean
maxBonusDuration string
Type:
  • object

"user/response.data"

Source:
Properties:
Name Type Description
user object

User information.

sessionId string
freeBets Array

User's free bets. One free bet contain exparation date, stake and id

Type:
  • object