-
Notifications
You must be signed in to change notification settings - Fork 327
Wip/gmt/13015 strava oauth #13195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Wip/gmt/13015 strava oauth #13195
Conversation
✨ GUI Checks ResultsSummary
See individual check results for more details. 🎭 Playwright Test ResultsSummary
👮 Lint GUI ResultsCheck Results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider some changes to make Strava
a singleton.
@@ -0,0 +1,10 @@ | |||
name: Saas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Thanks a lot for putting this new functionality into its own project/library
- and not including it in
Standard.Base
- I know it is an additional obstacle, but I'd like
Standard.Base
to be even smaller than it is today - thus thank you for your additional work with the new project/library
- btw. the name
Saas
sounds enterprisy and is a good one!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the scope of this library too broad?
I imagine as Enso gets more integrations a library called Saas
could grow basically indefinitely.
What is the benefit of having a big aggregator library instead of creating a separate one specifically for Strava
and then separate ones for other services?
distribution/lib/Standard/Saas/0.0.0-dev/src/Strava/Strava.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Saas/0.0.0-dev/src/Strava/Strava.enso
Outdated
Show resolved
Hide resolved
import org.enso.base.enso_cloud.ExternalLibraryCredentialHelper.AccessToken; | ||
import org.enso.base.enso_cloud.ExternalLibraryCredentialHelper.CredentialReference; | ||
|
||
public class StravaService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public class StravaService { | |
public final class StravaService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
strava_get self "https://www.strava.com/api/v3/athletes/"+id.to_text+"/stats" | ||
|
||
private strava_get strava url = | ||
header = Header.new "Authorization" ("Bearer " + strava.strava_service.getAccessToken.token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should prefer using Header.authorization_bearer
} | ||
|
||
private void refresh() throws IOException { | ||
var oat = accessToken; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused var?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good starting point.
I have some doubts on the library name - feels too broad.
Would you mind adding some screenshots of the create credentials dialog for Strava? So that we don't have to build the GUI just to see it :) |
Pull Request Description
Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
or the Snowflake database integration, a run of the Extra Tests has been scheduled.