Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Yet another OneSignal API Client

Project description

I don’t like exisiting libraries.

This client is a mapping of the RESTful server API. There is a method for every API end-point with the corresponding arguments. Only two methods raise an exception create_notification and view_notification. In all the other cases you will get the errors from the API in the response.

Client’s methods names are the end-point name in lower case with spaces replaced by underscores. Depending on the method you call you will need an User Auth Key or an App Auth Key or an App Id. They can be set as environment variables ‘OS_USER_AUTH_KEY’, ‘OS_APP_AUTH_KEY’ and ‘OS_APP_ID’ or assigned to the client via app_auth_key, user_auth_key and app_id attributes.

Install

pip install yaosac

Usage

import yaosac

# Send a notification
yaosac.client.create_notification(player_ids)

# Get a notification
notification_id = 'a-notification-id-you-keep-somewhere'
notification = yaosac.client.view_notification(notification_id)

Contribution/Testing

python3 setup.py test

Project details


Release history Release notifications

This version
History Node

1.0.1

History Node

1.0

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
yaosac-1.0.1-py2-none-any.whl (5.1 kB) Copy SHA256 hash SHA256 Wheel py2 Sep 8, 2017
yaosac-1.0.1-py3-none-any.whl (5.1 kB) Copy SHA256 hash SHA256 Wheel py3 Feb 16, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page