Hey folks having a bit of a problem understanding ...
# singer-tap-development
d
Hey folks having a bit of a problem understanding class inheritance with
OAuthAuthenticator
. If I have a client class with an
authenticator
property instantiated as
OAuthAuthenticator(stream=self)
should the stream methods not be accessible within the authenticator class? Specifically I want to be able to access the stream url_base property from within the authenticator object. Happy to provide more clarification or a link to a repo example if that's helpful. The use case is that I need to be able to dynamically set the
oauth_endpoint
property using the stream url_base.
e
Hi @daniel_luftspring! The
__init__
constructor of OAuthAuthenticator has an optional
auth_endpoint
argument, so you can pass a dynamically constructed URL from
RESTStream.url_base
. Would that help your use case?
d
That might work although a bit less readable than defining the endpoint within the Auth Class. I had to roll an authenticator class on top of
OAuthAuthenticator
because the API i'm accessing doesnt exactly follow the protocol
Just following up your workaround solves the problem thank you!
e
Awesome!