npm.io
0.1.5 • Published 7 years ago

@riiid/santa-sdk-js

Licence
Apache-2.0
Version
0.1.5
Deps
3
Size
520 kB
Vulns
24
Weekly
0

santa-sdk-js

SDK for Riiider

Installation

yarn add @riiid/santa-sdk-js

Usage

import {Auth, Payment} from '@riiid/santa-sdk-js';

const auth = new Auth(URL_AUTH, REQUEST_CONFIG);
const payment = new Payment(URL_PAYMENT, REQUEST_CONFIG);

APIs

2가지 타입을 지원합니다

  • Promise - default
  • Observable - suffix $
    • ex) existEmail$
Auth
existEmail({email})
getUser(token)
deleteUser(token)
signupWithEmail({email, password, token})
signinWithEmail({email, password})
getTokenWithSNS({token, snsToken, type})
updateTokens(token)
updatePassword({token, password})
createAnonymous(client_code)
Payment
preparePayment({token, payMethod, paymentItemId})
approvePayment({token, payMethod, payload})
getPaymentItemStatus({token, groupName})
getPaymentItemContents({token, paymentItemIds})
getPaymentItemContentById({token, contentId})
getEventContents(token)
getEventContentById({token, contentId})
getBannerContents(token)
getBannerContentById({token, contentId})