A ruby wrapper for the Leroy Merlin Brazil Developers API available at Leroy Merlin Brazil Developer's Portal
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
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
#config/initilizers/lmb_developers.rb
Lmb::Developers.configure('DEV', ENV['LMB_API_KEY'])
#app/controller/login.rb
Lmb::Developers::Auth.login("ldap_username", "ldap_password")
Ldap Login
Lmb::Developers::Auth.login("ldap_username", "ldap_password", "ldap_usertype = employee")
- Fork it ( https://github.com/somosprte/lmb-developers/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - 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.
- Docs
- Tests
- Other Methods