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

huawei-push-kit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

huawei-push-kit

  • 1.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

📬 Huawei Push Kit Ruby Client

Welcome to the unofficial Ruby client for Huawei Push Kit, designed to seamlessly integrate Huawei Push Kit capabilities into your Ruby applications.

🌟 Features

  • Send notifications to devices using a simple Ruby interface.
  • Support for major features provided by the Huawei Push Kit API.

🛠 Installation

To start using this gem in your Ruby application, add this line to your Gemfile:

gem 'huawei_push_kit'

Then execute:

bundle install

Or install it yourself as:

gem install huawei_push_kit

⚙ Configuration

Before using the client, you need to configure your access keys obtained from the Huawei Developer Console and add it to the .env file.

HUAWEI_PUSH_KIT_CLIENT_ID=<HUAWEI_PUSH_KIT_CLIENT_ID>
HUAWEI_PUSH_KIT_CLIENT_SECRET=<HUAWEI_PUSH_KIT_CLIENT_SECRET>

🚀 Usage

require 'huawei_push_kit'

device_token = "<huawei_device_token>"
client = HuaweiPushKit::Client.new

# Send notification to a single Huawei device
client.send_push_notification(device_token, "Title", "Message")

# Subscribe to a topic
client.subscribe_to_topic("topic_name", device_token)

# Show all topics
client.topic_list(device_token)

# Send notification to a topic
client.send_push_notification_to_topic(topic_name, "Title", "Message", "topic_name")

# Unsubscribe from a topic
client.unsubscribe_from_topic("topic_name", device_token)

🔓 License

This gem is available as open source under the terms of the MIT License. See the LICENSE file for more details.

FAQs

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