Skip to content

otipass/otipass-shield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-ot-shield

Simple Request Crash / Method manager

Installation

Use the yarn manager yarn to install react-native-ot-shield.

yarn add react-native-ot-shield

Configuration

You must create one configuration file

{
    "remote":"https://myremote.dev",
    "actions": [
        "isExampleToSimpleAction"
        {
            "name":"isExampleToComplexeAction",
            "actions": [
                "subAction",
                "anotherSubAction"
            ]
        }
    ]
}

shield.setup.json

Import

import Shield from 'react-native-ot-shield'

Prepare

Shield.load(require('myconfig.json'))

Usage

Simple action :

let result = await Shield.isExampleToSimpleAction({nameP:dataP}) // Return JSON
// This action send object {nameP:dataP, action: isExampleToSimpleAction} in post to request https://myremote.dev/isExampleToSimpleAction

Complexe action :

let result = await Shield.isExampleToComplexeAction.subAction({nameP:dataP}) // Return JSON
// This action send object {nameP:dataP, action: subAction} in post to request https://myremote.dev/isExampleToComplexeAction

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published