Socket
Book a DemoInstallSign in
Socket

revenuecat

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

revenuecat

Revenuecat Rest API for Node.js and TypeScript (Unofficial)

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
126
-31.52%
Maintainers
1
Weekly downloads
 
Created
Source

RevenueCat REST API

RevenueCat

Version Downloads License

Installation

pnpm install revenuecat

Usage

import { Revenuecat } from 'revenuecat'
import * as dotenv from 'dotenv'

dotenv.config({
  path: '.env',
})

const revenuecat = new Revenuecat({
  secretKey: process.env.secretKey as string,
  iosKey: process.env.iosKey as string,
  androidKey: process.env.androidKey as string,
})

const userId = '$RCAnonymousID:17c0ff7b3c70462'

await revenuecat
  .getSubscriptions({ userId })
  .then(res => console.log(res.subscriber, 'getSubscriptions'))

await revenuecat
  .getOfferings({ userId, platform: 'ios' })
  .then(res => console.log(res.offerings, 'getOfferings'))

await revenuecat
  .postSubscriptionsAttributes({
    userId,
    data: {
      attributes: {
        $email: {
          value: 'asdasd',
        },
      },
    },
  }).then(res => console.log(res, 'postSubscriptionsAttributes'))

TODO

Add more methods

Sponsors

sponsors

License

MIT License © 2022-PRESENT productdevbook

Keywords

revenuecat

FAQs

Package last updated on 21 May 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