one_signal_api 1.0.1

SDKdartflutter
Platformandroidioswindowslinuxmacos

OpenAPI API client for the OneSignal API

OneSignal API

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

This Dart package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.1
  • Build package: org.openapitools.codegen.languages.DartClientCodegen For more information, please visit https://onesignal.com

Requirements

Dart 2.12 or later

Installation & Usage

dependencies:
  one_signal_api: ^1.0.0

Getting Started

Please follow the installation procedure and then run the following:

import 'package:one_signal_api/api.dart';

// TODO Configure HTTP Bearer authorization: app_key
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('app_key').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('app_key').setAccessToken(yourTokenGeneratorFunction);

final api_instance = DefaultApi();
final appId = appId_example; // String | 
final notificationId = notificationId_example; // String | 

try {
    final result = api_instance.cancelNotification(appId, notificationId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->cancelNotification: $e\n');
}

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
DefaultApicancelNotificationDELETE /notifications/{notification_id}Stop a scheduled or currently outgoing notification
DefaultApicreateAppPOST /appsCreate an app
DefaultApicreateNotificationPOST /notificationsCreate notification
DefaultApicreatePlayerPOST /playersAdd a device
DefaultApicreateSegmentsPOST /apps/{app_id}/segmentsCreate Segments
DefaultApideletePlayerDELETE /players/{player_id}Delete a user record
DefaultApideleteSegmentsDELETE /apps/{app_id}/segments/{segment_id}Delete Segments
DefaultApiexportPlayersPOST /players/csv_export?app_id={app_id}CSV export
DefaultApigetAppGET /apps/{app_id}View an app
DefaultApigetAppsGET /appsView apps
DefaultApigetNotificationGET /notifications/{notification_id}View notification
DefaultApigetNotificationHistoryPOST /notifications/{notification_id}/historyNotification History
DefaultApigetNotificationsGET /notificationsView notifications
DefaultApigetOutcomesGET /apps/{app_id}/outcomesView Outcomes
DefaultApigetPlayerGET /players/{player_id}View device
DefaultApigetPlayersGET /playersView devices
DefaultApiupdateAppPUT /apps/{app_id}Update an app
DefaultApiupdatePlayerPUT /players/{player_id}Edit device
DefaultApiupdatePlayerTagsPUT /apps/{app_id}/users/{external_user_id}Edit tags with external user id

Documentation For Models

Documentation For Authorization

app_key

  • Type: HTTP Bearer authentication

user_key

  • Type: HTTP Bearer authentication

Author

devrel@onesignal.com