-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6adfa4d
Showing
53 changed files
with
37,077 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Merge CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [12.x, 14.x, 15.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: npm install, npm test | ||
run: | | ||
npm install | ||
npm test | ||
env: | ||
API_KEY: ${{ secrets.API_KEY }} | ||
API_SECRET: ${{ secrets.API_SECRET }} | ||
APP_USERNAME: ${{ secrets.APP_USERNAME }} | ||
PASSWORD: ${{ secrets.PASSWORD }} | ||
|
||
- name: Coveralls (Uploading test report) | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Pull Request CI | ||
|
||
on: | ||
push: | ||
branches: [ fyndx0 ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [12.x, 14.x, 15.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: npm install, npm test | ||
run: | | ||
npm install | ||
npm test | ||
env: | ||
API_KEY: ${{ secrets.API_KEY }} | ||
API_SECRET: ${{ secrets.API_SECRET }} | ||
APP_USERNAME: ${{ secrets.APP_USERNAME }} | ||
PASSWORD: ${{ secrets.PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
.env.production | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Fynd | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# FDK Javascript | ||
|
||
![GitHub package.json version](https://img.shields.io/github/package-json/v/gofynd/fdk-client-javascript?style=plastic) | ||
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/gofynd/fdk-client-javascript/Node.js%20CI?style=plastic) | ||
![GitHub](https://img.shields.io/github/license/gofynd/fdk-client-javascript?style=plastic) | ||
[![Coverage Status](https://coveralls.io/repos/github/gofynd/fdk-client-javascript/badge.svg)](https://coveralls.io/github/gofynd/fdk-client-javascript) | ||
|
||
FDK client for Javascript | ||
|
||
## Getting Started | ||
|
||
Get started with the Javascript Development SDK for Potlee | ||
|
||
### Usage | ||
|
||
``` | ||
npm install fdk-client-javascript --save | ||
``` | ||
|
||
Using this method, you can `require` fdk-client-javascript like so: | ||
|
||
```js | ||
const { | ||
ApplicationConfig, | ||
ApplicationClient, | ||
} = require("fdk-client-javascript"); | ||
``` | ||
|
||
### Sample Usage - ApplicationClient | ||
|
||
```javascript | ||
const config = new ApplicationConfig({ | ||
applicationID: "YOUR_APPLICATION_ID", | ||
applicationToken: "YOUR_APPLICATION_TOKEN", | ||
locationDetails: "LOCATION_DETAILS_OBJECT" | ||
}); | ||
|
||
const applicationClient = new ApplicationClient(config); | ||
|
||
``` | ||
|
||
### Sample Usage - PlatformClient | ||
|
||
```javascript | ||
const { PlatformConfig, PlatformClient } = require("fdk-client-javascript"); | ||
|
||
let platformConfig = new PlatformConfig({ | ||
companyId: "COMPANY_ID", | ||
apiKey: "API_KEY", | ||
apiSecret: "API_SECRET", | ||
domain: "DOMAIN", | ||
useAutoRenewTimer: true | ||
}); | ||
|
||
async function getData() { | ||
try { | ||
// TODO: get token using OAuth | ||
platformConfig.oauthClient.setToken(token.access_token); | ||
const client = new PlatformClient(platformConfig); | ||
} catch (err) { | ||
console.log(err); | ||
} | ||
} | ||
|
||
getData(); | ||
``` | ||
|
||
### TypeScript | ||
|
||
fdk-client-javascript includes Typescript definitions. | ||
|
||
```typescript | ||
import { ApplicationConfig, ApplicationClient } from "fdk-client-javascript"; | ||
``` | ||
|
||
### Documentation | ||
|
||
- [Application Front](documentation/application/README.md) | ||
- [Platform Front](documentation/platform/README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { fdkAxios } from "./sdk/common/AxiosHelper"; | ||
import Utility = require("./sdk/common/Utility"); | ||
import Constant = require("./sdk/common/Constant"); | ||
export { fdkAxios as FdkAxios, Utility, Constant }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const {fdkAxios} = require('./sdk/common/AxiosHelper'); | ||
const Utility = require('./sdk/common/Utility'); | ||
const Constant = require('./sdk/common/Constant'); | ||
|
||
module.exports = { | ||
FdkAxios: fdkAxios, | ||
Utility, | ||
Constant, | ||
}; |
Oops, something went wrong.