Skip to content

Commit

Permalink
Updated README file to match latest requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
vexy committed Feb 15, 2022
1 parent 84a8a33 commit d791557
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@

# Fridge ❄️0.8
**Fridge** is the perhaps the silliest `Swift5 async/await` network implementation you'll ever see.
# Fridge ❄️0.8.2
**Fridge** is perhaps the silliest `Swift5 async/await` network implementation you'll ever see.
With Fridge, your fancy `struct`(s) will raise and shine, allowing you to focus on your plan to conquer the Earth...finally !

|Branch|Build status|
|-|-|
|master|[![Swift](https://github.com/vexy/Fridge/actions/workflows/swift.yml/badge.svg)](https://github.com/vexy/Fridge/actions/workflows/swift.yml)|


## Usage
So say you *just wanna grab that model from the API* and do your stuff. **Your** stuff...
So say you *just wanna grab that model from the network* and do your stuff. **Your** stuff...

Well, if you conform your fancy `struct` into `Decodable` first:
Well, first conform your fancy `struct` into `Decodable` like this:
```Swift
struct MyStuff: Decodable {
var something: String
var elixirOfL❤️fe: URL
var piTimesE: Float

init(private🔑: Chachapoly20) { ... } //do fatalError if elixir cannot be initialized (!)
init(private🔑: muhash(0x61F612d)) {
//do fatalError if elixir cannot be initialized (!)
}
}
```

Expand All @@ -31,18 +34,21 @@ print("Elixir of live is: \(_stuff.elixirOfL❤️fe)")
Yup, and you're all **set**. `Fridge` will perform the network fetch and decode the network data and return your `struct`.
Easy peasy right ?

### Minimum iOS versions
Fridge requires following configuration:
- Swift 5.0
- iOS 15.0
### Minimum Swift & iOS versions
`Fridge` requires following configuration:
- Swift 5.5
- iOS `15.0`
- macOS `12.0`

`Fridge` is here to reduce the pain of fetching your stuff from the network, parsing, doing endless error checking and yeah... good old closures. You can even say goodbay to closures if you want.
It's build using `async/await` philosophy and requires `Swift 5.5` to run.
`Fridge` is built using `async/await` philosophy and is here to reduce the pain of fetching your stuff from the network, parsing, doing endless error checking and yeah... good old closures.
You can even say goodbay to closures if you want.

*NOTE*
As of 6-8-2021 Fridge requires `Swift5.5` and prebuilt Swift [snapshots](https://swift.org/download/#snapshots). You may also need to set `-Xfrontend -enable-experimental-concurrency` flag in other linker flags section. Checkout official [Swift.org](https://swift.org/) website for more info.
Be sure to meet minimum configuration parameters as you may encounter difficult-to-recover build errors.
_Sometimes_, altering liker flag `-Xfrontend -enable-experimental-concurrency` helps, but may fail if building with commandline
Checkout official Swift.org website, for supporting earlier than minimums and other info.

### Library reference
### Library interface
`Fridge` has very simple interface to work with:
- `Fridge.grab🔮(from: URL)` method to get your `struct` directly from the network
- `Fridge.freeze🧊()` to store your `struct` on the disk
Expand All @@ -56,6 +62,6 @@ URL: https://github.com/vexy/Fridge.git
```
---
(**FRIDGE IS STILL UNDER HEAVY DEVELOPMENT**)
Package **BETA** release : *v0.8.4 ( UTC2021-12-07 )*
Fridge **BETA** release : *v0.8.4 ( UTC2021-12-07 )*

Copyright © 2020 Veljko Tekelerović, MIT license

0 comments on commit d791557

Please sign in to comment.