Skip to content
Permalink
Browse files

Merge pull request #132 from urbanairship/docs-updates

Docs updates
  • Loading branch information...
aschuman0 committed Apr 25, 2019
2 parents cf4cc04 + 28a8225 commit 711dceeb7f0c6ac6d0369d13683d4f07b513f3da
Showing with 163 additions and 138 deletions.
  1. +15 −15 docs/automation.rst
  2. +0 −24 docs/channel_uninstall.rst
  3. +25 −2 docs/devices.rst
  4. +4 −1 docs/email.rst
  5. +2 −2 docs/examples.rst
  6. +8 −8 docs/index.rst
  7. +6 −6 docs/location.rst
  8. +19 −6 docs/named_user.rst
  9. +30 −20 docs/push.rst
  10. +17 −14 docs/reports.rst
  11. +11 −9 docs/segment.rst
  12. +14 −13 docs/sms.rst
  13. +5 −5 docs/static_lists.rst
  14. +7 −13 docs/tags.rst
@@ -2,14 +2,14 @@ Automation
==========

With the automation pipelines endpoint you can easily manage automations for
an app. Automations define the push behavior to be triggered on user-defined
events. For more information, see `the documentation on Automations
<https://docs.urbanairship.com/api/ua/#automation-api>`__
an Airship project. Pipelines define the behavior to be triggered on user-defined
events. For more information, see `the documentation on Automation
<https://docs.airship.com/api/ua/#tag/automation>`__

Creating an Automation
----------------------
Create an automation for this application. For more information, see:
https://docs.urbanairship.com/api/ua/#pipelines-api
Create an automation for a project. For more information, see:
https://docs.airship.com/api/ua/#operation/api/pipelines/post
Automations are defined by one or more Pipeline objects

.. code-block:: python
@@ -54,7 +54,7 @@ Validating an Automation
------------------------
Validate an automation payload prior to making requests to create update.
For more information, see:
https://docs.urbanairship.com/api/ua/#post-api-pipelines-validate
https://docs.airship.com/api/ua/#operation/api/pipelines/validate/post

.. code-block:: python
@@ -101,7 +101,7 @@ https://docs.urbanairship.com/api/ua/#post-api-pipelines-validate
Updating an Automation
----------------------
Update an automation with a full automation object. For more information, see:
https://docs.urbanairship.com/api/ua/#put-api-pipelines-id
https://docs.airship.com/api/ua/#operation/api/pipelines/pipeline_id/put

.. code-block:: python
@@ -143,8 +143,8 @@ https://docs.urbanairship.com/api/ua/#put-api-pipelines-id

Lookup an Automation
--------------------
Lookup an existing automation for this app. For more information, see:
https://docs.urbanairship.com/api/ua/#get-api-pipelines-id
Lookup an existing automation for a project. For more information, see:
https://docs.airship.com/api/ua/#operation/api/pipelines/pipeline_id/get

.. code-block:: python
@@ -159,8 +159,8 @@ https://docs.urbanairship.com/api/ua/#get-api-pipelines-id

Deleting an Automation
----------------------
Delete an existing automation for this app. For more information, see:
https://docs.urbanairship.com/api/ua/#delete-api-pipelines-id
Delete an existing automation for a project. For more information, see:
https://docs.airship.com/api/ua/#operation/api/pipelines/pipeline_id/delete

.. code-block:: python
@@ -175,8 +175,8 @@ https://docs.urbanairship.com/api/ua/#delete-api-pipelines-id

Automation Listing
------------------
List existing automations for this app. For more information, see:
https://docs.urbanairship.com/api/ua/#get-api-pipelines
List existing automations for a project. For more information, see:
https://docs.airship.com/api/ua/#operation/api/pipelines/get

.. code-block:: python
@@ -191,8 +191,8 @@ https://docs.urbanairship.com/api/ua/#get-api-pipelines

Deleted Automation Listing
--------------------------
List deleted automations for this app. For more information, see:
https://docs.urbanairship.com/api/ua/#get-api-pipelines
List deleted automations for a project. For more information, see:
https://docs.airship.com/api/ua/#operation/api/pipelines/deleted/get

