https://github.com/outfoxx/randomuser
https://github.com/outfoxx/randomuser
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/outfoxx/randomuser
- Owner: outfoxx
- Created: 2020-08-18T15:45:09.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2020-08-18T18:00:26.000Z (almost 6 years ago)
- Last Synced: 2025-09-18T14:58:38.159Z (10 months ago)
- Language: Swift
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RandomUser
Simple library for fetching & transforming random user data from [randomuser.me](https://randomuser.me) and supplying it to SwiftUI previews.
Fetching Standard Data:
```swift
RandomUserFetch()
.execute(count: 100)
.map { user in
// do something with user data
}
```
Fetching Custom Formatted Data:
```swift
struct MyViewData {
let name: String
let avatar: String
}
RandomUserFetch()
.execute(count: 100) { user, _ in
MyViewData(name: "\(user.name!.last), \(user.name!.first)", avatar: user.picture!.large)
}
.sink(...)
```