Gem Version Maintainability Test Coverage

Lmb Developers

A ruby wrapper for the Leroy Merlin Brazil Developers API available at Leroy Merlin Brazil Developer's Portal

Installation

Add this line to your application's Gemfile:

gem 'lmb-developers'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install lmb-developers

Usage

Configuration

To use the terminal use the following command:

$ irb -Ilib -rlmb/developers

# Pass environment and api_key to configure. Note: Use ENV variables to protect data in production environment
Lmb::Developers.configure('environment', ENV['LMB_API_KEY'])

The environment can be 'TEST' or 'PROD'.

You will need an API KEY that can be obtained at Leroy Merlin Brazil Developer's Portal

Example


#config/initilizers/lmb_developers.rb
Lmb::Developers.configure('DEV', ENV['LMB_API_KEY'])

#app/controller/login.rb
Lmb::Developers::Auth.("ldap_username", "ldap_password")

Methods

Ldap Login

Lmb::Developers::Auth.("ldap_username", "ldap_password", "ldap_usertype = employee")

Contributing

  1. Fork it ( https://github.com/somosprte/lmb-developers/fork )
  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

We are always keen to learn so please feel free to create an issue with code reviews, suggestions and possible refactorings.

TODOS

  • Docs
  • Tests
  • Other Methods