openfood
Version, currently master branch1 version
- master branchlatestFeb 4, 2017
github.com/denysvitali/crystal-openfood
Crystal openfood.ch library
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
openfood:
github: denysvitali/crystal-openfood
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.20.5- License
- MIT
- Author
- Denys Vitali
Dependencies
This version declares no dependencies.
README
openfood
Crystal module for openfood.ch
OpenFood is an independent and open database of barcoded edible products sold in Switzerland. It is maintained by the Digital Epidemiology Laboratory of EPFL and gratefully acknowledges access to the shops of Coop and Migros (Switzerland).
This module is still in development, contribute if you can :+1:
Installation
Add this to your application's shard.yml:
dependencies:
openfood:
github: denysvitali/openfood
Usage
require "openfood"
getProducts
result = OpenFood.getProducts(50) #Gets 50 products
# result is of type OpenFood::Pagination
result.data.each do |el|
# el is of type OpenFood::Product (see src/openfood/responses/Product.cr)
if el.attributes.name != nil
puts el.attributes.name
end
end
Contributing
- Fork it ( https://github.com/denysvitali/openfood/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
Contributors
- denysvitali Denys Vitali - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Feb 4, 2017
- Crystal
0.20.5- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/denysvitali/crystal-openfood
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1