1.0.0 • Published 3 years ago

stitchcredit-users-api v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

stitchcredit-users-api

StitchCreditApi - JavaScript client for stitchcredit-users-api This SDK is automatically generated by the OpenAPI Generator project:

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install stitchcredit-users-api --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your stitch_credit_api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

import { UserControllerApi } from 'stitchcredit-users-api';
const usersApi = new UserControllerApi();

// This will initialize SDK and configure Bearer (JWT) access token for authorization: accessToken
await usersApi.exchangePreauthToken({{token}});


/* 
Call StitchCredit Users API's methods
  1. Example - get efx latest report
  2. Example - get efx latest reporty summary
*/

const res = await usersApi.efxLatestReport();
const res = await usersApi.efxLatestReportSummary();

Documentation for API Endpoints

All URIs are relative to https://efx-dev.stitchcredit.com/api

ClassMethodHTTP requestDescription
StitchCreditApi.UserControllerApichangeNotificationsPOST /users/change-notifications
StitchCreditApi.UserControllerApichangePasswordPOST /users/change-password
StitchCreditApi.UserControllerApichangeRecoveryPOST /users/change-recovery
StitchCreditApi.UserControllerApichangeUserEmailPOST /users/change-email
StitchCreditApi.UserControllerApicloseUserAccountPOST /users/close-account
StitchCreditApi.UserControllerApiefxLatestReportGET /users/efx-latest-report
StitchCreditApi.UserControllerApiefxLatestReportSummaryGET /users/efx-latest-report/summary
StitchCreditApi.UserControllerApiexchangePreauthTokenGET /users/preauth-token/{token}
StitchCreditApi.UserControllerApigetActionTokenPOST /users/action-token
StitchCreditApi.UserControllerApigetEfxAlertsGET /users/efx-alerts
StitchCreditApi.UserControllerApigetEfxConfigGET /users/efx-config
StitchCreditApi.UserControllerApigetEfxLatestEFXScoreGET /users/efx-latest-efx-score
StitchCreditApi.UserControllerApigetEfxLatestScoresGET /users/efx-latest-scores
StitchCreditApi.UserControllerApigetEfxScoreHistoryGET /users/efx-score-history
StitchCreditApi.UserControllerApigetEfxScoresGET /users/efx-scores
StitchCreditApi.UserControllerApigetIdentityQuizGET /users/get-quiz
StitchCreditApi.UserControllerApigetMobileAuthorizationGET /users/get-mobile
StitchCreditApi.UserControllerApigetUserGET /users
StitchCreditApi.UserControllerApiinitializeGET /users/initialize
StitchCreditApi.UserControllerApiinitializeWithKeyGET /users/initialize/{key}
StitchCreditApi.UserControllerApiloginUserPOST /users/login
StitchCreditApi.UserControllerApirecoverPasswordPOST /users/password-recovery
StitchCreditApi.UserControllerApirecoveryQuestionPOST /users/recovery-token
StitchCreditApi.UserControllerApirefreshUserTokenGET /users/refresh-token
StitchCreditApi.UserControllerApiregisterUserPOST /users/register
StitchCreditApi.UserControllerApirenewMobileCodePOST /users/renew-code
StitchCreditApi.UserControllerApiresetPasswordPOST /users/password-reset
StitchCreditApi.UserControllerApisendMobileCodePOST /users/send-code/{token}
StitchCreditApi.UserControllerApisetIdentityPOST /users/identity
StitchCreditApi.UserControllerApistartUserSessionGET /users/start
StitchCreditApi.UserControllerApiverifyIdentityQuizPOST /users/verify-quiz
StitchCreditApi.UserControllerApiverifyMobileCodePOST /users/verify-code

Documentation for Models

Documentation for Authorization

accessToken

  • Type: Bearer authentication (JWT)