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

olx-scraper

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

olx-scraper

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source


OLX Unofficial Client API

License: GPL-3.0 license npm versionOpen Source Love svg2

Unofficial Scraper API for OLX.CO.ID

Installation

You can install the package using npm or Yarn:

npm install wacloudapi

or

yarn add wacloudapi

Usage

First, import the required classes from the package:

const { Message, WAParser, WebhookServer } = require('wacloudapi);

Sending Messages

Create a new Message instance with your API credentials:

const message = new Message(apiVersion, phoneNumberId, accessToken);

You can now use the various methods provided by the Message class to send messages:

message.sendTextMessage(recipientPhoneNumber, messageContent);

Webhook Server

Create a new WebhookServer instance and specify the desired port and whether to use ngrok:

const webhookServer = new WebhookServer(port, useNgrok, ngrokAuthToken);

Add a listener for incoming messages:

webhookServer.on('message', (message) => {
  console.log('Received message:', message);
});

Add a route for webhook verification:

webhookServer.Verification(callbackUrl, verificationToken);

Start the webhook server:

webhookServer.start();

Webhook Parser

The WAParser class is used to parse incoming webhook data from the WhatsApp Business API.

parseMessage()

Returns the parsed message object depending on the type of message contained in the received webhook data.

const parse = new WAParser(WebhookData);
  // parse message
const parsedMessage = parse.parseMessage();

Notification Parser

The NotificationParser class is used to parse incoming webhook data from the WhatsApp Business API.

NotificationParser()

Returns the parsed message object depending on the type of message contained in the received webhook data.

const parse = new NotificationParser(WebhookData);
  // parse message
const parsedMessage = parse.parseNotification();

Documentation

For detailed information on available methods and how to use them, please refer to the documentation.

Contributing

Contributions are welcome! If you'd like to contribute, please follow these steps:

  1. Fork the repository
  2. Create a new branch with your changes
  3. Commit your changes and create a pull request

We appreciate any help and feedback!

License

Contact

Email : cp@imtaqin.id

This project is licensed under the MIT License. See the LICENSE file for more information.

Keywords

FAQs

Package last updated on 24 Nov 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