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

Add SubscriptionLists class #131

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jo-wojtowicz
Copy link

@jo-wojtowicz jo-wojtowicz commented Dec 14, 2021

This pull request connects to the issue https://github.com/OLIOEX/community-team/issues/882.

We would like to be able to subscribe users to Airship's subscriptions lists. This operation is not currently supported by the Airship's Ruby Library, so we decided to add it in our fork.

https://docs.airship.com/api/ua/#operation-api-channels-subscription_lists-post.

@lloydwatkin
Copy link
Contributor

Looks good, you'll need to update the documentation here: https://github.com/urbanairship/ruby-library/tree/main/docs

end

def subscribe(list_id, email_addresses)
subscribe_payload = payload(SUBSCRIBE, list_id, email_addresses)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need to raise an error if list_id or email_addresses aren't supplied:

        fail TypeError, 'list_id musy be provided' unless list_id.is_a? String

Copy link
Author

Choose a reason for hiding this comment

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

Thank you, I will take care of that!

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