Skip to content

rcasula/stargazers-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

dba67fd · Mar 18, 2022

History

52 Commits
Mar 18, 2022
Mar 18, 2022
Mar 18, 2022
Mar 18, 2022
Mar 18, 2022
Mar 18, 2022
Mar 18, 2022
Mar 18, 2022
Mar 18, 2022

Repository files navigation

StargazersKit

StargazersKit is a library for fetching the list of stargazers of a given GitHub repository if the device's security standards are met.

Basic Usage

First you need to configure the framework. To do so you need to call StargazersApp.configure() in the app delegate.

import StargazersKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    StargazersApp.configure()
    return true
  }
}

then you simply call

StargazersApp.shared.stargazers(
  for: REPO HERE, 
  owner: REPO OWNER HERE, 
) { result in 
  switch result {
    case .success(let stargazers):
      print("Here are the stargazers: ", stargazers)
      break
    case .failure(let error):
      print("ERROR: ", error)
      break
  }
}

Installation

You can add StargazersKit to an Xcode project by adding it manually.

  1. Download a copy of StargazersKit.

  2. Drag the downloaded StargazersKit.xcframework in your own project and make sure is set to be embedded in the Embedded Binaries section of the General tab of your application target.

💡 Tip: see the [Example Application] for examples of such integration.

License

This library is released under the MIT license. See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published