{"id":13696016,"url":"https://github.com/ElfSundae/ESAPIClient","last_synced_at":"2025-05-03T14:30:45.503Z","repository":{"id":56909473,"uuid":"192865949","full_name":"ElfSundae/ESAPIClient","owner":"ElfSundae","description":"An API client library built on top of AFNetworking.","archived":false,"fork":false,"pushed_at":"2021-03-18T12:26:45.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-19T14:20:18.771Z","etag":null,"topics":["afnetworking","api","api-client","http","ios","network","networking","request"],"latest_commit_sha":null,"homepage":"","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/ElfSundae.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":"2019-06-20T06:53:35.000Z","updated_at":"2021-03-18T12:26:37.000Z","dependencies_parsed_at":"2022-08-20T19:50:31.809Z","dependency_job_id":null,"html_url":"https://github.com/ElfSundae/ESAPIClient","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElfSundae%2FESAPIClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElfSundae%2FESAPIClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElfSundae%2FESAPIClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElfSundae%2FESAPIClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElfSundae","download_url":"https://codeload.github.com/ElfSundae/ESAPIClient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252203144,"owners_count":21710897,"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":["afnetworking","api","api-client","http","ios","network","networking","request"],"created_at":"2024-08-02T18:00:35.590Z","updated_at":"2025-05-03T14:30:44.957Z","avatar_url":"https://github.com/ElfSundae.png","language":"Objective-C","readme":"# ESAPIClient\n\n[![Build status](https://github.com/ElfSundae/ESAPIClient/workflows/Build/badge.svg)](https://github.com/ElfSundae/ESAPIClient/actions?query=workflow%3ABuild)\n![CocoaPods](https://img.shields.io/cocoapods/v/ESAPIClient)\n![CocoaPods platforms](https://img.shields.io/cocoapods/p/ESAPIClient)\n\nESAPIClient is an API client library built on top of [AFNetworking](https://github.com/AFNetworking/AFNetworking).\n\n## Requirements\n\n- Minimum deployment target: iOS 9.0, macOS 10.10, watchOS 2.0, tvOS 9.0\n\n## Installation\n\n```ruby\npod 'ESAPIClient'\n```\n\nIf you are using AFNetworking 3.x, you need to add my spec-repo source URL before the Trunk source in your `Podfile`:\n\n```ruby\nsource 'https://github.com/ElfSundae/CocoaPods-Specs.git'\nsource 'https://cdn.cocoapods.org/'\n\ntarget 'Example' do\n    pod 'ESAPIClient'\nend\n```\n\n## Usage\n\n### Setup the default API client for your application\n\n```objc\nNSURL *baseURL = [NSURL URLWithString:@\"https://api.github.com\"];\nESAPIClient *client = [[ESAPIClient alloc] initWithBaseURL:baseURL];\nclient.fileMultipartName = @\"uploadFile\";\nESAPIClient.defaultClient = client;\n```\n\n### Sending API requests\n\n#### GET\n\n```objc\n[ESAPIClient.defaultClient GET:@\"api/path\" parameters:@{ @\"foo\": @\"bar\" } success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {\n    //\n} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {\n    //\n}];\n```\n\n#### Uploading file\n\n```objc\n[ESAPIClient.defaultClient uploadFile:fileURL\n                                   to:@\"upload/avatar\"\n                           parameters:@{ @\"foo\": @\"bar\" }\n                             progress:^(NSProgress * _Nonnull progress) {\n    dispatch_async(dispatch_get_main_queue(), ^{\n        progressView.progress = progress.fractionCompleted;\n    });\n} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {\n    //\n} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {\n    //\n}];\n```\n\n#### Downloading file\n\n```objc\n[ESAPIClient.defaultClient download:@\"download/file.zip\" toFile:destFile parameters:nil progress:nil success:^(NSURLSessionDownloadTask * _Nonnull task, NSURL * _Nonnull filePath) {\n    //\n} failure:^(NSURLSessionDownloadTask * _Nullable task, NSError * _Nonnull error) {\n    //\n}];\n\n[ESAPIClient.defaultClient download:@\"https://example.com/file.zip\" toDirectory:destDir parameters:nil progress:nil success:^(NSURLSessionDownloadTask * _Nonnull task, NSURL * _Nonnull filePath) {\n    //\n} failure:^(NSURLSessionDownloadTask * _Nullable task, NSError * _Nonnull error) {\n    //\n}];\n```\n\n## License\n\nESAPIClient is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","funding_links":[],"categories":["Networking"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FElfSundae%2FESAPIClient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FElfSundae%2FESAPIClient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FElfSundae%2FESAPIClient/lists"}