Skip to content

Commit

Permalink
update source for 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
CLEMENTINATOR committed Feb 4, 2025
1 parent 67bbe24 commit e3b8365
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions dc_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ class DataCollection(exports.DataCollection):
'''
The page method should return an EdgeeRequest object that contains the
information needed to make an HTTP request to the provider's API to
send page data, passing the event information formatted for the provider's API as well as the credentials
send page data, passing the event information formatted for the provider's API as well as the settings
needed to authenticate with the provider's API.
'''
def page(self, e: data_collection.Event, cred: List[Tuple[str, str]]) -> data_collection.EdgeeRequest:
def page(self, e: data_collection.Event, settings: List[Tuple[str, str]]) -> data_collection.EdgeeRequest:
'''
cred is a list of tuple, which contains each key and secret for the provider
settings is a list of tuple, which contains each key and secret for the provider
for example, if your component is set to use
[[components.data_collection]]
name = "my_component"
component = "outpout.wasm"
credentials.test_project_id = "123456789"
credentials.test_write_key = "abcdefg"
settings.test_project_id = "123456789"
settings.test_write_key = "abcdefg"
cred will be [("test_project_id", "123456789"), ("test_write_key", "abcdefg")]
settings will be [("test_project_id", "123456789"), ("test_write_key", "abcdefg")]
'''
'''
the function should return the following:
Expand All @@ -40,17 +40,17 @@ def page(self, e: data_collection.Event, cred: List[Tuple[str, str]]) -> data_co
'''
The track method should return an EdgeeRequest object that contains the
information needed to make an HTTP request to the provider's API to
send track data, passing the event information formatted for the provider's API as well as the credentials
send track data, passing the event information formatted for the provider's API as well as the settings
needed to authenticate with the provider's API.
'''
def track(self, e: data_collection.Event, cred: List[Tuple[str, str]]) -> data_collection.EdgeeRequest:
def track(self, e: data_collection.Event, settings: List[Tuple[str, str]]) -> data_collection.EdgeeRequest:
raise NotImplementedError("track is not implemented")

'''
The user method should return an EdgeeRequest object that contains the
information needed to make an HTTP request to the provider's API to
send user data, passing the event information formatted for the provider's API as well as the credentials
send user data, passing the event information formatted for the provider's API as well as the settings
needed to authenticate with the provider's API.
'''
def user(self, e: data_collection.Event, cred: List[Tuple[str, str]]) -> data_collection.EdgeeRequest:
def user(self, e: data_collection.Event, settings: List[Tuple[str, str]]) -> data_collection.EdgeeRequest:
raise NotImplementedError("user is not implemented")

0 comments on commit e3b8365

Please sign in to comment.