New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rivium/api_services

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rivium/api_services

Library for connecting to api services.

  • 1.6.5
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Api Services

Library for connecting to api services.

Installation

npm install @rivium/api_services

Usage

// Import the library
import useApi from '@rivium/api_services'

// Create instance with env vars and import the methods
const { auth } = useApi(import.meta.env.VITE_API_URL)

// Use the methods
const example = async () => {
  const response = await auth.login()
  console.log(response)
}

List of Available Methods

Auth

Login

Attempt to login to the api. Saves the token on a cookie if successful.

Usage
auth.login({ params })
Params
NameTypeDescription
userstringUser email
passwordstringUser password

User

Get

Get user info by id.

Usage
user.get(params)
Params
NameTypeDescription
idstringUser id
Create

Create a new user.

Usage
user.create({ params })
Params
NameTypeDescription
nombrestringUser name
apellidoPaternostringUser last name
apellidoMaternostringUser second last name
sexostringgender
fechaNacimientostringbirth date
numeroCelularstringphone number
curpstringCURP
rfcstringRFC
homoclavestringRFC homoclave
cpstringpostal code
municipiostringmunicipality
coloniastringcolony
callestringstreet
numeroExteriorstringexterior number
numeroInteriorstringinterior number
origenesDinerostringmoney origins
tipoOperacionesstringoperation type
usoActivosVirtualesstringvirtual assets use

OTP

Send

Send OTP code to user phone.

Usage
otp.send(params)
Params
NameTypeDescription
cellphonestringUser phone number

FAQs

Package last updated on 17 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc