GithubHelp home page GithubHelp logo

rivierakid / lemmy-swift-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rrainn/lemmy-swift-client

0.0 0.0 0.0 99 KB

A Swift client for Lemmy.

Home Page: https://rrainn.github.io/Lemmy-Swift-Client/documentation/lemmy_swift_client/

License: MIT License

Swift 100.00%

lemmy-swift-client's Introduction

Lemmy-Swift-Client

A Swift client for Lemmy.

Features

  • Fully Swift type safe
  • async/await compatible
  • Supports all Lemmy API endpoints
  • Uses Codable for easy JSON serialization/deserialization

Installation

We use Swift Package Manager to make it easy to install and use the Lemmy Swift Client in your project.

dependencies: [
	.package(url: "https://github.com/rrainn/Lemmy-Swift-Client.git", .upToNextMajor(from: "1.0.0"))
]

Usage

Below is an example of a basic usage example of how to use the Lemmy Swift Client.

import Lemmy_Swift_Client

if let url = URL(string: "https://eventfrontier.com/api/v3") {
	// Create an instance of the Lemmy API with the base URL of your Lemmy instance
	let api = LemmyAPI(baseUrl: url)

	// Create a SearchRequest object with the `q` parameter
	let request = SearchRequest(q: "Lemmy-Swift-Client")
	// Send the request to the Lemmy API
	if let response = try? await api.request(request) {
		print(response)
	} else {
		print("Error")
	}
}

Luckily this just scratches the surface of what you can do with the Lemmy Swift Client. For more information checkout our documentation.

Resources

License

Lemmy Swift Client is available under the MIT license. See the LICENSE.

Maintainers

lemmy-swift-client's People

Contributors

fishcharlie avatar mdhiggins avatar ckaik avatar thenoim avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.