From d4f73606ea933f0a6178f570c2aba4c572d1e519 Mon Sep 17 00:00:00 2001 From: Samuel Sutch Date: Fri, 22 Jan 2010 20:04:01 -0800 Subject: [PATCH] prettier formatting for headers --- extra/index.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/extra/index.html b/extra/index.html index b3b2183..7d6b6d9 100644 --- a/extra/index.html +++ b/extra/index.html @@ -80,6 +80,7 @@

Recent Commits

  • Simplified feedback interface
  • +

    Usage

    pyapns is an APNS provider that you install on your server and access through XML-RPC. To install you will need Python, Twisted and pyOpenSSL. It's also recommended to install python-epoll for best performance (if epoll is not available, like on Mac OS X, you may want to use another library, like py-kqueue). If you like easy_install try (it should take care of the dependancies for you):

    $ sudo easy_install pyapns
    @@ -127,11 +128,11 @@ 

    Retrieving Inactive Tokens

    Call feedback with the app_id. A list of tuples will be retrieved from the APNS server that it deems inactive. These are returned as a list of 2-element lists with a Datetime object and the token string.

    -

    XML-RPC Methods

    +

    XML-RPC Methods

    These methods can be called on the server you started the server on. Be sure you are not including /RPC2 in the URL.

    -

    provision

    +

    provision

      Arguments
         app_id    String        the application id for the provided
    @@ -139,7 +140,9 @@ 

    provision

    cert String a path to a .pem file or the a string with the entie file environment String the APNS server to use - either - 'production' or 'sandbox' + 'production' or 'sandbox + timeout Integer timeout for connection attempts to + the APS servers' Returns None
    @@ -154,8 +157,6 @@

    notify

    notifications Str/Arr an Array of notification dictionaries or a single notification dictionary - timeout Integer timeout for connection attempts to - the APS servers Returns None @@ -171,7 +172,7 @@

    feedback

    Array(Array(Datetime(time_expired), String(token)), ...)
    -

    The Python API

    +

    The Python API

    pyapns also provides a Python API that makes the use of pyapns even simpler. The Python API must be configured before use but configuration files make it easier. The pyapns client module currently supports configuration from Django settings and Pylons config. To configure using Django, the following must be present in your settings file: