{"id":30689432,"url":"https://github.com/perseusrealdeal/openweatheragent","last_synced_at":"2026-02-13T15:08:21.201Z","repository":{"id":82593956,"uuid":"605612934","full_name":"PerseusRealDeal/OpenWeatherAgent","owner":"PerseusRealDeal","description":"OpenWeatherMap 2.5 API Client","archived":false,"fork":false,"pushed_at":"2025-07-02T09:56:01.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-10T03:14:00.278Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PerseusRealDeal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-23T14:30:41.000Z","updated_at":"2025-06-30T07:02:24.000Z","dependencies_parsed_at":"2025-01-09T10:25:06.854Z","dependency_job_id":"e0b8f76b-fbb5-4861-bff1-35f411e69ab2","html_url":"https://github.com/PerseusRealDeal/OpenWeatherAgent","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.2857142857142857,"last_synced_commit":"fc00c225e123c871263790317333538aba75cab7"},"previous_names":["perseusrealdeal/openweatheragent","perseusrealdeal/openweatherfreeclient"],"tags_count":3,"template":false,"template_full_name":"PerseusRealDeal/TheTechnologicalTree","purl":"pkg:github/PerseusRealDeal/OpenWeatherAgent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerseusRealDeal%2FOpenWeatherAgent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerseusRealDeal%2FOpenWeatherAgent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerseusRealDeal%2FOpenWeatherAgent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerseusRealDeal%2FOpenWeatherAgent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerseusRealDeal","download_url":"https://codeload.github.com/PerseusRealDeal/OpenWeatherAgent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerseusRealDeal%2FOpenWeatherAgent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273218426,"owners_count":25065913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-02T01:34:50.543Z","updated_at":"2026-02-13T15:08:21.130Z","avatar_url":"https://github.com/PerseusRealDeal.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenWeatherAgent — Xcode 14.2+\n\n\u003e [`Weather-MenuBar-App for macOS`](https://github.com/perseusrealdeal/TheDarkMoon)\u003cbr/\u003e\n\n\u003e `OpenWeatherAgent` is an OpenWeatherMap API Client for`\u003chttps://api.openweathermap.org/data/2.5/\u003e`.\u003cbr/\u003e\n\u003e `Individual API key` is required.\u003cbr/\u003e\n\n\u003e - To request current weather.\u003cbr/\u003e\n\u003e - To request `5 Day / 3 Hour` forecast.\u003cbr/\u003e\n\n\u003e `OpenWeatherAgent` is a single author and personale solution developed in `person-to-person` relationship paradigm.\n\n[![Actions Status](https://github.com/perseusrealdeal/OpenWeatherAgent/actions/workflows/main.yml/badge.svg)](https://github.com/perseusrealdeal/OpenWeatherAgent/actions/workflows/main.yml)\n[![Style](https://github.com/perseusrealdeal/OpenWeatherAgent/actions/workflows/swiftlint.yml/badge.svg)](https://github.com/perseusrealdeal/OpenWeatherAgent/actions/workflows/swiftlint.yml)\n[![Version](https://img.shields.io/badge/Version-0.3.5-green.svg)](/CHANGELOG.md)\n[![Platforms](https://img.shields.io/badge/Platforms-macOS%2010.13+Cocoa_|_iOS%2011.0+UIKit-orange.svg)](https://en.wikipedia.org/wiki/List_of_Apple_products)\n[![Xcode 14.2](https://img.shields.io/badge/Xcode-14.2+-red.svg)](https://en.wikipedia.org/wiki/Xcode)\n[![Swift 5.7](https://img.shields.io/badge/Swift-5.7-red.svg)](https://www.swift.org)\n[![License](http://img.shields.io/:License-MIT-blue.svg)](/LICENSE)\n\n## Integration Capabilities\n\n[![Standalone](https://img.shields.io/badge/Standalone-available-informational.svg)](/OpenWeatherStar.swift)\n[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-4BC51D.svg)](/Package.swift)\n\n\u003e Use Stars to adopt [`OpenWeatherAgent`](/OpenWeatherStar.swift) for the specifics you need.\n\n## Dependencies\n\n[![ConsolePerseusLogger](http://img.shields.io/:ConsolePerseusLogger-1.5.0-green.svg)](https://github.com/perseusrealdeal/ConsolePerseusLogger.git)\n\n# Approbation Matrix\n\n\u003c!-- [`A3 Environment and Approbation`](/APPROBATION.md) / [`CHANGELOG`](/CHANGELOG.md) for details. --\u003e\n\n\u003e [`CHANGELOG`](/CHANGELOG.md) for details.\n\n# In brief \u003e Idea to use, the Why\n\n\u003e There're so many things happen unexpectedly... and weather is the most one.\n\n# Build system requirements\n\n- [macOS Monterey 12.7.6+](https://apps.apple.com/by/app/macos-monterey/id1576738294) / [Xcode 14.2+](https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_14.2/Xcode_14.2.xip)\n\n\u003e But as the single source code file [OpenWeatherStar.swift](/OpenWeatherStar.swift) PDM can be used even in Xcode 10.1.\n\n# First-party software\n\n| Type | Name                                                                                                                                                                  | License |\n| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| Star | [ConsolePerseusLogger](https://github.com/perseusrealdeal/ConsolePerseusLogger) / [1.5.0](https://github.com/perseusrealdeal/ConsolePerseusLogger/releases/tag/1.5.0) | MIT     |\n\n# Third-party software\n\n| Type   | Name                                                                                                                              | License                            |\n| ------ | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |\n| Style  | [SwiftLint](https://github.com/realm/SwiftLint) / [v0.57.0 for Monterey+](https://github.com/realm/SwiftLint/releases/tag/0.57.0) | MIT                                |\n| Script | [SwiftLint Shell Script](/SucceedsPostAction.sh) to run SwiftLint                                                                 | MIT                                |\n| Action | [mxcl/xcodebuild@v3](https://github.com/mxcl/xcodebuild)                                                                          | [Unlicense](https://unlicense.org) |\n| Action | [cirruslabs/swiftlint-action@v1](https://github.com/cirruslabs/swiftlint-action/)                                                 | MIT                                |\n\n# Installation\n\n\u003e Standalone: the single source code file [OpenWeatherStar.swift](/OpenWeatherStar.swift)\n\n\u003e Swift Package Manager: `https://github.com/perseusrealdeal/OpenWeatherAgent`\n\n# Usage\n\n## Request Current Weather\n\n### `Case structured concurrency:` closure completion callbacks\n\n```swift\n\nlet apikey = \"The API key\"\n\nlet client = OpenWeatherClient()\nlet respect = OpenWeatherRequestData(appid: apikey)\n\nclient.onDataGiven = { result in\n\n    switch result {\n    case .success(let weatherData):\n        // Source Code: prettyPrinted\n        // https://gist.github.com/perseusrealdeal/945c9050cb9f7a19e00853f064acacca\n        log.message(weatherData.prettyPrinted! as String)\n    case .failure(let error):\n        var errStr = \"\"\n        switch error {\n        case .failedRequest(let errText):\n            errStr = errText\n        case .failedResponse(let errText):\n            errStr = errText\n        case .invalidUrl:\n            errStr = \"invalidUrl\"\n        case .statusCode404:\n            errStr = \"statusCode404\"\n        }\n        log.message(\"[OpenWeatherAgent]\\(#function): \\(errStr)\", .error)\n    }\n}\n\ntry? client.call(with: respect)\n\n```\n\n### `Case async-await concurrency:` only from iOS 13, macOS 10.15\n\n``` swift\n\nlet apikey = \"The API key\"\nlet respect = OpenWeatherRequestData(appid: apikey)\n\ndo {\n    let data = try await OpenWeatherAgent.shared.fetch(with: respect)\n    \n    // Source Code: prettyPrinted\n    // https://gist.github.com/perseusrealdeal/945c9050cb9f7a19e00853f064acacca\n    \n    log.message(data.prettyPrinted! as String)\n    \n} catch let error as OpenWeatherAPIClientError {\n    log.message(\"OpenWeatherAPIClientError: \\(error)\", .error)\n} catch {\n    log.message(error.localizedDescription, .error)\n}\n\n```\n\n## Request Forecast \n\n### `Case structured concurrency:` closure completion callbacks\n\n```swift\n\nlet apikey = \"The API key\"\n\nlet client = OpenWeatherClient()\nlet respect = OpenWeatherRequestData(appid: apikey, request: .forecast)\n\nclient.onDataGiven = { result in\n\n    switch result {\n    case .success(let weatherData):\n        // Source Code: prettyPrinted\n        // https://gist.github.com/perseusrealdeal/945c9050cb9f7a19e00853f064acacca\n        log.message(weatherData.prettyPrinted! as String)\n    case .failure(let error):\n        var errStr = \"\"\n        switch error {\n        case .failedRequest(let errText):\n            errStr = errText\n        case .failedResponse(let errText):\n            errStr = errText\n        case .invalidUrl:\n            errStr = \"invalidUrl\"\n        case .statusCode404:\n            errStr = \"statusCode404\"\n        }\n        log.message(\"[OpenWeatherAgent]\\(#function): \\(errStr)\", .error)\n    }\n}\n\ntry? client.call(with: respect)\n\n```\n\n### `Case async-await concurrency:` only from iOS 13, macOS 10.15\n\n``` swift\n\nlet apikey = \"The API key\"\nlet respect = OpenWeatherRequestData(appid: apikey, request: .forecast)\n\ndo {\n    let data = try await OpenWeatherAgent.shared.fetch(with: respect)\n\n    // Source Code: prettyPrinted\n    // https://gist.github.com/perseusrealdeal/945c9050cb9f7a19e00853f064acacca\n\n    log.message(data.prettyPrinted! as String)\n\n} catch let error as OpenWeatherAPIClientError {\n    log.message(\"OpenWeatherAPIClientError: \\(error)\", .error)\n} catch {\n    log.message(error.localizedDescription, .error)\n}\n\n```\n\n# Points taken into account\n\n- Preconfigured Swift Package manifest [Package.swift](/Package.swift)\n- Preconfigured SwiftLint config [.swiftlint.yml](/.swiftlint.yml)\n- Preconfigured SwiftLint CI [swiftlint.yml](/.github/workflows/swiftlint.yml)\n- Preconfigured GitHub config [.gitignore](/.gitignore)\n- Preconfigured GitHub CI [main.yml](/.github/workflows/main.yml)\n\n# License MIT\n\nCopyright © 7530 - 7533 Mikhail A. Zhigulin of Novosibirsk\u003cbr/\u003e\nCopyright © 7533 PerseusRealDeal\n\n- The year starts from the creation of the world according to a Slavic calendar.\n- September, the 1st of Slavic year. It means that \"Sep 01, 2024\" is the beginning of 7533.\n\n## Other Required License Notices\n\n© 2025 The SwiftLint Contributors **for** SwiftLint\u003c/br\u003e\n© GitHub **for** GitHub Action cirruslabs/swiftlint-action@v1\u003c/br\u003e\n© 2021 Alexandre Colucci, geteimy.com **for** Shell Script SucceedsPostAction.sh\u003c/br\u003e\n\n[LICENSE](/LICENSE) for details.\n\n## Credits\n\n\u003ctable\u003e\n\u003ctr\u003e\n    \u003ctd\u003eBalance and Control\u003c/td\u003e\n    \u003ctd\u003ekept by\u003c/td\u003e\n    \u003ctd\u003eMikhail A. Zhigulin\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd\u003eSource Code\u003c/td\u003e\n    \u003ctd\u003ewritten by\u003c/td\u003e\n    \u003ctd\u003eMikhail A. Zhigulin\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd\u003eDocumentation\u003c/td\u003e\n    \u003ctd\u003eprepared by\u003c/td\u003e\n    \u003ctd\u003eMikhail A. Zhigulin\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd\u003eProduct Approbation\u003c/td\u003e\n    \u003ctd\u003etested by\u003c/td\u003e\n    \u003ctd\u003eMikhail A. Zhigulin\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n- Language support: [Reverso](https://www.reverso.net/)\n- Git clients: [SmartGit](https://syntevo.com/) and [GitHub Desktop](https://github.com/apps/desktop)\n\n# Author\n\n\u003e © Mikhail A. Zhigulin of Novosibirsk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperseusrealdeal%2Fopenweatheragent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperseusrealdeal%2Fopenweatheragent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperseusrealdeal%2Fopenweatheragent/lists"}