Latest 0.1.4
Homepage https://github.com/Appspia/ASNetworking
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

ASNetworking is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'ASNetworking'

Usage


let APIProvider: API = .development

enum API: ASNetworking {
    // Example for Server Type
    case development
    case production

    var baseUrl: String {
        switch self {
        case .development:
            return "https://rss.itunes.apple.com"
        case .production:
            return "https://rss.itunes.apple.com"
        }
    }
}

extension API {
    func topPodcasts(countryCode: String, count: Int) -> ASHttpResponse<Podcasts> {
        let requestData = ASRequestData(urlString: baseUrl + "/api/v1/(countryCode)/podcasts/top-podcasts/all/(count)/explicit.json")
        return httpRequest(requestData: requestData)
    }
}

// Use APIProvider
APIProvider.topPodcasts(countryCode: "us", count: 100).response { result in
    switch result {
    case .success(let item):
        // Do somthing for success
    case .failure:
        // Do somthing for failure
    }
}

Author

Appspia, [email protected]

License

ASNetworking is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "ASNetworking",
    "version": "0.1.4",
    "summary": "Simple HTTP Networking in Swift",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/Appspia/ASNetworking",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Appspia": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Appspia/ASNetworking.git",
        "tag": "0.1.4"
    },
    "platforms": {
        "ios": "8.0"
    },
    "swift_version": "4.2",
    "source_files": "ASNetworking/**/*"
}

Pin It on Pinterest

Share This