{"id":1637,"url":"https://github.com/kanyun-inc/YTKNetwork","last_synced_at":"2025-08-02T04:32:07.692Z","repository":{"id":22666785,"uuid":"26010097","full_name":"kanyun-inc/YTKNetwork","owner":"kanyun-inc","description":"YTKNetwork is a high level request util based on AFNetworking.","archived":false,"fork":false,"pushed_at":"2021-04-22T09:05:44.000Z","size":653,"stargazers_count":6467,"open_issues_count":125,"forks_count":1653,"subscribers_count":241,"default_branch":"master","last_synced_at":"2024-11-27T22:03:23.915Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kanyun-inc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-31T09:33:15.000Z","updated_at":"2024-11-19T05:27:57.000Z","dependencies_parsed_at":"2022-07-15T16:47:36.845Z","dependency_job_id":null,"html_url":"https://github.com/kanyun-inc/YTKNetwork","commit_stats":null,"previous_names":["yuantiku/ytknetwork"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanyun-inc%2FYTKNetwork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanyun-inc%2FYTKNetwork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanyun-inc%2FYTKNetwork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanyun-inc%2FYTKNetwork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanyun-inc","download_url":"https://codeload.github.com/kanyun-inc/YTKNetwork/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227647752,"owners_count":17798595,"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":[],"created_at":"2024-01-05T20:15:52.000Z","updated_at":"2024-12-06T08:31:21.512Z","avatar_url":"https://github.com/kanyun-inc.png","language":"Objective-C","funding_links":[],"categories":["Networking","Objective-C","OOM-Leaks-Crash"],"sub_categories":["Video","Networks"],"readme":"YTKNetwork\n==========\n\n![License MIT](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)\n![Pod version](https://img.shields.io/cocoapods/v/YTKNetwork.svg?style=flat)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Platform info](https://img.shields.io/cocoapods/p/YTKNetwork.svg?style=flat)](http://cocoadocs.org/docsets/YTKNetwork)\n[![Build Status](https://api.travis-ci.org/yuantiku/YTKNetwork.svg?branch=master)](https://travis-ci.org/yuantiku/YTKNetwork)\n\n## What\n\nYTKNetwork is a high level request util based on [AFNetworking][AFNetworking]. It's developed by the iOS Team of YuanTiKu. It provides a High Level API for network request.\n\nYTKNetwork is used in all products of YuanTiKu, including: [YuanTiKu][YuanTiKu], [YuanSoTi][YuanSoTi], [YuanFuDao][YuanFuDao], [FenBiZhiBoKe][FenBiZhiBoKe].\n\n[**中文说明**](Docs/README_cn.md)\n\n## Features\n\n* Response can be cached by expiration time\n* Response can be cached by version number\n* Set common base URL and CDN URL\n* Validate JSON response\n* Resume download\n* `block` and `delegate` callback\n* Batch requests (see `YTKBatchRequest`)\n* Chain requests (see `YTKChainRequest`)\n* URL filter, replace part of URL, or append common parameter \n* Plugin mechanism, handle request start and finish. A plugin for show \"Loading\" HUD is provided\n\n## Who\n\nYTKNetowrk is suitable for a slightly more complex project, not for a simple personal project.\n\nYTKNetwork is helpful if you want to cache requests, manage the dependences of requests, or validate the JSON response. And if you want to cache requests based on request version, this is one of the greatest advantages of YTKNetwork.\n\n## Why \n\nYTKNetwork provides YTKRequest to handle every network request. You should inherit it and override some methods to define custom requests in your project.\n\nThe main idea is use the Command Pattern. The benefits are:\n\n * Your code is decoupled to detail network request framework, it's easy to replace it. Actually, YTKNetwork is originally based on ASIHttpRequest, we just spent two days to switch to AFNetworking.\n * Handle common logic in base class.\n * Easier Persistence\n\nBut YTKNetwork is not suitable if your project is very simple. You can use AFNetworking directly in controller.\n\n## Installation\n\nTo use YTKNetwork add the following to your Podfile\n\n    pod 'YTKNetwork'\n\nOr add this in your Cartfile:\n\n    github \"yuantiku/YTKNetwork\" ~\u003e 3.0\n\n## Requirements\n\n| YTKNetwork Version | AFNetworking Version |  Minimum iOS Target | Note |\n|:------------------:|:--------------------:|:-------------------:|:-----|\n| 3.x | 4.x | iOS 9 | Xcode 11+ is required. |\n| 2.x | 3.x | iOS 7 | Xcode 7+ is required. |\n| 1.x | 2.x | iOS 6 | n/a |\n\nYTKNetwork is based on AFNetworking. You can find more detail about version compatibility at [AFNetworking README](https://github.com/AFNetworking/AFNetworking).\n\n## Guide \u0026 Demo\n\n * [Basic Usage Guide](Docs/BasicGuide_en.md)\n * [YTKNetwork 2.0 Migration Guide(Simplified Chinese)](Docs/2.0_MigrationGuide_cn.md)\n\n## Contributors\n\n * [lancy][lancyGithub]\n * [maojj][maojjGithub]\n * [veecci][veecciGithub]\n * [tangqiaoboy][tangqiaoboyGithub]\n * [skyline75489][skyline75489Github]\n * [joeshang][joeshangGithub]\n\n## Acknowledgements\n\n * [AFNetworking]\n * [AFDownloadRequestOperation]\n\nThanks for their great work.\n\n## License\n\nYTKNetwork is available under the MIT license. See the LICENSE file for more info.\n\n\u003c!-- external links --\u003e\n\n[AFNetworking]:https://github.com/AFNetworking/AFNetworking\n[AFDownloadRequestOperation]:https://github.com/steipete/AFDownloadRequestOperation\n\n[YuanTiKu]:http://www.yuantiku.com\n[YuanSoTi]:http://www.yuansouti.com/\n[YuanFuDao]:http://www.yuanfudao.com\n[FenBiZhiBoKe]:http://ke.fenbi.com/\n[tangqiaoboyGithub]:https://github.com/tangqiaoboy\n[lancyGithub]:https://github.com/lancy\n[maojjGithub]:https://github.com/maojj\n[veecciGithub]:https://github.com/veecci\n[skyline75489Github]:https://github.com/skyline75489\n[joeshangGithub]:https://github.com/joeshang\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanyun-inc%2FYTKNetwork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanyun-inc%2FYTKNetwork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanyun-inc%2FYTKNetwork/lists"}