https://github.com/ananace/ruby-webhallen
Gem to access the Webhallen store API
https://github.com/ananace/ruby-webhallen
Last synced: 21 days ago
JSON representation
Gem to access the Webhallen store API
- Host: GitHub
- URL: https://github.com/ananace/ruby-webhallen
- Owner: ananace
- License: mit
- Created: 2020-11-21T15:43:10.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-10T09:57:21.000Z (almost 4 years ago)
- Last Synced: 2025-11-16T12:23:47.158Z (8 months ago)
- Language: Ruby
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Webhallen
Just a simple gem to access the Webhallen online store API
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'webhallen'
```
And then execute:
$ bundle install
Or install it yourself as:
$ gem install webhallen
## Usage
```ruby
require 'webhallen'
result = Webhallen.search Webhallen::Query.new.with_category(47).with_text('pulse')
# => { products: [...], totalProductCount: 4 }
result[:products].first.name
# => "SAPPHIRE PULSE Radeon RX 580 8G Dual OC"
result[:products].first.in_stock?
# => true
prod = Webhallen::Product.get_by_id 312784
# => #
prod.name
# => "SAPPHIRE PULSE Radeon RX 580 8G Dual OC"
prod.pretty_price
# => "2199.00 SEK"
```
## Contributing
Bug reports and pull requests are welcome [on GitHub](https://github.com/ananace/ruby-webhallen).
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).