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

UserClient class to manage user data collection from user endpoint #3143

Closed
Tabrisrp opened this issue Sep 24, 2020 · 0 comments · Fixed by #3176
Closed

UserClient class to manage user data collection from user endpoint #3143

Tabrisrp opened this issue Sep 24, 2020 · 0 comments · Fixed by #3176
Assignees
Labels
effort: [S] 1-2 days of estimated development time Module: dashboard type: sub-task Indicates the issue is a sub-task linked to an epics card

Comments

@Tabrisrp
Copy link
Contributor

Tabrisrp commented Sep 24, 2020

Sub-task for epics #3067 #3068 #3069

This class will fetch the user data from our user endpoint and cache it.

Architecture

  • Class will be in inc/Engine/License/API, namespace WP_Rocket\Engine\License\API
  • name is UserClient
  • Injection of the Options_Data instance to get license data

Methods

  • get_raw_user_data(): the method sends the request to the API endpoint to get the data. To have a successful request, we need to pass the consumer_key and user_id as parameters in the body of the request
  • get_user_data(): the method first gets the data from the cache (transient wp_rocket_customer_data), or if no cache, calls get_raw_user_data() to get it and cache it.

Tests

  • Unit & integration tests for all methods
@Tabrisrp Tabrisrp added effort: [S] 1-2 days of estimated development time type: sub-task Indicates the issue is a sub-task linked to an epics card labels Sep 24, 2020
@Tabrisrp Tabrisrp self-assigned this Sep 28, 2020
@Tabrisrp Tabrisrp changed the title UserAPIClient class to manage user data collection from user endpoint UserClient class to manage user data collection from user endpoint Sep 30, 2020
Tabrisrp added a commit that referenced this issue Oct 1, 2020
…dpoint (PR #3176)

* add UserClient class
* add UserClient tests
@Tabrisrp Tabrisrp closed this as completed Oct 1, 2020
Tabrisrp added a commit that referenced this issue Oct 9, 2020
* Closes #3149 PricingClient class to get data from pricing endpoint (PR #3174)
* Closes #3143 User Client class to manage data collection from user endpoint (PR #3176)
* Closes #3150 Pricing class to manage pricing data usage (PR #3179)
* User class to manage user data access (PR #3185)
* Closes #3151 Upgrade class to manage showing upgrade offers (PR #3186)
* Closes #3154 Subscriber class for the upgrade events (PR #3190)
* Closes #3153 JS code for the upgrade popin toggle (PR #3193)
* Closes #3152 CSS for the upgrade popin (PR #3194)
* show choices when license count is between single and plus
* add new tests for license between single and plus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: [S] 1-2 days of estimated development time Module: dashboard type: sub-task Indicates the issue is a sub-task linked to an epics card
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant