Skip to content

bill42362/pbplus-member-sdk

Repository files navigation

pbplus-member-sdk

API sdk of PBPlus member plugin.

Behaviors

  • Update getState().pbplusMemberCenter.userUuid by url (token_id) or cookie.
  • Dock to pbplus auth, member and memberCenter api, with url passed by store.

You can

  • Display member center by dispatch(PbplusMemberCenter.Actions.display()).
  • Update active tab by dispatch(PbplusMemberCenter.Actions.updateActiveTab('TAB_NAME')).
    • Possible TAB_NAMEs are notice-center, calendar, point-counter, buying-logs and personal-data.
    • See MemberCenterComonent for furtuer information.
  • Check auth state by dispatch(PbplusMemberCenter.Actions.checkAuthState({ clientId })).
  • Update user uuid in cookie and store by dispatch(PbplusMemberCenter.Actions.updateUserUUID({ uuid })).
  • Renew user uuid in cookie and store randomly by dispatch(PbplusMemberCenter.Actions.renewUserUUID()).

These values in redux store will be read.

const store = createStore(
    reducer,
    {   
        pbplusMemberCenter: {
            baseUrl: {
                auth: process.env.AUTH_BASE_URL,
                member: process.env.MEMBER_BASE_URL,
                memberCenter: process.env.MEMBER_CENTER_BASE_URL,
            }   
        }  
    }
);

Start demo server

cd demo/
npm install
npm start

About

API sdk of PBPlus member plugin.

Resources

Stars

Watchers

Forks

Packages

No packages published