Skip to content

Commit

Permalink
docs and version
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Jul 31, 2017
1 parent f2df831 commit 31855b4
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 10 deletions.
26 changes: 21 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
itunes-iap v2
~~~~~~~~~~~~~

Python 2 & 3 compatible! Even with :mod:`asyncio` support!

.. image:: https://travis-ci.org/youknowone/itunes-iap.svg?branch=master
:target: https://travis-ci.org/youknowone/itunes-iap
.. image:: https://coveralls.io/repos/github/youknowone/itunes-iap/badge.svg?branch=master
Expand All @@ -11,8 +13,8 @@ itunes-iap v2
- Distribution: `<https://pypi.python.org/pypi/itunes-iap/>`_


The quick example
-----------------
Quickstart
----------

Create request to create a request to itunes verifying api.

Expand All @@ -25,12 +27,26 @@ Create request to create a request to itunes verifying api.
>>> print('invalid receipt')
>>> print response.receipt.last_in_app.product_id # other values are also available as property!

Practically useful attributes are:
`product_id`, `original_transaction_id`, `quantity` and `unique_identifier`.
The common attributes are:
`product_id`, `original_transaction_id` and `quantity`.

See the full document in:
- :func:`itunesiap.verify`: The verifying function.
- :class:`itunesiap.receipt.InApp`: The receipt object.
- :class:`itunesiap.receipt.Receipt`: The receipt object.


asyncio
-------

.. sourcecode:: python

>>> import itunesiap
>>> response = await itunesiap.aioverify(raw_data) # verify -> aioverify

The other parts are the same.

See the full document in:
- :func:`itunesiap.aioverify`: The verifying function.


Installation
Expand Down
7 changes: 5 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
iTunes In-App purchase verification in Python
=============================================
iTunes In-App Purchase
======================

*itunes-iap* is an easy way to verify iTunes In-App Purchase receipts.
It also is a powerful and flexible interface for them too.

.. toctree::
:maxdepth: 2
Expand Down
15 changes: 13 additions & 2 deletions docs/quick.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The quick guide
===============
Quickstart
==========

Create request to create a request to itunes verify api.

Expand All @@ -16,13 +16,24 @@ Create request to create a request to itunes verify api.
Practically useful attributes are: `product_id`, `original_transaction_id`, `quantity` and `unique_identifier`.
See the full document in :class:`itunesiap.receipt.InApp`.

For :mod:`asyncio`, replace :func:`itunesiap.verify` funciton to
:func:`itunesiap.aioverify`. That's all.

.. sourcecode:: python

>>> response = itunesiap.aioverify(raw_data)


itunesiap.verify()
------------------
Note that most of the use cases are covered by the :func:`itunesiap.verify`
function.

.. autofunction:: itunesiap.verify

.. autofunction:: itunesiap.aioverify


Apple in-review mode
--------------------

Expand Down
4 changes: 4 additions & 0 deletions itunesiap/shortcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ def verify(

def aioverify(
receipt_data, password=None, exclude_old_transactions=False, **kwargs):
"""Shortcut API for :class:`itunesiap.request.Request`.
For params and returns, see :func:`itunesiap.verify`.
"""
proxy_url = kwargs.pop('proxy_url', None)
request = Request(
receipt_data, password, exclude_old_transactions, proxy_url=proxy_url)
Expand Down
2 changes: 1 addition & 1 deletion itunesiap/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.1
2.5.0

0 comments on commit 31855b4

Please sign in to comment.