CocoaPods trunk is moving to be read-only. Read more on the blog, there are 16 months to go.

LivecenterKit 0.1.7

LivecenterKit 0.1.7

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jul 2016

Maintained by Hamza Ansari, Hamza Ansari.



  • By
  • Thoughtchimp

Introduction

Here are the detailed steps on how you can install Livecenter SDK in your iOS App. In case you have any trouble using or understanding this, please reach out to [email protected]

Requirements

  • iOS 8.0+
  • Xcode 7.3+

Setting up LivecenterKit

Import the Livecenter kit framework
import LivecenterKit
Integrate With Your App

To initialize the Livecenter Kit with your app’s credentials, pass them to setConsumerKey: secret: in your app’s AppDelegate.

Livecenter.sharedInstance.setConsumerKey(consumerKey, secret: consumerSecret)

Usage

Load Match List
Livecenter.sharedInstance.api.getMatchList { (matches, error) -> Void in
    // handle the response or error
}
Load Match Data
Livecenter.sharedInstance.api.getMatchData(matchId: 12) { (matchData, error) -> Void in
    // handle the response or error
}
Load Match Goals
Livecenter.sharedInstance.api.getMatchGoals(matchId: 12) { (goals, error) -> Void in
    // handle the response or error
}
Load Match Ticker
Livecenter.sharedInstance.api.getMatchTicker(matchId: 12) { (tickers, error) -> Void in
    // handle the response or error
}

Display Newsroom View

Import the Livecenter kit framework
import LivecenterKit
Create a LivecenterView
let livecenterView = LivecenterView(frame: CGRect(x: 0, y: 110, width: 320, height: 400))

//Set its delegate
livecenterView.delegate = self

//loadLivecenter match 'Liveblog' with matchId and count
  livecenterView.loadLivecenter(matchId: matchId, livecenterType: .Liveblog, count: 10)

//loadLivecenter match 'Social' with matchId and count
  livecenterView.loadLiveCenter(matchId: matchId, livecenterType: .Social, count: 10)
Handle LivecenterView delegate
func livecenterViewLoadFinish() {
 //livecenterView Loading Finish        
}

func livecenterViewEmptyPage() {
    //livecenterView Return Empty Page        
}

func livecenterViewLoadFailed(error: NSError) {
    //livecenter Return Error
      print(error.localizedDescription)
}