LaPoste - A simple Ruby gem to fetch tracking information from LaPoste

Build Status Gem Version Coverage Status

Installation

Add this line to your application's Gemfile:

gem 'la_poste'

And then execute:

$ bundle

Or install it yourself as:

$ gem install la_poste

How to use LaPoste

To fetch information from La Poste, use the LaPoste::Tracker class:

require 'la_poste'
tracker = LaPoste::Tracker.new("1A09920544793")

puts JSON::pretty_generate(tracker.data[:now])
{
  "tracker": "1A09920544793",
  "type": "Lettre Recommandée AR",
  "date": "13/08/2014",
  "zone": "75",
  "status": "Distribué"
}

puts JSON::pretty_generate(tracker.data[:logs].first)
{
  "date": "13/08/2014",
  "event": "Distribué, PARIS DESNOUETTES (75)" 
}

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request