Swiftpack.co - benjaminbruch/Rick-and-Morty-Swift-API as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by benjaminbruch.
benjaminbruch/Rick-and-Morty-Swift-API v3.0
Swift implementation for the Rick and Morty API https://rickandmortyapi.com/
⭐️ 24
🕓 2 weeks ago
iOS macOS
.package(url: "https://github.com/benjaminbruch/Rick-and-Morty-Swift-API.git", from: "v3.0")

The Rick and Morty API Swift Client

Swift implementation to the awesome Rick and Morty API

Swift codecoverage license

Table of Contents

Installation

For instructions how to add a Swift package to your projects look here:

Apple - Adding package dependencies to your app

Usage

Example to get all characters as an array of character struct:

1. Init client:

let rmClient = RMClient()

2. Request array of characters from server

do {
  let characters = try await rmClient.character().getAllCharacters()
} catch (let error) {
  print(error) 
}

For more examples, please refer to the Documentation or visit Test Section

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the repo and create your branch from master.
  2. If you've added code that should be tested, add tests.
  3. If you've changed APIs, update the documentation.
  4. Ensure the test suite passes.
  5. Issue that pull request!

License

Distributed under the MIT License. See LICENSE for more information.

Contact

linkedINContact

Acknowledgements

GitHub

link
Stars: 24
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Async/Await
2 weeks ago

With this version the whole client had been updated use the new async/await functionality

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics