Usage
Setup
Perform the following steps to run the demo application on your local machine:
Download
First, download the according demo app from the downloads folder.
Unzip the file.
Configuration
Update the file src/app/config/config.ts
with your custom configuration:
Authentication
The demo-app offers two ways of authentication:
- API-Key
- Session injection
API-Key
Make sure to fill in the API_KEY
with the ones you received from your Partium contact or created in the API-Keys section. Later, when starting the demo-app, select the option "Login with API-KEY" on the initial page.
Session injection
Make sure to fill in the USER_NAME
and PASSWORD
with the ones you received from your Partium contact. Later, when starting the demo-app, select the option "Login via Active Session Injection" on the initial page.
Partium-API
Customize the PARTIUM_API_BASE_URL if needed, but in most scenarios, the default value should be fine.
Keycloak
Customize the Keycloak Settings if needed, but in most scenarios, the default values should be fine.
Start
Install npm dependencies:
npm install
Run application:
npm start
The Demo App
You can navigate through the application to try out different features which the SDK provides. If you have a look at the code, you can see how it is implemented and how the respective Services are called. This should allow you to get a better understanding of the different concepts and to reuse parts of the code for your own application.
The most relevant pieces for you might be the:
- SDK Initialization and authentication, which can be found in
src/app/pages/login-page/login.page.ts
- Part Search examples:
src/app/pages/search-service/search-service.page.ts
Prerequisits
- Node ≥ 18.13.0
- npm ≥ 8.0.0
Trouble shooting
Please don't hesitate to get in touch with your Partium contact person, if you have any questions or issues.