Skip to content

Commit

Permalink
release: 2.2.0
Browse files Browse the repository at this point in the history
Horizon v1.0.0 Compatibility.

#### Added

- Add support for top-level offers endpoint with `seller`, `selling`, and `buying` filter.
  Horizon 1.0 includes a new `/offers` end-point, which allows you to list all offers, supporting filtering by `seller`, `selling`, or `buying` asset.

  You can fetch data from this endpoint by doing `server.offers()` and use any of the following filters:

  - `seller`: `server.offers().for_seller(account_id)`
  - `buying`: `server.offers().for_buying(asset)`
  - `selling`: `server.offers().for_selling(asset)`
  - `offer detail` : `server.offers().offer(offer_id)`

  This introduced a breaking change since it modified the signature for the function `server.offers()`.

  Before, if you wanted to list all the offers for a given account, you'd do:

  ```
  server.offers(account_id)
  ```

  Starting on this version you'll need to do:

  ```
  server.offers().for_seller(account_id)
  ```

  You can do now things that were not possible before, like finding
  all offers for an account filtering by the selling or buying asset

  ```
  server.offers().for_seller(account_id).for_buying(buying_asset).for_selling(selling_asset)
  ```

- Add support for filtering accounts by `signer` or `asset`, this has been released in a previous patch version.
  Horizon 1.0 includes a new `/accounts` end-point, which allows you to list all accounts who have another account as a signer or hold a given asset.

  You can fetch data from this endpoint by doing `server.accounts()` and use any of the following filters:

  - `acount detail`: `server.accounts().account_id(account_id)`, returns a single account.
  - `for signer`: `server.accounts().for_signer(account_id)`, returns accounts where `account_id` is a signer.
  - `for asset`: `server.accounts().for_asset(asset)`, returns accounts which hold the `asset`.

#### Changed

