react-native-ot-shield
TypeScript icon, indicating that this package has built-in type declarations

2.0.7 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i react-native-ot-shield

Weekly Downloads

3

Version

2.0.7

License

ISC

Unpacked Size

5.8 kB

Total Files

7

Last publish

Collaborators

  • 3jedgcm