pyicloud
pyicloud copied to clipboard
Add the Premium Mail Settings service
Proposed change
Introducing support for the Hide My Email feature of the Premium Mail Settings service.
Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New service (thank you!)
- [ ] New feature (which adds functionality to an existing service)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
- [ ] Documentation or code sample
Example of code:
api = PyiCloudService(apple_id="[email protected]", password="REDACTED")
print(f"All HMEs: {', '.join([hme.hme for hme in api.premiummailsettings.hme_emails])}")
new_hme = api.premiummailsettings.generate_hme()
print(f"Generated new HME: {new_hme}")
label = input("Enter label: ")
api.premiummailsettings.reserve_hme(hme=new_hme, label=label, note="Generated from pyicloud")
print(f"All HMEs: {', '.join([hme.hme for hme in api.premiummailsettings.hme_emails])}")
Additional information
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
Checklist
- [x] The code change is tested and works locally.
- [x] Local tests pass. Your PR cannot be merged unless tests pass
- [x] There is no commented out code in this PR.
- [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated to README