.. code-block:: python

This file was deleted.

@@ -1,5 +1,7 @@
Retrieving Device Information
=============================
Device Registration and Uninstall
=================================
Lookup, register and uninstall channels. For information about Email and SMS channels,
see their documentation.

Channel Listing
---------------
@@ -43,6 +45,27 @@ Device metadata is fetched for a specific channel by using
:noindex:
:exclude-members: from_payload

Channel Uninstall
---------------------
Channels can be uninstalled using :py:class:`ChannelUninstall`.
There is a limit of 200 channels that can be uninstalled at one time.
For more information, see:
https://docs.airship.com/api/ua/#operation/api/channels/uninstall/post

.. code-block:: python
import urbanairship as ua
airship = ua.Airship("app_key", "master_secret")
cu = ua.ChannelUninstall(airship)
chans = [{"channel_id": "00000000-00000000-00000000-00000000",
"device_type": "ios"},
{"channel_id": "11111111-11111111-11111111-11111111",
"device_type": "android"}]
cu.uninstall(chans)
.. automodule:: urbanairship.devices.channel_uninstall

Device Listing
--------------
@@ -1,5 +1,8 @@
Email
=====
Register email channels, set opt-in status, and manipulate tags on email channels.
Email channels have unique properties for opt-in, tags and uninstall.
For more information, please see the API documentation: https://docs.airship.com/api/ua/#tag/email

Email Channel Registration
--------------------------
@@ -26,7 +29,7 @@ set email_opt_in_level to `none`.

Uninstall Email Channel
-----------------------
Removes an email address from Urban Airship. Use with caution.
Removes an email address from Airship. Use with caution.
If the uninstalled email address opts-in again, it will generate a new
channel_id. The new channel_id cannot be reassociated with any opt-in
information, tags, named users, insight reports, or other information
@@ -92,8 +92,8 @@ Single iOS Rich Push with notification
push.send()
Web Push to a device with full web payload
------------------------------------------
Web Notification to a device with full web payload
--------------------------------------------------
.. code-block:: python
@@ -1,9 +1,9 @@
Urban Airship Python Library
============================
Airship Python Library
======================

``urbanairship`` is a Python library for using the `Urban Airship
<http://urbanairship.com/>`_ web service API for push notifications and
rich app pages.
``urbanairship`` is a Python library for using the `Airship
<http://airship.com/>`_ web service in support of our messaging product
lines and related features.

Installation
------------
@@ -33,7 +33,7 @@ Note that channels are preferred over `device_token` and `apid`. See:
push.device_types = ua.device_types('ios')
push.send()
The library uses `requests`_ for communication with the UA API,
The library uses `requests`_ for communication with the Airship API,
providing connection pooling and strict SSL checking. The ``Airship``
object is threadsafe, and can be instantiated once and reused in
multiple threads.
@@ -50,7 +50,7 @@ configured otherwise, your application can set it up like so:
import logging
logging.basicConfig()
If you're having trouble with the UA API, you can turn on verbose debug
If you're having trouble with the Airship API, you can turn on verbose debug
logging.

.. code-block:: python
@@ -104,7 +104,7 @@ Indices and tables
* :ref:`search`


.. _channels: http://docs.urbanairship.com/topic-guides/channels.html
.. _channels: https://docs.airship.com/api/ua/#tag/channels
.. _requests: http://python-requests.org
.. _github: https://github.com/urbanairship/python-library
.. _nose: https://nose.readthedocs.org/en/latest/
@@ -11,7 +11,7 @@ Name Lookup
Search for a location boundary by name. The search primarily
uses the location names, but you can also filter the results
by boundary type. See `the documentation on name lookup
<http://docs.urbanairship.com/api/ua.html#name-lookup>`__
<https://docs.airship.com/api/ua/#operation/api/location/get>`__
for more information.

.. code-block:: python
@@ -31,7 +31,7 @@ Coordinates Lookup

Search for a location by latitude and longitude coordinates. Type is
an optional parameter. See `the documentation on coordinates lookup
<http://docs.urbanairship.com/api/ua.html#lat-long-lookup>`__
<https://docs.airship.com/api/ua/#operation/api/location/latitude_1longitude_1/get>`__
for more information.

