Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@natyapp/meta

Package Overview
Dependencies
Maintainers
0
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@natyapp/meta

<!-- `(Will not work until March, please wait the Release)` -->

  • 1.5.9
  • npm
  • Socket score

Version published
Weekly downloads
84
increased by68%
Maintainers
0
Weekly downloads
 
Created
Source

SDK MICROSSERVIÇO SECRETARIA NATY / META

_UNDER DEVELOPMENT_

First we will import and Initialize the sdk package
  1. importing the package
  import SDKMeta from "NatyMeta"
  1. initialize the class
  const SDK = new NatyMeta()
  // you can use new sdk(`YOUR-APP-TOKEN`) to connect right on the class creation
  1. connect your app token (if you dont use your token on class creation)
  const connectSDK = await SDK.connect( {apptoken: { `YOUR-APP-TOKEN` } } )

  if(connectSDK.isError) throw new Error(connectSDK.isError.message)

  console.log(connectSDK.isSuccess)
        // Do what you need with the data... (connectSDK.isSuccess)
  1. connect your app token (if you dont use your token on class creation)
 SDK.on('message', (res) => {
  res.sendTextMessage("teste");
});
  1. than set your application context to use all the individual classes
In this example:
- Retun of any Promise is {isSuccess:AuthReturnType, isError:ErrorHandlingType}
- If successed method (like the SDK.connect example too),
the sdk will abstract and will handle properly with the token for you,
the token will be automatic joined into axios instance header
- ErrorHandling type { code: number, message: string | Object }
- On the exemple, we are using "throw new Error" on every ErrorHandling to
stop and handle it on a simple way, but u can work at your way like
returning an alert using some alert lib like toastfy for the user.
All Rights Reserved for Ikiradev

Keywords

FAQs

Package last updated on 02 Oct 2024

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