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

onesignal_sdk

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onesignal_sdk

  • 2.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

onesignal

OneSignal - the Ruby gem for the OneSignal

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.2.2
  • Package version: 2.0.2
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://onesignal.com

Installation

Build a gem

To build the Ruby code into a gem:

gem build onesignal.gemspec

Then either install the gem locally:

gem install ./onesignal-2.0.2.gem

(for development, run gem install --dev ./onesignal-2.0.2.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'onesignal', '~> 2.0.2'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'onesignal', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'onesignal'

# Setup authorization
OneSignal.configure do |config|
  # Configure Bearer authorization: app_key
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = OneSignal::DefaultApi.new
app_id = 'app_id_example' # String | The OneSignal App ID for your app.  Available in Keys & IDs.
activity_id = 'activity_id_example' # String | Live Activity record ID
begin_live_activity_request = OneSignal::BeginLiveActivityRequest.new({push_token: 'push_token_example', subscription_id: 'subscription_id_example'}) # BeginLiveActivityRequest | 

begin
  #Start Live Activity
  api_instance.begin_live_activity(app_id, activity_id, begin_live_activity_request)
rescue OneSignal::ApiError => e
  puts "Exception when calling DefaultApi->begin_live_activity: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://onesignal.com/api/v1

ClassMethodHTTP requestDescription
OneSignal::DefaultApibegin_live_activityPOST /apps/{app_id}/live_activities/{activity_id}/tokenStart Live Activity
OneSignal::DefaultApicancel_notificationDELETE /notifications/{notification_id}Stop a scheduled or currently outgoing notification
OneSignal::DefaultApicreate_appPOST /appsCreate an app
OneSignal::DefaultApicreate_notificationPOST /notificationsCreate notification
OneSignal::DefaultApicreate_playerPOST /playersAdd a device
OneSignal::DefaultApicreate_segmentsPOST /apps/{app_id}/segmentsCreate Segments
OneSignal::DefaultApicreate_subscriptionPOST /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions
OneSignal::DefaultApicreate_userPOST /apps/{app_id}/users
OneSignal::DefaultApidelete_aliasDELETE /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}
OneSignal::DefaultApidelete_playerDELETE /players/{player_id}Delete a user record
OneSignal::DefaultApidelete_segmentsDELETE /apps/{app_id}/segments/{segment_id}Delete Segments
OneSignal::DefaultApidelete_subscriptionDELETE /apps/{app_id}/subscriptions/{subscription_id}
OneSignal::DefaultApidelete_userDELETE /apps/{app_id}/users/by/{alias_label}/{alias_id}
OneSignal::DefaultApiend_live_activityDELETE /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}Stop Live Activity
OneSignal::DefaultApiexport_eventsPOST /notifications/{notification_id}/export_events?app_id={app_id}Export CSV of Events
OneSignal::DefaultApiexport_playersPOST /players/csv_export?app_id={app_id}Export CSV of Players
OneSignal::DefaultApifetch_aliasesGET /apps/{app_id}/subscriptions/{subscription_id}/user/identity
OneSignal::DefaultApifetch_userGET /apps/{app_id}/users/by/{alias_label}/{alias_id}
OneSignal::DefaultApifetch_user_identityGET /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity
OneSignal::DefaultApiget_appGET /apps/{app_id}View an app
OneSignal::DefaultApiget_appsGET /appsView apps
OneSignal::DefaultApiget_eligible_iamsGET /apps/{app_id}/subscriptions/{subscription_id}/iams
OneSignal::DefaultApiget_notificationGET /notifications/{notification_id}View notification
OneSignal::DefaultApiget_notification_historyPOST /notifications/{notification_id}/historyNotification History
OneSignal::DefaultApiget_notificationsGET /notificationsView notifications
OneSignal::DefaultApiget_outcomesGET /apps/{app_id}/outcomesView Outcomes
OneSignal::DefaultApiget_playerGET /players/{player_id}View device
OneSignal::DefaultApiget_playersGET /playersView devices
OneSignal::DefaultApiidentify_user_by_aliasPATCH /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity
OneSignal::DefaultApiidentify_user_by_subscription_idPATCH /apps/{app_id}/subscriptions/{subscription_id}/user/identity
OneSignal::DefaultApitransfer_subscriptionPATCH /apps/{app_id}/subscriptions/{subscription_id}/owner
OneSignal::DefaultApiupdate_appPUT /apps/{app_id}Update an app
OneSignal::DefaultApiupdate_live_activityPOST /apps/{app_id}/live_activities/{activity_id}/notificationsUpdate a Live Activity via Push
OneSignal::DefaultApiupdate_playerPUT /players/{player_id}Edit device
OneSignal::DefaultApiupdate_player_tagsPUT /apps/{app_id}/users/{external_user_id}Edit tags with external user id
OneSignal::DefaultApiupdate_subscriptionPATCH /apps/{app_id}/subscriptions/{subscription_id}
OneSignal::DefaultApiupdate_userPATCH /apps/{app_id}/users/by/{alias_label}/{alias_id}

Documentation for Models

Documentation for Authorization

app_key

  • Type: Bearer authentication

user_key

  • Type: Bearer authentication

FAQs

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