Skip to content

Instantly share code, notes, and snippets.

@ayunav
Created February 19, 2017 03:20
Show Gist options
  • Select an option

  • Save ayunav/813cd6cb2d7dbccab7e12211bb2c9db2 to your computer and use it in GitHub Desktop.

Select an option

Save ayunav/813cd6cb2d7dbccab7e12211bb2c9db2 to your computer and use it in GitHub Desktop.
Type properties on enums - Swift
import Foundation
enum MeetupAPI {
// MARK: - Properties
static let url = URL(string: "https://api.meetup.com/find/events?&sign=true&photo-host=public")
static let session: URLSession = {
let config = URLSessionConfiguration.default
return URLSession(configuration: config)
}()
}
print(MeetupAPI.url!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment