Categories: None [Edit]
foxtrot-client
# Foxtrot Ruby Client Library
This is the Ruby client library for interacting with the Foxtrot API. The only endpoint currently exposed is the route optimization endpoint (`Foxtrot::Client.optimize!`).
In order to make requests, you need a valid API key. Your API key can be found at the bottom of any page in the [Foxtrot web app](http://app.foxtrot.io/).
## Installation
`gem install foxtrot-client`
## Usage
```ruby
data = {
file_url: "https://www.domain.io/your_file.xlsx",
file_name: "your_file.xlsx",
geocode: "false",
stop_name: "Customer",
lat: "Lat",
lng: "Long",
load: "Load",
service_time: "Service Time",
time_window: "Time Window",
extra_info: "Contact Info",
date_starting: "1407712069593",
warehouse: "77 Massachusetts Ave, Cambridge MA",
num_drivers: 1,
num_avg_service_time: 10,
float_fuel_cost: 3.56,
float_driver_wage: 6.01,
float_mpg: 8.32
}
api_key = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
require 'foxtrot'
fox = Foxtrot::Client.new api_key
resp = fox.optimize!(data).poll_and_block!
result = resp.get_result
```
Total
Ranking: 153,182 of 193,188
Downloads: 3,786
Daily
Ranking: 83,587 of 193,154
Downloads: 2
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 1 | 3,439,241,904 | bundler |
| 8 | 1,329,290,503 | rake |
| 16 | 1,190,124,879 | addressable |
| 72 | 605,055,053 | pry |
| 4,045 | 2,637,994 | rest_client |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | yasyf |