0.1.0 • Published 2 years ago
react-native-google-contacts v0.1.0
react-native-google-contacts
To fetch Google contacts and Google Othercontacts using people Api
Installation
npm install react-native-google-contacts
Project Setup
After Installation Follow the Guide for initial setup
Initial Setup(Authentication)
1.Android Client ID setup
import { SendAndroidClientToken } from "react-native-google-contacts";
// ...
SendAndroidClientToken(ClientId, appId, ClientSecret)
.then((response)=>{
//statement
})
.catch((error)=>{
//Error Response
})
2.IOS Client ID setup
import { SendIOSClientToken } from "react-native-google-contacts";
// ...
SendIOSClientToken(ClientId)
.then((response)=>{
//statement
})
.catch((error)=>{
//Error Response
})
Usage
This method is to be used to find out whether some user Contacts. It returns a promise which resolves Currently Signed in user Contacts and nextpageToken. If Client Authentication is Invalid it returns a promise which rejects Authentication Error.
import { getContacts } from "react-native-google-contacts";
// ...
getContacts(Tokenvalue) //In firstpage Tokenvalue must be null && In Secondpage Send nextpageToken as Tokenvalue
.then((response)=>{
//statement
})
.catch((error)=>{
//Error Response
})
This method is to be used to find out whether some user OtherContacts. It returns a promise which resolves Currently Signed in user OtherContacts and nextpageToken. If Client Authentication is Invalid it returns a promise which rejects Authentication Error.
import { getOtherContacts } from "react-native-google-contacts";
// ...
getOtherContacts(Tokenvalue) //In firstpage Tokenvalue must be null && In Secondpage Send nextpageToken as Tokenvalue
.then((response)=>{
//statement
})
.catch((error)=>{
//Error Response
})
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
0.1.0
2 years ago