Swiftpack.co - cruisea-app/stormglass-swift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by cruisea-app.
cruisea-app/stormglass-swift 1.0.0
A Swift package for interacting with the Storm Glass API
⭐️ 1
🕓 2 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/cruisea-app/stormglass-swift.git", from: "1.0.0")

Storm Glass for Swift

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.

Installation

Add package to your Xcode project using Swift Package Manager.

Usage


// 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!)
}

GitHub

link
Stars: 1
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

First Release
2 years ago

Tests have been added validating all endpoints requests and responses

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics