This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
/// View model protocol | |
protocol ViewModel: ObservableObject { | |
var count: Int { get } | |
func increase() | |
} | |
/// Concrete implementation | |
class MyViewModel: ViewModel { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | |
var mc_base_url = 'http://us7.api.mailchimp.com/1.3/?method=listSubscribe'; | |
var mc_list_id = 'xxxxxxxxxx'; | |
var mc_double_optin = false; | |
/** | |
* Uses the MailChimp API to add a subscriber to a list. | |
*/ | |
function sendToMailChimp_(fn, ln, em, yr){ |