1.0.1 • Published 5 years ago
anil-consumer-service v1.0.1
React Anil-Consumer-Service.
When you using this You have to Pass store(redux) Concept...
Available Consumer Service Functions are...
1. serviceConsumer
------------------------------
serviceConsumer(
store,
tranId,
ApiData,
body,
returnFilter,
Posttype
);
Note: It Accepts Six Arguments (store, tranId, ApiData, body, returnFilter, Posttype);
import { serviceConsumer } from "anil-consumer-service";
import { call } from "redux-saga/effects";
using Redux-saga
const response = yield call(serviceConsumer,store, tranId,
{type: '', url: ''},body, 'returnFilter', '0');
2. serviceConsumerWithMultiCalls
--------------------------------
serviceConsumerWithMultiCalls(
store, tranId, ApiData, body, Posttype
);
Note: It Accepts Five Arguments (store, tranId, ApiData, body, Posttype);
ApiData, body, both are should be Array type Only.
import { serviceConsumerWithMultiCalls } from "anil-consumer-service";
import { call } from "redux-saga/effects";
using Redux-saga
const response = yield call(serviceConsumerWithMultiCalls,store, tranId,
[{type: '', url: ''},{type: '', url: ''}],[body1,, body2],'0');
3. serviceConsumerWithHeaders
-------------------------------
serviceConsumerWithHeaders(
{type: '', url: ''}, body
);
Note: It Accepts Two Arguments ({type: '', url: ''}, body);
### Note:
1). store -> If your using redux, you have to pass store where loginUser details , authorization, tokenKey is Available.
2). tranId -> This is Date.now()+1234.
3). body -> POST/PUT you have to Pass Body as per Requriment.