{"id":26534800,"url":"https://github.com/jromaing/mangadexlib","last_synced_at":"2025-03-21T20:20:20.222Z","repository":{"id":48064872,"uuid":"259356259","full_name":"JRomainG/MangaDexLib","owner":"JRomainG","description":"A cross-platform Swift framework to interact with the MangaDex website","archived":false,"fork":false,"pushed_at":"2021-08-09T10:25:27.000Z","size":992,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T16:15:52.369Z","etag":null,"topics":["frameworks","ios","library","macos","macosx","manga","mangadex","swift"],"latest_commit_sha":null,"homepage":"https://jean-romain.com/MangaDexLib","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JRomainG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-27T14:41:55.000Z","updated_at":"2022-03-04T21:40:13.000Z","dependencies_parsed_at":"2022-08-12T17:50:27.757Z","dependency_job_id":null,"html_url":"https://github.com/JRomainG/MangaDexLib","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JRomainG%2FMangaDexLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JRomainG%2FMangaDexLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JRomainG%2FMangaDexLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JRomainG%2FMangaDexLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JRomainG","download_url":"https://codeload.github.com/JRomainG/MangaDexLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244861088,"owners_count":20522549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frameworks","ios","library","macos","macosx","manga","mangadex","swift"],"created_at":"2025-03-21T20:20:18.302Z","updated_at":"2025-03-21T20:20:20.213Z","avatar_url":"https://github.com/JRomainG.png","language":"Swift","readme":"# MangaDexLib\n\n`MangaDexLib` is a cross-platform Swift framework to interact with the [MangaDex](https://mangadex.org) website. Its goal is to offer a robust abstract interface to access the API's core features.\n\n**Note:** The official MangaDex API is currently in a [read-only state](https://twitter.com/MangaDexRE/status/1391016884514996225) and some features might not be available yet.\n\n## Installing\n\nMangaDexLib requires Swift 5 or newer.\n\n### CocoaPods\n\nMangaDexLib is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:\n\n```ruby\npod 'MangaDexLib'\n```\n\n### Carthage\n\nMangaDexLib is available [Carthage](https://github.com/Carthage/Carthage). To install it, simply add the following line to your Cartfile:\n\n```ruby\ngithub \"JRomainG/MangaDexLib\"\n```\n\n### Swift Package Manager\n\nMangaDexLib is available through [Swift Package Manager](https://github.com/apple/swift-package-manager). To install it, simply add the dependency to your Package.Swift file:\n\n```swift\n...\ndependencies: [\n    .package(url: \"https://github.com/JRomainG/MangaDexLib.git\", .branch(\"master\")),\n],\ntargets: [\n    .target(name: \"YourTarget\", dependencies: [\"MangaDexLib\"]),\n]\n...\n```\n\n### Sources\n\nIf you do not wish to use a package manager, you can also simply copy the `Sources` directory to your project.\n\n## Example usage\n\nHere are a few examples of how to use the API:\n\nTo get a list of mangas:\n\n```swift\nimport MangaDexLib\nlet api = MDApi()\napi.getMangaList { (res, error) in\n    print(res?.results)\n}\n```\n\nTo get a manga's chapters:\n\n```swift\nlet mangaId = \"32d76d19-8a05-4db0-9fc2-e0b0648fe9d0\" // Solo leveling\napi.getMangaFeed(mangaId: mangaId) { (res, error) in\n    print(res?.results)\n}\n```\n\nTo get a chapter's pages:\n\n```swift\nlet chapterId = \"eaaac5cc-07aa-412b-be50-9f342ceedffb\" // Eight volume 4 chapter 37.6 (en)\napi.viewChapter(chapterId: chapterId) { (res, error) in\n    let chapter = res?.object?.data\n    api.getChapterServer(chapterId: chapterId) { (node, error) in\n        print(chapter?.getPageUrls(node: node!, lowRes: false))\n    }\n}\n```\n\nTo login to a user's account:\n\n```swift\nlet credentials = MDAuthCredentials(username: \"username\", password: \"password\")\napi.login(credentials: credentials) { (error) in\n    print(api.sessionJwt)\n}\n```\n\nYou should also check out [Kitsune](https://github.com/JRomainG/Kitsune-macOS), an open-source reader for macOS built using MangaDexLib!\n\n## Documentation\n\nThe project is extensively documented through comments, and [Jazzy](https://github.com/realm/jazzy) is used to generate documentation. It is available from [this url](https://jean-romain.com/MangaDexLib), and updated each time a new version is released.\n\nYou can also access the official documentation for the MangaDex API [here](https://api.mangadex.org/docs.html).\n\n## Development\n\nTo install, simply checkout the `dev` branch of this repository:\n\n```bash\ngit clone https://github.com/JRomainG/MangaDexLib.git\ngit checkout dev\n```\n\nYou will then be able to open the `MangaDexLib.xcodeproj` project.\n\nThis project uses [SwiftLint](https://github.com/realm/SwiftLint) to enforce Swift style and conventions. It also implements unit tests using [XCTest](https://developer.apple.com/documentation/xctest), which try to cover as many features as possible.\n\n## Contributing\n\nIf you found a bug, or would like to see a new feature added, feel free to open an issue on the Github page. Pull requests are welcome!\n\nIf you can, also consider [supporting MangaDex](https://mangadex.org/support) and the team behind the website.\n\n## License\n\nThe project is available under the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html) license.\n\n## Disclaimer\n\nThis project is not related to the [MangaDex](https://mangadex.org) team, and is independently developed.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjromaing%2Fmangadexlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjromaing%2Fmangadexlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjromaing%2Fmangadexlib/lists"}