[][src]Function dishub::ops::github::poll_repo_events_update

pub fn poll_repo_events_update(
    slug: &str,
    e_tag: &str,
    tokens: &AppTokens
) -> Result<(Option<(String, String)>, u64), Error>

Get the events for a repository when you already have an ETag (which is to say - after the first time).

If the event list hasn't changed the first element of the returned tuple will be None, otherwise it's a tuple of:

The second element always constains the next minimum amount of milliseconds polling the same event queue is permitted.

Examples

let (changed, next) = poll_repo_events_update("nabijaczleweli/dishub", prev_etag, &tokens).unwrap();
if let Some((response, etag)) = changed {
    // The feed changed
}