diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..b249f76 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 James Sherlock + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 7d6b4e5..f0bea5c 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,44 @@ # Storm Glass for Swift -⚠️ This is a work-in-progress package started on August 10th 2021. - > Global high-resolution weather forecasts directly from the world’s most trusted meteorological institutions. In order to use this package, you will first need to obtain an API key from [Storm Glass](https://stormglass.io/). +## Installation + +Add package to your Xcode project using Swift Package Manager. + +## Usage + +```swift + +// Step 1: +// Configure API Key + +SGConfiguration.shared.apiKey = "your-api-key" + +// Step 2: +// Create Endpoint Request + +import StormGlass +let endpoint = SGWeatherPointRequest(... parameters) + +// Step 3: +// Create Networking Request + +let request = SGRequest(endpoint: endpoint) + +// Step 4: +// Execute + +request.fetch { result in + // Step 5: + // Handle Result... + + // (psst, this is where you put your code using the data!) +} +``` + ## TODO -- [ ] Tests (with complete fixture list) -- [x] Inline Documentation -- [ ] README Documentation -- [x] Access Control Audit -- [x] Error Handling -- [x] Add to SPI +Tests are yet to be written. Recommended against using in any production app until this has been done.