Skip to content

Latest commit

 

History

History
57 lines (44 loc) · 3.43 KB

README.md

File metadata and controls

57 lines (44 loc) · 3.43 KB

Snippets for Swift

What can you do with the Snippets framework?

See the classes themselves for full details. The following sections provide some usage examples.

[Work in Progress]

Create Random User

Generate a random user: lorem ipsum, but for people.

import Snippets

    // Initialise a random-user connection.
    let randomUser = RandomUser()

    // Generate random user information.
    randomUser.get { (randomUser) in
      let results = randomUser["results"] as? [NSDictionary]
      let nat = results?.first?["nat"] as? String
      let info = randomUser["info"] as? NSDictionary
      let seed = info?["seed"] as? String
      let version = info?["version"] as? String
      
      // Do something with the random-user information.
    }

Change Log

See up-to-date change log here.