EmailOctopusKit 0.1.0

EmailOctopusKit 0.1.0

Josef MoserY 维护。



  • caloon

EmailOctopusKit

CI Status Version License Platform

EmailOctopus 是一个经济实惠的电子邮件营销和自动化平台。EmailOctopusKit 利用 EmailOctopus API,让您在线上管理 EmailOctopus 上的联系人与邮件列表。

这个库的一个可能的用例是,将移动应用程序用户添加到您的邮件列表,并发送自动电子邮件(例如,欢迎邮件)。

您是 EmailOctopus 新用户吗? 使用此链接注册并获得 15 美元信用额度。

示例

要运行示例项目,请克隆仓库,然后先从 Example 目录运行 pod install

要求

要使用 EmailOctopus 发送电子邮件活动,您需要在 EmailOctopus.com 上创建一个账户,并链接到 Amazon SES。EmailOctopus 提供详细的 API 文档常见问题解答,可以帮助您了解相关的流程。

安装

EmailOctopusKit 可通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile 中。

pod 'EmailOctopusKit'

使用

EmailOctopus API 在 iOS 中的主要用途是管理联系人和邮件列表。EmailOctopusKit 允许您创建、编辑和删除联系人以及管理列表。它还提供(有限的)对活动管理支持。

API 密钥

注册您的 EmailOctopus API 密钥

EmailOctopus.setApiKey("your-api-key")

这将您的 API 密钥保存到密钥链中。您只需设置一次(例如在 AppDelegate 中)。

管理联系人

EmailOctopus.Lists.getContact("contact-id", in: "list-id") { (error, result) in }
EmailOctopus.Lists.getSubscribedContacts(of: "list-id") { (error, result) in }
EmailOctopus.Lists.getUnsubscribedContacts(of: "list-id") { (error, result) in }

EmailOctopus.Lists.createContact("email-address", in: "list-id", fields: [:]) { (error, result) in }
EmailOctopus.Lists.updateContact("contact-id", of: "list-id", newEmail: nil, newFields: nil, subscribed: true) { (error, result) in }
EmailOctopus.Lists.deleteContact("contact-id", of:"list-id") { (error, result) in }

管理邮件列表

EmailOctopus.Lists.getAllLists { (error, result) in }
EmailOctopus.Lists.getList("list-id") { (error, result) in }

EmailOctopus.Lists.createList(name: "list-name") { (error, result) in }
EmailOctopus.Lists.deleteList("list-id") { (error, result) in }

活动管理

EmailOctopus.Campaigns.getAllCampaigns() { (error, result) in }
EmailOctopus.Campaigns.getCampaign("campaign-id") { (error, result) in }

贡献者

欢迎通过打开问题或拉取请求来为这个项目做出贡献。

此 Cocoapod 由 Josef Moser 创建。我是一名独立的 iOS 开发者,同时也是 Cora HealthCryptoradar 的联合创始人。

许可证

EmailOctopusKit可在MIT许可下使用。更多信息请参阅LICENSE文件。