0.0
No release in over a year
The Wikirate4ruby is an open-source ruby library for the Wikirate API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.7.4
 Project Readme

Wikirate4ruby

Wikirate4ruby is a ruby library for the Wikirate API licensed under GNU GPL v3.

Installation

gem install wikirate4ruby

Usage

# Initializing client
client = Wikirate4ruby::REST::Client.new("YOUR_API_TOKEN")

#get a company given the name or wikirate id
company = client.get_company("Adidas_AG")
#get a company's answers
answers = client.get_company_answers(company.id, { 'year' => 2022 })
#create a new company
wikirate = client.add_company({ 'name' => 'Wikirate International e.V.', 'headquarters' => 'Germany' })
#add answer to metric
address = client.add_research_answer({ 'metric_name' => 'Address',
                                       'metric_designer' => 'Commons',
                                       'year' => 2023,
                                       'value' => "Schlimannstrasse 29, Berlin",
                                       'company' => wikirate.id,
                                       'source' => 'Source-123' })

Detail documentation about configuration and all available methods of the client can be found on the next section.

Documentation

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/wikirate/wikirate4ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

Code of Conduct

Everyone interacting in the Wikirate4ruby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

🎉 Acknowledgements

This project was supported by NLnet foundation.

Image