Display a Liveblog

To initialize and display a Liveblog you have to create a TickerRef (TApiTickerRef), assign a tickerId and retrieve a ViewController from the SDK to present it in your app.

Objective-C

TApiTickerRef *ref = [[TApiTickerRef alloc] init];
ref.tickerId = @"1234567890";
ref.showMeta = false;
ref.showScoreboard = false;

[TickarooSDK requestViewControllerForRef:ref callback:^(UIViewController<TickarooSDKController> *vc) {
    [self.navigationController pushViewController:vc animated:true];
}];

Swift

let ref = TApiTickerRef()
ref.tickerId = "1234567890"
ref.showMeta = false
ref.showScoreboard = false

TickarooSDK.requestViewController(for: ref) { [weak self] vc in
    vc.map {
        self?.navigationController?.pushViewController($0, animated: true)
    }
}    

Relevant properties of the TickerRef

The following properties are used to display a liveblog

Required

  • tickerId The id of the liveblog

Optional

  • limit Limit the number of events per request, default 15
  • loadMoreLimit Limit the number of events load more request, default 15
  • eventLocalId The deep linked event local id
  • tagFilter Comma separated list of tag ids to filter
  • showScoreboard Indicates whether to include the scoreboeard in the screen, default true
  • showMatches Indicates whether to includes matches if any, default true
  • showEvents Indicates whether to include events in the screen, default true
  • showLineup Indicates whether to include the lineup in the screen, default true
  • showEventMeta Indicates whether to include reporter information in events, default “off”

you can find the header in <TickarooSDK/TApiTickerRef.h>