Skip to content
forked from mtfum/NewsAPI

An unofficial supported Swift client library for accessing News API.

License

Notifications You must be signed in to change notification settings

haptaro/NewsAPI

 
 

Repository files navigation

NewsAPI

An API framework for newsapi.org with Swift.

Requirement

  • Swift5.5+

Installation

Swift Package Manager

.package(url: "https://github.com/mtfum/NewsAPI.git", from: "0.1.0")

Usage

Setup

import NewsAPI

let client = NewsAPI(apiKey: "YOUR_API_KEY")

Get Sources

let articles = try await client.getSources()

Search

let articles = try await client.search(query: "bitcoin")

Top-Headlines

let articles = try await client.getTopHeadlines()

About

An unofficial supported Swift client library for accessing News API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%