1\name{get_latest_tweet_id}
2\alias{get_latest_tweet_id}
3\title{
4A function to retrieve the most recent tweet ID from a database
5}
6\description{
7Given a registered database backend which contains a table of tweets, will return the
8ID of the most recent tweet stored in that table
9}
10\usage{
11get_latest_tweet_id(table_name = "tweets")
12}
13\arguments{
14  \item{table_name}{The name of the table in the database containing tweets}
15}
16\details{
17A wrapper around a \code{select max(id)} on the \code{table_name}
18}
19\value{
20The ID of the most recent tweet in the table, or a \code{\link{stop}} if the table is empty
21}
22\author{Jeff Gentry}
23\seealso{\code{\link{register_db_backend}}}
24\examples{
25   \dontrun{
26      register_sqlite_backend("sqlit_file")
27      get_latest_tweet_id("rstats_tweets")
28   }
29}
30\keyword{utilities}