Latest 0.3.4
Homepage https://github.com/stuartbreckenridge/DetailedProductsKit
License MIT
Platforms ios 12.1, osx 10.14
Authors

Build Status
codecov
CodeFactor
Version
License
Platform

DetailedProductsKit is a Swift library for iOS and macOS that manages all interaction with the the Franklin Templeton Detailed Products API.

Note

In order to use DetailedProductsKit you first need to register, create an app, and obtain credentials on the Franklin Templeton Developer portal.

Features

  • [x] Authentication with the API
  • [x] Data download
  • [x] JSON decoding
  • [x] Error handling
  • [x] Response caching
  • [x] Get up and running three lines of code

Requirements

  • iOS 12.1+
  • Xcode 10.1+
  • Swift 4.2+

Installation

DetailedProductsKit is available through CocoaPods. To integrate DetailedProductsKit into your project add the following line to your Podfile and then run pod install:

pod 'DetailedProductsKit'

Basics

The functionality offered by DetailedProductsKit is surfaced through the DetailedProductsAPI class.

Configuration

Add the following import declaration to the class where you want to use the API:

import DetailedProductsKit

Create a constant:

let productsAPI = DetailedProductsAPI(key: <#CONSUMER_KEY#>, secret: <#CONSUMER_SECRET#>)

Usage

After productsAPI is initialised, you can call any of the supported API endpoints. For example, to get the latest fund NAV data:

productsAPI.getFundNav(fundKey: "US8802081039", fundKeyType: .ISIN) { (fundNav, error) in
    // Your code
}

Caching

DetailedProductsAPI will cache responses to API requests to improve performance.

If you need to remove cached responses call the following method:

productsAPI.removeAllCachedResponses()

Example App

An example app is included. Change this line in ViewController to include your consumer key and secret:

let productsAPI = DetailedProductsAPI(key: "CONSUMER_KEY", secret: "CONSUMER_SECRET")

Then launch the app.

Author

Stuart Breckenridge

License

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

Latest podspec

{
    "name": "DetailedProductsKit",
    "version": "0.3.4",
    "summary": "`DetailedProductsKit` manages all interactionu2014authentication, data download, and parsingu2014with the Franklin Templeton Detailed Products API.",
    "swift_version": "4.2",
    "platforms": {
        "ios": "12.1",
        "osx": "10.14"
    },
    "description": "`DetailedProductsKit` supports all v1 endpoints offered by the Franklin Templeton Detailed Products API. To make use of this framework, you need to register on the Franklin Templeton Developer Portal, create an app, and then provide your API credentials as outlined in the README.",
    "homepage": "https://github.com/stuartbreckenridge/DetailedProductsKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Stuart Breckenridge": "[email protected]"
    },
    "source": {
        "git": "https://github.com/stuartbreckenridge/DetailedProductsKit.git",
        "tag": "0.3.4"
    },
    "social_media_url": "https://twitter.com/stuarticus",
    "source_files": "DetailedProductsKit/Classes/**/*"
}

Pin It on Pinterest

Share This