Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
raeijpe committed Oct 12, 2020
2 parents 7659e7c + ada1d11 commit 472a2ee
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
# CDS-SCP-API Node Module

## CDS Extension for SAP Cloud Platform API Consumption
This node module simplifies the consuming external API in a Cloud Application Programming (CAP) Model.
The users can use the raw capabilities of the **Axios** node module while still utilizing the following capabilities of CAP framework and SAP Cloud Platform:
- Fluent API concept
- Configure SAP Cloud Platform Destination and Connectivity services
- CDS configuration found in **package.json**
- Reuse Axios options for calling API
The node module CDS-SCP-API simplifies the consuming external API from SAP OnPremise & Cloud APIs, Microsoft Office 365 APIs, Google Cloud Platform APIs, and other REST APIs in a Cloud Application Programming (CAP) Model on the SAP Cloud Platform. The module provides:
- Fluent API consumption concept
- Endpoint and Configuration using SAP Cloud Platform Destination and Connectivity services
- Support of all kind of APIs including SAP OnPremise & Cloud OData and Rest APIs, Microsoft Office 365 APIs, Google Cloud Platform APIs and other REST APIs
- Easy API http request configuration based on Axios config options

## History
Jhodel Cailan initially started the CDS Extension concept. SAP Mentor Robert Eijpe created a similar concept integrating Microsoft Azure and Google Cloud APIs into a CDS external services concept. The SAP Devtoberfest 2020 challenge brought them together. And they contributes this CDS-SCP-API Node Module to the community, and hope it will make SAP developers life better.
Jhodel Cailan initially started the CDS Extension concept. SAP Mentor Robert Eijpe created a similar concept integrating Microsoft Azure and Google Cloud APIs into a CDS external services concept. The SAP Devtoberfest 2020 challenge brought concepts together. And this results in a CDS-SCP-API Node Module for the community, making SAP developers' lives better.

## Installation

Using npm:

```swift
> npm install cds-scp-api
> npm install @sapmentors/cds-scp-api
```
## Supported Destination Types

- Internet Destinations with No Authentication
- Internet Destinations with Basic Authentication
- Internet Destinations with Client Credentials Authentication (including Microsoft Azure)
- Internet Destinations with JWT token Authentication (currently only Google Cloud Platform)
- OnPremise Destination and Connectivity via Cloud Connector with No Authentication
- OnPremise Destinations and Connectivity via Cloud Connector with Basic Authentication

## Javascript/Node.js Code
```javascript
Expand All @@ -41,6 +32,19 @@ let result = await service.run({
})

```
## Example Programs

Click [here](./examples/readme.md) for examples and environment setup

## Supported Destination Types

- Internet Destinations with No Authentication
- Internet Destinations with Basic Authentication
- Internet Destinations with Client Credentials Authentication (including Microsoft Azure)
- Internet Destinations with JWT token Authentication (currently only Google Cloud Platform)
- OnPremise Destination and Connectivity via Cloud Connector with No Authentication
- OnPremise Destinations and Connectivity via Cloud Connector with Basic Authentication

## SCP Destination Configuration Examples

- [SAP Cloud Platform Internet Destinations with No Authentication](./docs/InternetAPIwithNoAuthentication.md)
Expand Down Expand Up @@ -136,5 +140,3 @@ async function SimultaneousRequests() {
}
```
## Example Program for Node Module
Click [here](./examples/readme.md) for examples and environment setup
6 changes: 3 additions & 3 deletions docs/InternetAPIwithBasicAuthentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This example uses APIs of the SAP Gateway Demo System **ES5**.
If you don't have access to the SAP Gateway Demo System ES5, you can follow this [tutorial](https://developers.sap.com/tutorials/gateway-demo-signup.html) to get access.

## Basic Authentication Examples
- [Retrieve a product list from public available SAP OData service](./InternetProxy/ReadProductsOfErpWithBasicAuthentication.js) - Standalone Node.js/Javascript Example
- [Create a product with public available SAP OData service](./InternetProxy/CreateProductInErpWithBasicAuthentication.js) - Standalone Node.js/Javascript Example
- [Retrieve a product list from public available SAP OData service](../examples/InternetProxy/ReadProductsOfErpWithBasicAuthentication.js) - Standalone Node.js/Javascript Example
- [Create a product with public available SAP OData service](../examples/InternetProxy/CreateProductInErpWithBasicAuthentication.js) - Standalone Node.js/Javascript Example


## Destination Configuration in SAP Cloud Platform Destination Service
Expand All @@ -32,4 +32,4 @@ InternetAPIGetRequestwithBasicAuthentication()
## Output Javascript/Node.js Code
```javascript
'Notebook Basic 15'
```
```
4 changes: 2 additions & 2 deletions docs/InternetAPIwithNoAuthentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
These destinations are pointing to the demo OData service API https://services.odata.org/v4/Northwind/Northwind.svc/ of odata.org. This API endpoint doesn't need authentication.

## No Authentication Example
- [Retrieve a product list from public available OData Service called Northwind](./InternetProxy/ReadPublicApiNorthwindWithNoAuthentication.js) - Standalone Node.js/Javascript Example
- [Retrieve a product list from public available OData Service called Northwind](../examples/InternetProxy/ReadPublicApiNorthwindWithNoAuthentication.js) - Standalone Node.js/Javascript Example

## Destination Configuration in SAP Cloud Platform Destination Service

Expand Down Expand Up @@ -37,4 +37,4 @@ InternetAPIGetRequestwithNoAuthentication()
## Output Javascript/Node.js Code
```javascript
Chai
```
```

0 comments on commit 472a2ee

Please sign in to comment.