npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-periculum

v2.1.1

Published

Significant bug fixing for V2 endpoints

Downloads

11

Readme

react-native-periculum

Periculum library is a powerful & easy to use credit score library for Android. The library gives you credit score information for your customer. No stress :)

Badges

MIT License

Installation

Add react-native-periculum to your project by running;

Yarn

yarn add react-native-periculum

NPM

npm install react-native-periculum

 

Info

You need to have a periculum account for this plugin to work. And also install the following packages for the plugin to work perfectly.

  • react-native-device-info
  • react-native-get-location
  • react-native-get-sms-android
  • react-native-permissions

 

Android Permissions

Please make sure you add the following android permissions in your AndroidManifest.xml file

<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

 

Periculum Analytics V1

How to use the Periculum analytics method. If you are using the V1 SDK methods then do the following:

Example:

import React from 'react';
import {analyticsRequestV1} from 'react-native-periculum';

await analyticsRequestV1(publicKey, statementName, customerMobile, customerBvn)
  .then(result => {
    console.log({result});
  })
  .catch(error => {
    console.log({error});
  });

Periculum Analytics V1 Parameters

| Name | Description | Type | Required| | -------------- | ------------------------------------------------------- | ------ | --------| | publickey | Required. Public Key attached to account | String | Yes | | statementName | unique statement reference | String | No | | customerMobile | Required. customer phone number | String | Yes | | customerBvn | customer bvn | String | No |

Response

The response will contain a set of insight keys. You can send these to your backend server. The backend server can use it's client credentials to obtain all the insight details for each key from the Insight API.    

Periculum Analytics V2

How to use the Periculum Analytics V2 method. If you are using the V2 SDK methods then do the following:

Example:

import React from 'react';
import {analyticsRequestV2} from 'react-native-periculum';

await analyticsRequestV2(publicKey, statementName, customerMobile, customerBvn)
  .then(result => {
    console.log({result});
  })
  .catch(error => {
    console.log({error});
  });

Periculum Analytics V2 Parameters

| Name | Description | Type | Required | | -------------- | ------------------------------------------------------- | ------ | --------| | publickey | Required. Public Key attached to account | String | Yes | | statementName | unique statement reference | String | No | | customerMobile | Required. customer phone number | String | Yes | | customerBvn | customer bvn | String | No |

Response

Insights will return an overview key. You can send this overview key back to your backend server. Your backend server will use it's client credentials to make a to the insights mobile v2 endpoints for details related to the overview key.

   

Updating an existing mobile V2 Analytics

If you have a previously generated mobile v2 overview key, you can update it with a new SDK data. to do this make the following call:

Example:

import React from 'react';
import {patchV2} from 'react-native-periculum';

patchV2(
  publicKey,
  statementKey,
  identificationData,
)
  .then(result => {
    console.log(result);
  })
  .catch(error => {
    console.log(error);
  });

Updating an existing mobile V2 Analytics parameters

| Name | Description | Type | Required | | ------------------ | ----------------------------------------------------- | ------ | -------- | | publicKey | Public Key attached to the client account | String | Yes | | statementKey | Unique statement reference | int | Yes | | identificationData | Array of object with keys of IdentifierName and Value | array | Yes |

Response

Insights will update the previous overview key data with the latest data. You can use the overview key in your backend server with it's client credentials to make a call to the insights mobile v2 endpoints for details related to the overview key.

   

Setup

In order to utilize any of the SDK methods, you must have a public key. If you have not obtained your client public key, then you should contact Periculum standard support channel (email [email protected]).

 

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT