Problem/Motivation
"Interest labels" and "Preferences" are phased out in favour of "Interests" in the Flexmail REST API.
All Flexmail accounts are being transferred to this new structure at the time of writing. This is being communicated to their clients before doing so.
Proposed resolution
Deprecate the following API methods:
- getPreferences
- getContactPreferenceSubscriptions
- getInterestLabels
- getContactInterestLabels
- subscribeContactToPreference
Add new API methods:
- getInterests
- getContactInterests
- subscribeContactToInterest
Remaining tasks
Deprecate the following API methods:
getPreferencesgetContactPreferenceSubscriptionsgetInterestLabelsgetContactInterestLabelssubscribeContactToPreference
Add new API methods:
getInterestsgetContactInterestssubscribeContactToInterest
User interface changes
None.
API changes
See proposed solution.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | flexmail-interest_endpoints-3394527-21.patch | 22.07 KB | fernly |
Issue fork flexmail-3394527
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
fernly commentedBackwards compatible patch.
The patch marks
preferenceandinterest labelmethods as deprecated (they still work) and adds 3 new API methods:Comment #3
fernly commentedComment #4
fernly commentedUpdated patch with missing doc comment.
Comment #5
daften commentedI have the following remarks when reviewing:
The logic looks good in general. Could you check the comments above?
Next to that, is there a blog post or more information that can be shared? Since we'll need a follow-up issue to update the flexmail_webform submodule, since there is logic there that depends on the deprecated methods.
Comment #6
fernly commentedThanks for the review.
Abstracted some more code into separate (base) classes/interfaces.
Additionally the 3 existing Value objects are made
final.The Flexmail structural change is shown in a small video on https://app.flexmail.eu/auth. Also when you log in, you should get a warning when your segments are still based on sources instead of interests. Rumour has it it's also communicated through a newsletter.
Comment #7
daften commentedThanks for the updates, some feedback again :)
Comment #8
fernly commentedApplied all changes.
\Drupal\flexmail\api\value\Value::validateFieldsPresentis not kept for now.Comment #9
daften commentedLooks good to me, I'll give Matthijs a chance to look at it, if he doesn't have time, I'll merge. ping me if it becomes urgent!
Comment #10
matthijsComment #11
matthijsComment #13
matthijsComment #14
daften commentedMarking as needs work based on the feedback!
Comment #15
fernly commentedFixed feedback or added responses to remarks in MR. Marking as 'Needs review'.
Comment #16
matthijsReplied in the threads. I would suggest to fix these last 3 issues, then it's RTBC.
Comment #17
daften commentedWe only need a better solution for the getId method, having an empty id method that should never be used for some valueobjects doesn't seem right. Maybe we can have ValueObjectBase and ValueCollectionBase with a common ValueBase? Or using traits as suggested before?
Comment #18
fernly commentedMoved getId to the final value objects that actually (can) have an ID.
Comment #19
fernly commentedFor anyone needing a patch, here a version including the latest MR changes.
Comment #20
fernly commentedUpdated patch since MR changes.
Comment #21
fernly commentedUpdated patch since MR changes.
Issue #3394527: Fix deprecation notice
Comment #23
daften commentedComment #24
daften commentedMerged, thanks for the contribution!