README: Small improvements throughout.
This commit is contained in:
parent
efaeb53e91
commit
c625a57aad
1 changed files with 6 additions and 4 deletions
10
README.rst
10
README.rst
|
@ -9,7 +9,7 @@ Introduction
|
|||
paypal-query tool
|
||||
-----------------
|
||||
|
||||
This library includes a command line tool, ``paypal-query``, to quickly get information from the API; provide an illustration of using the library; and help with debugging. To use it, first write a configuration file ``~/.config/paypal_rest/config.ini`` with your client credentials from PayPal::
|
||||
This library includes a command line tool, ``paypal-query``, to quickly get information from the API; provide an illustration of using the library; and help with debugging. To use it, first write a configuration file ``~/.config/paypal_rest/config.ini`` with your REST API app credentials from PayPal::
|
||||
|
||||
[query]
|
||||
client_id = ...
|
||||
|
@ -21,7 +21,7 @@ To see an overview of transactions over a time period::
|
|||
|
||||
paypal-query [--begin DATETIME] [--end DATETIME]
|
||||
|
||||
Specify all datetimes in ISO8601 format: ``YYYY-MM-DDTHH:MM:SS``. You can omit any part of the time, or the whole thing. You can also add a timezone offset, like ``-04:00`` or ``+01:00``, or ``Z`` for UTC.
|
||||
Specify all datetimes in ISO8601 format: ``YYYY-MM-DDTHH:MM:SS``. You can stop at any divider and omit the rest. You can also add a timezone offset, like ``-04:00`` or ``+01:00``, or ``Z`` for UTC.
|
||||
|
||||
To see details of a specific transaction or subscription::
|
||||
|
||||
|
@ -32,10 +32,12 @@ The PayPal API does not let you look up an individual transaction by ID; you hav
|
|||
Library quickstart
|
||||
------------------
|
||||
|
||||
Create a ``paypal_rest.client.PayPalAPIClient`` using one of the classmethod constructors, then call its methods and handle the results::
|
||||
Create a ``paypal_rest.PayPalAPIClient`` using one of the classmethod constructors, then call its methods and handle the results::
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
config.read(os.path.expanduser('~/.config/paypal_rest/config.ini'))
|
||||
paypal = paypal_rest.client.PayPalAPIClient.from_config(config['query'])
|
||||
paypal = paypal_rest.PayPalAPIClient.from_config(config['query'])
|
||||
for txn in paypal.iter_transactions(start_date, end_date):
|
||||
... # txn is a paypal_rest.transaction.Transaction object you can query.
|
||||
|
||||
For more details, refer to the pydoc for ``paypal_rest.PayPalAPIClient`` and ``paypal_rest.transaction.Transaction``.
|
||||
|
|
Loading…
Reference in a new issue