Skip to content
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

Remove unneeded methods from api #109

Merged
merged 12 commits into from
Feb 1, 2024
Merged

Conversation

wzieba
Copy link
Collaborator

@wzieba wzieba commented Jan 30, 2024

Description

This PR removes some methods from the public API. Those methods are not needed to use the SDK and were making the API less readable. Internal communication: p1706537769574079-slack-C0533SEJ82H

Reflection invocation

Those methods, although not needed for public API, are useful in the scope of the demo app. That's why I've decided to keep them in ParselyTrackerInternal and invoke them using reflection.

Testing

Install the example app and tap on each button. The app should not crash.

Copy link

codecov bot commented Jan 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (12607a9) 69.30% compared to head (003d6fb) 70.54%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #109      +/-   ##
==========================================
+ Coverage   69.30%   70.54%   +1.23%     
==========================================
  Files          21       21              
  Lines         404      404              
  Branches       49       49              
==========================================
+ Hits          280      285       +5     
+ Misses        110      104       -6     
- Partials       14       15       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wzieba wzieba marked this pull request as ready for review January 30, 2024 09:11
@@ -14,11 +14,6 @@ public final class com/parsely/parselyandroid/ParselyNotInitializedException : j

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file comes from #101 and highlights how the public API changed.

@wzieba wzieba requested review from oguzkocer and iangmaia and removed request for oguzkocer January 30, 2024 09:18
ParselyTracker.sharedInstance().resetVideo();
}

private boolean engagementIsActive() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these private API calls really useful in the demo app? Meaning: does it make sense to show this info given it's not going to be available for clients?
I get that the intention might be just showing some debug info, but if so, perhaps good to at least add a comment highlighting that these are private methods and not intended to be used by users in general? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these private API calls really useful in the demo app?

I think yes - it might be helpful to see how the internal parameters of the SDK behave after certain actions to see how it works. Especially, as things happen here after intervals 10+ seconds.

But I see that it's the "example" app, so it should be giving a good example of the integration. I agree that in the current form it could be misleading.

In 003d6fb I've extracted all calls to a separate class and added comments. WDYT?

Copy link
Collaborator

@iangmaia iangmaia Feb 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I see that it's the "example" app, so it should be giving a good example of the integration

🎯 Exactly!

In 003d6fb I've extracted all calls to a separate class and added comments. WDYT?

This is a good compromise IMO, and it makes it clear to clients that this is just for debugging 👍 Thanks for taking the time to address it!

@wzieba wzieba merged commit 6cc8a79 into main Feb 1, 2024
3 checks passed
@wzieba wzieba deleted the remove_unneeded_methods_from_api branch February 1, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants