Martin Larsson
10/11/2021, 8:14 PMuser
10/11/2021, 8:41 PMuser
10/11/2021, 8:48 PMSourceName(AbstractSource)
function streams
where I did something like this:
def streams(self, config: Mapping[str, Any]) -> List[Stream]:
"""
:param config: A Mapping of the user input configuration as defined in the connector spec.
"""
access_token = self._convert_auth_to_token(
api_hostname=config["api_hostname"],
client_id=config["client_id"],
client_secret=config["client_secret"],
)
auth = TokenAuthenticator(
token=access_token
)
args = {
"base": config["api_hostname"],
}
return [
Scorecards(authenticator=auth, **args)
]
Followed by a string concatenation in the stream class that inherits from the parent/base stream with:
def path(self, **kwargs) -> str:
return self.base + "employees"
Which results in a full URL of:
url_base
+ self.base
+ endpoint
Does that make sense?