- Regenerate the XDR definitions to include [MetaV2](https://github.com/jonjove/stellar-core/blob/b299b3a458a15f592352c67d4da69baa6e8fbb6a/src/xdr/Stellar-ledger.x#L309) support (also see [#1902](stellar/go#1902)).

#### Fixed

- Fixed some documentation errors.

#### Breaking

- Change function signature for `server.offers`.
  The signature for the function `server.offers()` was changed to bring support for other filters.

  Before, if you wanted to list all the offers for a given account, you'd do:

  ```
  server.offers(account_id)
  ```

  Starting on this version you'll need to do:

  ```
  server.offers().for_seller(account_id)
  ```

* `server.accounts().signer` and `server.accounts().asset` are marked as deprecated, use `server.accounts().for_signer` and `server.accounts().for_asset` instead.

There are also some changes related to the horizon's response, currently, SDK has not added parse support to it,
so please refer to this [issue](#257) or release notes of Stellar horizon 1.0.0. In addition, support for parsing the horizon's responses will be added in the next major update.
  • Loading branch information
overcat committed Feb 7, 2020
1 parent df27ec2 commit bd36a5b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
14 changes: 6 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Release History
===============
### Version 2.2.0

Unreleased
### Version 2.2.0
Released on February 07, 2020

Horizon v1.0.0 Compatibility.

Expand Down Expand Up @@ -52,14 +52,14 @@ Horizon v1.0.0 Compatibility.

- Regenerate the XDR definitions to include [MetaV2](https://github.com/jonjove/stellar-core/blob/b299b3a458a15f592352c67d4da69baa6e8fbb6a/src/xdr/Stellar-ledger.x#L309) support (also see [#1902](https://github.com/stellar/go/issues/1902)).

### Fixed
#### Fixed

- Fixed some documentation errors.

#### Breaking

- Change function signature for `server.offers`.
The signature for the function `server.offers()` was changed to bring suppport for other filters.
The signature for the function `server.offers()` was changed to bring support for other filters.

Before, if you wanted to list all the offers for a given account, you'd do:

Expand All @@ -75,10 +75,8 @@ Horizon v1.0.0 Compatibility.

* `server.accounts().signer` and `server.accounts().asset` are marked as deprecated, use `server.accounts().for_signer` and `server.accounts().for_asset` instead.

There are also some changes related to the horizon's response, currently SDK has not added parse support to it,
so please refer to this [issue](https://github.com/StellarCN/py-stellar-base/issues/257) or
release notes of Stellar horizon 1.0.0. In addition, support for parsing the
horizon's responses will be added in the next major update.
There are also some changes related to the horizon's response, currently, SDK has not added parse support to it,
so please refer to this [issue](https://github.com/StellarCN/py-stellar-base/issues/257) or release notes of Stellar horizon 1.0.0. In addition, support for parsing the horizon's responses will be added in the next major update.

### Version 2.1.3
Released on February 03, 2020
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ Stellar Python SDK
:alt: PyPI - Implementation
:target: https://pypi.python.org/pypi/stellar-sdk

**This branch is about v2, click** `here <https://github.com/StellarCN/py-stellar-base/tree/v1>`_ **for the v1 branch. Thank you for your patience as we transition!**

py-stellar-sdk is a Python library for communicating with
a `Stellar Horizon server`_. It is used for building Stellar apps on Python. It supports **Python 3.6+** as
well as PyPy 3.6+.
Expand All @@ -47,11 +45,13 @@ py-stellar-sdk's documentation can be found at https://stellar-sdk.readthedocs.i
Installing
----------

This branch is about v2, click `here <https://github.com/StellarCN/py-stellar-base/tree/v1>`_ for the v1 branch. Thank you for your patience as we transition!

Install and update using `pipenv`_ or `pip`_:

.. code-block:: text
pip install stellar-sdk==2.1.3
pip install stellar-sdk==2.2.0
A Simple Example
Expand Down
4 changes: 2 additions & 2 deletions docs/en/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To install py-stellar-sdk, use pipenv to install the module:

.. code-block:: text
pipenv install stellar-sdk==2.1.3
pipenv install stellar-sdk==2.2.0
If you're not using `pipenv <https://docs.pipenv.org/>`_, you should.
Otherwise, you can install it via plain old `pip <https://pip.pypa.io/en/stable/quickstart/>`_. More on installing Python
Expand All @@ -29,5 +29,5 @@ You can clone `the repository <https://github.com/StellarCN/py-stellar-base>`_ d
git clone https://github.com/StellarCN/py-stellar-base.git
cd py-stellar-base
git checkout 2.1.3
git checkout 2.2.0
pip install .
4 changes: 2 additions & 2 deletions docs/zh_CN/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

.. code-block:: text
pipenv install stellar-sdk==2.1.3
pipenv install stellar-sdk==2.2.0
我们推荐你使用 `pipenv <https://docs.pipenv.org/>`_ 来安装这个模块。当然你也可以使用 `pip <https://pip.pypa.io/en/stable/quickstart/>`_。
想要更多的了解如何安装依赖,请参阅 `Hitchhiker's Guide to Python
Expand All @@ -28,5 +28,5 @@
git clone https://github.com/StellarCN/py-stellar-base.git
cd py-stellar-base
git checkout 2.1.3
git checkout 2.2.0
pip install .
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
packages=find_packages(exclude=["tests", "tests.*"]),
python_requires=">=3.6.0",
classifiers=[
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
Expand Down
2 changes: 1 addition & 1 deletion stellar_sdk/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
__description__ = "The Python Stellar SDK library provides APIs to build transactions and connect to Horizon."
__url__ = "https://github.com/StellarCN/py-stellar-base"
__issues__ = "{}/issues".format(__url__)
__version__ = "2.2.0-beta2"
__version__ = "2.2.0"
__author__ = "Eno, overcat"
__author_email__ = "appweb.cn@gmail.com, 4catcode@gmail.com"
__license__ = "Apache License 2.0"

0 comments on commit bd36a5b

Please sign in to comment.