Skip to content

Commit

Permalink
move primary_keys from individual streams to ProductboardStream
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarbaugh committed Dec 15, 2024
1 parent 51f7b1e commit 79aecf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
5 changes: 4 additions & 1 deletion tap_productboard/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@

class ProductboardStream(RESTStream):

url_base = "https://api.productboard.com"

primary_keys = ["id"]

next_page_token_jsonpath = "$.links.next"
records_jsonpath = "$.data[*]"
url_base = "https://api.productboard.com"

@property
def authenticator(self) -> Auth:
Expand Down
11 changes: 0 additions & 11 deletions tap_productboard/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,33 @@
class CompaniesStream(ProductboardStream):
name = "companies"
path = "/companies"
primary_keys = ["id"]


class ComponentsStream(ProductboardStream):
name = "components"
path = "/components"
primary_keys = ["id"]


class FeaturesStream(ProductboardStream):
name = "features"
path = "/features"
primary_keys = ["id"]


# Initiatives are not enabled in all spaces
class InitiativesStream(ProductboardStream):
name = "initiatives"
path = "/initiatives"
primary_keys = ["id"]


# Key results are not enabled in all spaces
class KeyResultsStream(ProductboardStream):
name = "key_results"
path = "/key-results"
primary_keys = ["id"]


class NotesStream(ProductboardStream):
name = "notes"
path = "/notes"
primary_keys = ["id"]
replication_key = "updatedAt"
replication_param = "updatedFrom"
next_page_token_jsonpath = "$.pageCursor"
Expand All @@ -45,28 +39,23 @@ class NotesStream(ProductboardStream):
class ObjectivesStream(ProductboardStream):
name = "objectives"
path = "/objectives"
primary_keys = ["id"]


class ProductsStream(ProductboardStream):
name = "products"
path = "/products"
primary_keys = ["id"]


class ReleasesStream(ProductboardStream):
name = "releases"
path = "/releases"
primary_keys = ["id"]


class ReleaseGroupsStream(ProductboardStream):
name = "release_groups"
path = "/release-groups"
primary_keys = ["id"]


class UsersStream(ProductboardStream):
name = "users"
path = "/users"
primary_keys = ["id"]

0 comments on commit 79aecf5

Please sign in to comment.