Latest 0.0.1
Homepage https://github.com/BrunoMiguens/NewsApiKit
License MIT
Platforms ios 8.0
Authors

CI Status
codecov
CocoaPods compatible
Carthage compatible

Use the unofficial Swift client library to integrate News API into your iOS, tvOS, watchOS or macOS application without worrying about what’s going on under the hood.

Requirements

  • iOS 8.0+
  • Xcode 9.0+
  • Swift 4.0+

Instalation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it by following this guide.

  use_frameworks!

  # Add the instruction below inside your targets on your Podfile.
  pod 'NewsApiKit'

After saving the file, please run the command pod install to download and integrate the framework into your project.

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.You can install it by following this guide.

  # Add the instruction below inside your Cartfile.
  github "BrunoMiguens/NewsApiKit"

After saving the file, please run the command carthage update to download and build the framework, after finish, copy the NewsApiKit.framework into your project.

Initialization

First of all, request your apiKey, using the News Api website, otherwise, you’ll not be able to make requests.

For more information or any doubts related to how the api works, please check the documentation website.

Start by creating your NewsApi instance:

  let api = NewsApi(apiKey: "your_api_key")

or use the shared instance NewsApi.shared, before using it you’ll need to set up the apiKey:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

  NewsApi.setup(apiKey: "your_api_key")

  // Your launching code.
}

Usage

Work in progress…

Latest podspec

{
    "name": "NewsApiKit",
    "version": "0.0.1",
    "summary": "[WIP] Use the unofficial Swift client library to integrate News API.",
    "description": "[WIP] Use the unofficial Swift client library to integrate News API into your iOS, tvOS, watchOS or macOS application without worrying about what's going on under the hood.",
    "homepage": "https://github.com/BrunoMiguens/NewsApiKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Bruno Miguens": "[email protected]"
    },
    "source": {
        "git": "https://github.com/BrunoMiguens/NewsApiKit.git",
        "tag": "0.0.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "NewsApiKit/**/*"
}

Pin It on Pinterest

Share This