Skip to content

Commit

Permalink
Minor README update
Browse files Browse the repository at this point in the history
  • Loading branch information
elliot-100 committed Dec 20, 2023
1 parent 330a1f7 commit 5e968d1
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ Install from PyPI, e.g:
`pip install britishcycling-clubs`

Some functions use [Playwright](https://playwright.dev/python/) to automate a headless Chromium browser. This needs
to be installed:
to be installed separately before first use, and after most Playwright updates, e.g.:

`playwright install chromium`

If you're installing in e.g. a bare-bones server/CI environment, you'll probably be
prompted to install system dependencies, which you can do with:
prompted to install system dependencies, which you can do with e.g.:

`playwright install-deps chromium`

Expand All @@ -40,10 +40,29 @@ See also https://playwright.dev/python/docs/browsers#install-system-dependencies
## Usage


### Get info from a club's profile page

```
britishcycling_clubs.get_profile_info(
club_id: str
) -> dict[str, int | str]
```
Return information from the club's public profile page; doesn't require login.

Specifically, returns these values:

- Club name
- Total club members

Example script `example_profile_info.py` loads club ID from `config.ini` (you'll
need to copy `config_dist.ini`, populate club ID only and rename). It
then retrieves and prints the club name and total member count.


### Get member counts from a club's Club Manager pages

```
def get_manager_member_counts(
britishcycling_clubs.get_manager_member_counts(
club_id: str,
username: str,
password: str,
Expand All @@ -66,18 +85,3 @@ Example script `example_manager_member_counts.py` loads club ID and credentials
club member counts from the club's Club Manager pages.


### Get info from a club's profile page

```
get_profile_info(club_id: str) -> dict[str, int | str]
```
Return information from the club's public profile page; doesn't require login.

Specifically, returns these values:

- Club name
- Total club members

Example script `example_profile_info.py` loads club ID from `config.ini` (you'll
need to copy `config_dist.ini`, populate club ID only and rename). It
then retrieves and prints the club name and total member count.

0 comments on commit 5e968d1

Please sign in to comment.