[](https://travis-ci.org/dingwilson/RandomUserSwift)
[](https://codecov.io/gh/dingwilson/RandomUserSwift)
[](https://wilsonding.com/RandomUserSwift)
[](https://cocoapods.org/pods/RandomUserSwift)
[](https://github.com/Carthage/Carthage)

[](https://swift.org)
[](https://opensource.org/licenses/MIT)
RandomUserSwift is an easy to use Swift framework that provides the ability to generate random users and their accompanying data for your Swift applications. It utilizes [randomuser.me](https://www.randomuser.me) API to generate the data.
1. [Integration](#integration)
- [Cocoapods](#cocoapods)
- [Carthage](#carthage)
2. [Usage](#usage)
3. [License](#license)
## Integration
#### CocoaPods
You can use [CocoaPods](https://cocoapods.org/) to install `RandomUserSwift` by adding it to your `Podfile`:
```ruby
target 'MyApp' do
pod 'RandomUserSwift'
end
```
#### Carthage
You can use [Carthage](https://github.com/Carthage/Carthage) to install `RandomUserSwift` by adding it to your `Cartfile`:
```
github "dingwilson/RandomUserSwift"
```
## Usage
Import the framework
```swift
import RandomUserSwift
```
Then, use the `getUsers` function via the `shared` singleton with a completion handler.
```swift
RandomUser.shared.getUsers { data, error in
guard let data = data else { return }
print(data)
}
```
For more information on the configuration and returned values, check out the [RandomUserSwift documentation](https://wilsonding.com/RandomUserSwift) or [RandomUser official documentation](https://www.randomuser.me/documentation)
## License
`RandomUserSwift` is released under an [MIT License](https://opensource.org/licenses/MIT). See `LICENSE` for details.
**Copyright © 2016-present Wilson Ding.**
*Please provide attribution, it is greatly appreciated.*