Skip to content

Commit

Permalink
style: add line breaks to long lines
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhui committed Jan 27, 2020
1 parent 6b56b5d commit 098f864
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 11 deletions.
21 changes: 16 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ datagovsg
:alt: Documentation Status
:target: https://datagovsg.readthedocs.io/en/latest/?badge=latest

This is an unofficial Python package for interacting with APIs available at `Data.gov.sg`_.
This is an unofficial Python package for interacting with APIs available at
`Data.gov.sg`_.

.. _Data.gov.sg: https://data.gov.sg

Expand All @@ -44,17 +45,27 @@ For more information, `refer to the documentation`_.
Usage overview
^^^^^^^^^^^^^^

Interacting with `Data.gov.sg`_'s API is done through one of four clients, where each client corresponds with a "set" of endpoints. (`Data.gov.sg`_ doesn't categorise its endpoints by set, but it can be assumed from the endpoints' path directories.)
Interacting with `Data.gov.sg`_'s API is done through one of four clients, where
each client corresponds with a "set" of endpoints. (`Data.gov.sg`_ doesn't
categorise its endpoints by set, but it can be assumed from the endpoints' path
directories.)

The four clients are: ``Ckan``, ``Environment``, ``Technology`` and ``Transport``.

Each client contains several public functions, one function per endpoint. A function's name is the same as its corresponding endpoint's ending path.
Each client contains several public functions, one function per endpoint. A
function's name is the same as its corresponding endpoint's ending path.

Most functions accept named arguments, where an argument corresponds with a parameter that the endpoint accepts.
Most functions accept named arguments, where an argument corresponds with a
parameter that the endpoint accepts.

*Why have separate clients instead of one single client?*

Without knowing how `Data.gov.sg`_'s API will evolve, and noticing that the endpoints were themselves already partitioned into "sets", it seemed like a good idea to keep each set of endpoints in its own contextual client. This allows for each "set" of endpoints to be customised on their own, e.g. the ``Environment`` endpoints allow for either a date or date-time to be specified, whereas the ``Transport`` endpoints don't.
Without knowing how `Data.gov.sg`_'s API will evolve, and noticing that the
endpoints were themselves already partitioned into "sets", it seemed like a
good idea to keep each set of endpoints in its own contextual client. This
allows for each "set" of endpoints to be customised on their own, e.g. the
``Environment`` endpoints allow for either a date or date-time to be
specified, whereas the ``Transport`` endpoints don't.

Reference
---------
Expand Down
6 changes: 4 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Release v\ |version|.
:alt: Documentation Status
:target: https://datagovsg.readthedocs.io/en/latest/?badge=latest

This is an unofficial Python package for interacting with APIs available at `Data.gov.sg`_.
This is an unofficial Python package for interacting with APIs available at
`Data.gov.sg`_.

.. _Data.gov.sg: https://data.gov.sg

Expand Down Expand Up @@ -69,4 +70,5 @@ This project is licensed under the GNU General Public License v3.0.
Logo
----

The logo is copyright by the Government of Singapore. It is used for reference only. This project's owner does not have any copyright claim over it.
The logo is copyright by the Government of Singapore. It is used for reference
only. This project's owner does not have any copyright claim over it.
18 changes: 14 additions & 4 deletions docs/source/package_overview.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
Package Overview
================

Interacting with `Data.gov.sg`_'s API is done through one of four clients, where each client corresponds with a "set" of endpoints. (`Data.gov.sg`_ doesn't categorise its endpoints by set, but it can be assumed from the endpoints' path directories.)
Interacting with `Data.gov.sg`_'s API is done through one of four clients,
where each client corresponds with a "set" of endpoints. (`Data.gov.sg`_ doesn't
categorise its endpoints by set, but it can be assumed from the endpoints' path
directories.)

.. _Data.gov.sg: https://data.gov.sg

The four clients are: ``Ckan``, ``Environment``, ``Technology`` and ``Transport``.

Each client contains several public functions, one function per endpoint. A function's name is the same as its corresponding endpoint's ending path.
Each client contains several public functions, one function per endpoint. A
function's name is the same as its corresponding endpoint's ending path.

Most functions accept named arguments, where an argument corresponds with a parameter that the endpoint accepts.
Most functions accept named arguments, where an argument corresponds with a
parameter that the endpoint accepts.

*Why have separate clients instead of one single client?*

Without knowing how `Data.gov.sg`_'s API will evolve, and noticing that the endpoints were themselves already partitioned into "sets", it seemed like a good idea to keep each set of endpoints in its own contextual client. This allows for each "set" of endpoints to be customised on their own, e.g. the ``Environment`` endpoints allow for either a date or date-time to be specified, whereas the ``Transport`` endpoints don't.
Without knowing how `Data.gov.sg`_'s API will evolve, and noticing that the
endpoints were themselves already partitioned into "sets", it seemed like a
good idea to keep each set of endpoints in its own contextual client. This
allows for each "set" of endpoints to be customised on their own, e.g. the
``Environment`` endpoints allow for either a date or date-time to be
specified, whereas the ``Transport`` endpoints don't.

0 comments on commit 098f864

Please sign in to comment.