diff --git a/README.md b/README.md index ec7d337..307f107 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![test](https://github.com/DanielPDWalker/tap-theme-parks/actions/workflows/test.yml/badge.svg)](https://github.com/DanielPDWalker/tap-theme-parks/actions/workflows/test.yml) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) GitHub license -[![Python](https://img.shields.io/static/v1?logo=python&label=python&message=3.7%20|%203.8%20|%203.9%20|%203.10%20|%203.11&color=blue)]() +[![Python](https://img.shields.io/static/v1?logo=python&label=python&message=3.7%20|%203.8%20|%203.9&color=blue)]() `tap-theme-parks` is a Singer tap for theme park data from [themeparks.wiki](https://themeparks.wiki/) API, built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps. diff --git a/tap_theme_parks/streams.py b/tap_theme_parks/streams.py index 4eeb39c..66ad0cd 100644 --- a/tap_theme_parks/streams.py +++ b/tap_theme_parks/streams.py @@ -7,10 +7,10 @@ from tap_theme_parks.client import ThemeParksStream -class DestinationStream(ThemeParksStream): - """Define destination stream""" +class DestinationsStream(ThemeParksStream): + """Define destinations stream""" - name = "destination" + name = "destinations" path = "/destinations" primary_keys = ["id"] replication_key = None @@ -38,10 +38,10 @@ def get_child_context(self, record: dict, context: Optional[dict]) -> dict: } -class ParkDetailStream(ThemeParksStream): - """Define park detail stream""" +class ParkDetailsStream(ThemeParksStream): + """Define park details stream""" - parent_stream_type = DestinationStream + parent_stream_type = DestinationsStream name = "park_detail" path_template = "/entity/{park_id}" primary_keys = ["id"] @@ -79,7 +79,7 @@ def get_child_context(self, record: dict, context: Optional[dict]) -> dict: class ParkChildrenStream(ThemeParksStream): """Define park children stream""" - parent_stream_type = ParkDetailStream + parent_stream_type = ParkDetailsStream name = "park_children" path = "/entity/{park_id}/children" primary_keys = ["id"] @@ -105,10 +105,10 @@ class ParkChildrenStream(ThemeParksStream): ).to_dict() -class DestinationDetailStream(ThemeParksStream): - """Define destination detail stream""" +class DestinationDetailsStream(ThemeParksStream): + """Define destination details stream""" - parent_stream_type = DestinationStream + parent_stream_type = DestinationsStream name = "destination_detail" path = "/entity/{destination_id}" primary_keys = ["id"] @@ -137,7 +137,7 @@ class DestinationDetailStream(ThemeParksStream): class DestinationChildrenStream(ThemeParksStream): """Define destination children stream""" - parent_stream_type = DestinationStream + parent_stream_type = DestinationsStream name = "destination_children" path = "/entity/{destination_id}/children" primary_keys = ["id"] diff --git a/tap_theme_parks/tap.py b/tap_theme_parks/tap.py index ffa793a..e040081 100644 --- a/tap_theme_parks/tap.py +++ b/tap_theme_parks/tap.py @@ -24,10 +24,10 @@ def discover_streams(self) -> list[streams.ThemeParksStream]: A list of discovered streams. """ selected_streams = [ - streams.DestinationStream(self), - streams.DestinationDetailStream(self), + streams.DestinationsStream(self), + streams.DestinationDetailsStream(self), streams.DestinationChildrenStream(self), - streams.ParkDetailStream(self), + streams.ParkDetailsStream(self), streams.ParkChildrenStream(self), ]