15 releases
Uses old Rust 2015
| 0.1.14 | Dec 15, 2017 |
|---|---|
| 0.1.13 | Dec 14, 2017 |
#666 in HTTP client
46 downloads per month
47KB
866 lines
Foursquare provides a api bindings to the foursquare.com API
Examples
Typical use will require instantiation of a foursquare::Client.
This requires a version string, set of foursquare::Credentials
and a tokio_core Handle reference.
extern crate foursquare;
extern crate hyper;
extern crate tokio_core;
use tokio_core::reactor::Core;
use foursquare::{Credentials, Client};
fn main() {
let mut core = Core::new().expect("reactor fail");
let fs = Client::new(
"YYYYMMDD",
Credentials::client(
"client_id", "client_secret"
),
&core.handle()
);
}
Access to various services are provided via methods on instances of
the Client type.
The convention for executing operations typically looks like
client.venues().operation(&OperationOptions) where operation is the name
of the operation to perform
Errors
Operations typically result in a foursquare::Future Type which is an alias
for the the futures crates Future trait
with the Error type fixed to the
foursquare::Error type.
foursquare
a rust interface for foursquare
Documentation
See the examples directory for some inspiration
Install
Add the following to your Cargo.toml file
[dependencies]
foursquare = "0.1"
Doug Tangren (softprops) 2017
Dependencies
~13–18MB
~330K SLoC