.. code-block:: python
@@ -55,7 +55,7 @@ Bounding Box Lookup

Search for location using a bounding box. See the `documentation on
bounding box lookup
<http://docs.urbanairship.com/api/ua.html#bounding-box-lookup>`__
<https://docs.airship.com/api/ua/#operation/api/location/latitude_1longitude_1latitude_2longitude_2/get>`__
for more information.

.. code-block:: python
@@ -75,7 +75,7 @@ Alias Lookup
------------

Search for location by alias. See the `documentation on alias lookup
<http://docs.urbanairship.com/api/ua.html#alias-lookup>`__ for more
<https://docs.airship.com/api/ua/#operation/api/location/from-alias/get>`__ for more
information.

.. code-block:: python
@@ -94,7 +94,7 @@ Polygon Lookup
--------------

Search for location by polygon id. See the `documentation on polygon lookup
<http://docs.urbanairship.com/api/ua.html#polygon-lookup>`__ for more information.
<https://docs.airship.com/api/ua/#operation/api/location/polygon_id/get>`__ for more information.

.. code-block:: python
@@ -112,7 +112,7 @@ Location Date Ranges
--------------------

Get the possible date ranges that can be used with location endpoints. See `the documentation
on location date ranges <http://docs.urbanairship.com/api/ua.html#location-date-ranges>`__
on location date ranges <https://docs.airship.com/api/ua/#operation/api/segments/dates/get>`__
for more information.

.. code-block:: python
@@ -1,12 +1,17 @@
Named User
==========
A Named User is a proprietary identifier that maps customer-chosen IDs, e.g., CRM data, to Channels.
It is useful to think of a Named User as an individual consumer who might have more than one mobile device
registered with your Airship project.
Please see the documentation here:
https://docs.airship.com/api/ua/#tag/named-users

Named User Listing
------------------
Named User lists are fetched by instantiating an iterator object
using :py:class:`NamedUserList`.
For more information, see:
http://docs.urbanairship.com/api/ua.html#listing
https://docs.airship.com/api/ua/#operation/api/named_users/get

.. code-block:: python
@@ -24,7 +29,7 @@ http://docs.urbanairship.com/api/ua.html#listing
Association
-----------
Associate a channel with a named user ID. For more information, see:
http://docs.urbanairship.com/api/ua.html#association
https://docs.airship.com/api/ua/#operation/api/named_users/associate/post

.. code-block:: python
@@ -40,12 +45,19 @@ http://docs.urbanairship.com/api/ua.html#association

.. note::
You may only associate up to 20 channels to a Named User.
If a channel has an assigned named user and you make an additional call to
associate that same channel with a new named user, the original named user
association will be removed and the new named user and associated data will
take its place. Additionally, all tags associated to the original named user
cannot be used to address this channel unless they are also associated with
the new named user.


Disassociation
--------------
Remove a channel from the list of associated channels for a named user.
For more information, see:
http://docs.urbanairship.com/api/ua.html#disassociation
https://docs.airship.com/api/ua/#operation/api/named_users/disassociate/post

.. code-block:: python
@@ -62,7 +74,7 @@ http://docs.urbanairship.com/api/ua.html#disassociation
Lookup
------
Look up a single named user.
For more information, see: http://docs.urbanairship.com/api/ua.html#lookup
For more information, see: https://docs.airship.com/api/ua/#operation/api/named_users/get

.. code-block:: python
@@ -78,8 +90,9 @@ For more information, see: http://docs.urbanairship.com/api/ua.html#lookup

Tags
----
Add, remove, or set tags on a named user. For more information,
see: http://docs.urbanairship.com/api/ua.html#tags-named-users
Add, remove, or set tags on a named user. For more information and notes about
proper use of Named User Tags as well as some caveats see:
https://docs.airship.com/api/ua/#operation/api/named_users/tags/post

.. code-block:: python

0 comments on commit 711dcee

Please sign in to comment.
You can’t perform that action at this time.