Latest 0.1.1
Homepage https://github.com/SMACKHigh/PubNubSimpleHistory
License MIT
Platforms ios 8.0, requires ARC
Dependencies PubNub
Authors ,

[![CI Status](http://img.shields.io/travis/Terry Xu/PubNubSimpleHistory.svg?style=flat)](https://travis-ci.org/Terry Xu/PubNubSimpleHistory)
Version
License
Platform

Usage

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

Methods

Download messages from now backward in time, until limit is reached or end of channel history is reached. Messages are returned in chronological order (oldest to newest). Useful to get latest messages in a channel.

public func downloadLatestMessages(inChannel: String, 
    limit: Int, 
    pageSize: Int? = default, 
    completion: ([[String : AnyObject]], PNErrorStatus?) -> Void)

Download messages from now backward in time, until limit is reached, reached a certain point in time, or end of channel history is reached. Messages are returned in chronological order (oldest to newest). Useful to get latest messages in a channel where messages beyond a certain age are no longer valuable.

public func downloadLatestMessagesNewerThan(inChannel: String, 
    limit: Int?, 
    newerThan: NSNumber? = default, 
    pageSize: Int? = default, 
    completion: ([[String : AnyObject]], PNErrorStatus?) -> Void)

Download messages from a given timetoken backward in time, until the limit is reached or end of channel history is reached. Messages are returned in chronological order (oldest to newest). Useful to get older messages from a known time, e.g. pagination.

public func downloadMessagesOlderThan(inChannel: String,
    limit: Int, 
    olderThan: NSNumber, 
    pageSize: Int? = default, 
    completion: ([[String : AnyObject]], PNErrorStatus?) -> Void)

Requirements

Installation

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

pod "PubNubSimpleHistory"

Publishing

pod trunk push PubNubSimpleHistory.podspec 

Author

Terry Xu @coolnalu

Kevin Flynn @KevinMarkFlynn

License

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

Latest podspec

{
    "name": "PubNubSimpleHistory",
    "version": "0.1.1",
    "summary": "An easier-to-understand extension for PubNub history API",
    "description": "PubNub history API is a bit hard to wrap head around. We've added some convenient methods to make it easier to use.",
    "homepage": "https://github.com/SMACKHigh/PubNubSimpleHistory",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Terry Xu": "https://twitter.com/coolnalu",
        "Kevin Flynn": "https://twitter.com/KevinMarkFlynn"
    },
    "source": {
        "git": "https://github.com/SMACKHigh/PubNubSimpleHistory.git",
        "tag": "0.1.1"
    },
    "social_media_url": "https://twitter.com/coolnalu",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "dependencies": {
        "PubNub": []
    }
}

Pin It on Pinterest

Share This