one_signal_api 1.0.1 copy "one_signal_api: ^1.0.1" to clipboard
one_signal_api: ^1.0.1 copied to clipboard

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

Class Method HTTP request Description
DefaultApi cancelNotification DELETE /notifications/{notification_id} Stop a scheduled or currently outgoing notification
DefaultApi createApp POST /apps Create an app
DefaultApi createNotification POST /notifications Create notification
DefaultApi createPlayer POST /players Add a device
DefaultApi createSegments POST /apps/{app_id}/segments Create Segments
DefaultApi deletePlayer DELETE /players/{player_id} Delete a user record
DefaultApi deleteSegments DELETE /apps/{app_id}/segments/{segment_id} Delete Segments
DefaultApi exportPlayers POST /players/csv_export?app_id={app_id} CSV export
DefaultApi getApp GET /apps/{app_id} View an app
DefaultApi getApps GET /apps View apps
DefaultApi getNotification GET /notifications/{notification_id} View notification
DefaultApi getNotificationHistory POST /notifications/{notification_id}/history Notification History
DefaultApi getNotifications GET /notifications View notifications
DefaultApi getOutcomes GET /apps/{app_id}/outcomes View Outcomes
DefaultApi getPlayer GET /players/{player_id} View device
DefaultApi getPlayers GET /players View devices
DefaultApi updateApp PUT /apps/{app_id} Update an app
DefaultApi updatePlayer PUT /players/{player_id} Edit device
DefaultApi updatePlayerTags PUT /apps/{app_id}/users/{external_user_id} Edit tags with external user id

Documentation For Models #

  • App
  • Button
  • CancelNotificationSuccessResponse
  • CreateNotificationBadRequestResponse
  • CreateNotificationSuccessResponse
  • CreatePlayerSuccessResponse
  • CreateSegmentBadRequestResponse
  • CreateSegmentConflictResponse
  • CreateSegmentSuccessResponse
  • DeletePlayerBadRequestResponse
  • DeletePlayerNotFoundResponse
  • DeletePlayerSuccessResponse
  • DeleteSegmentBadRequestResponse
  • DeleteSegmentNotFoundResponse
  • DeleteSegmentSuccessResponse
  • DeliveryData
  • ExportPlayersRequestBody
  • ExportPlayersSuccessResponse
  • Filter
  • FilterExpressions
  • FilterNotificationTarget
  • GetNotificationRequestBody
  • InvalidIdentifierError
  • ModelOperator
  • Notification
  • Notification200Errors
  • NotificationAllOf
  • NotificationAllOfAndroidBackgroundLayout
  • NotificationHistoryBadRequestResponse
  • NotificationHistorySuccessResponse
  • NotificationSlice
  • NotificationTarget
  • NotificationWithMeta
  • NotificationWithMetaAllOf
  • OutcomeData
  • OutcomesData
  • PlatformDeliveryData
  • Player
  • PlayerNotificationTarget
  • PlayerSlice
  • Purchase
  • Segment
  • SegmentNotificationTarget
  • StringMap
  • UpdatePlayerSuccessResponse
  • UpdatePlayerTagsRequestBody
  • UpdatePlayerTagsSuccessResponse

Documentation For Authorization #

app_key #

  • Type: HTTP Bearer authentication

user_key #

  • Type: HTTP Bearer authentication

Author #

devrel@onesignal.com

2
likes
120
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

OpenAPI API client for the OneSignal API

Documentation

API reference

License

MIT (license)

Dependencies

http, intl, meta

More

Packages that depend on one_signal_api