Skip to content

Releases: coenttb/swift-github

v0.2.0: GitHub Traffic API Support

26 Sep 19:11

Choose a tag to compare

What's New

Features

  • 📊 GitHub Traffic API: Complete implementation for accessing repository traffic data including:
    • Views and unique visitors tracking
    • Clone statistics
    • Popular content (paths and referrers)
  • 🔧 Traffic Client Extensions: Convenient extensions for accessing traffic data
  • 📈 Traffic Response Types: Comprehensive response models for all traffic endpoints

Improvements

  • 📚 Streamlined README for better clarity
  • 🎯 Enhanced module exports for Traffic functionality

Compatibility

  • Requires swift-github-types v0.2.0 or later
  • Requires swift-github-live v0.2.0 or later
  • Compatible with GitHub API v2022-11-28

Installation

.package(url: "https://github.com/coenttb/swift-github.git", from: "0.2.0")

Full Changelog: 0.1.0...0.2.0

swift-github v0.1.0

01 Sep 15:13

Choose a tag to compare

🎉 Initial Release

First public release of swift-github, a high-level GitHub API client for Swift server applications.

✨ Features

  • 🎯 API Coverage (currently implemented):
    • Traffic analytics (views, clones, referrers)
    • Repository operations
    • Stargazer data
    • More endpoints coming soon
  • 🔌 Dependency Injection: First-class support via swift-dependencies
  • 🧪 Fully Testable: Mock implementations for all operations
  • 📊 Analytics Ready: Built-in traffic and engagement metrics
  • 🚀 Production Ready: Currently powering GitHub integrations at coenttb.com
  • ⚡ High Performance: Async/await with efficient connection pooling

📦 Installation

Add to your Package.swift:

dependencies: [
    .package(url: "https://github.com/coenttb/swift-github", from: "0.1.0")
]

🔧 Quick Start

import GitHub
import Dependencies

struct MyService {
    @Dependency(\.github.client) var github
    
    func fetchRepositoryStats() async throws {
        let traffic = try await github.traffic.views(
            owner: "coenttb",
            repo: "swift-github"
        )
    }
}

🏗️ Architecture

Clean separation of concerns:

  • GitHub: High-level client with dependency injection
  • GitHubTraffic: Traffic analytics module
  • GitHubRepositories: Repository operations module
  • GitHubShared: Shared utilities and types

🚀 Production Use

This package powers GitHub integrations at:

  • coenttb.com - Repository statistics dashboard
  • Traffic analytics and monitoring systems

📄 License

Dual licensed under AGPL 3.0 for open source projects and commercial license for proprietary use.

🔗 Related Packages

📚 Documentation

See the README for comprehensive documentation, examples, and testing patterns.

🚧 Roadmap

Future releases will add support for:

  • Issues and Pull Requests
  • Actions and Workflows
  • Users and Organizations
  • Webhooks
  • And more GitHub API endpoints

Full Changelog: https://github.com/coenttb/swift-github/commits/0.1.0