Repository is archived
No release in over 3 years
A Ruby gem that fetches the latest opportunities from the Gov.uk Digital Marketplace (https://www.digitalmarketplace.service.gov.uk/)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 0.12.0
~> 13.0
~> 3.0
~> 0.4.7
~> 4.0
~> 3.5

Runtime

~> 2.7
 Project Readme

Build Status Gem Version License

Marketplace Opportunity Scraper

A Ruby gem that fetches the latest opportunities from the Gov.uk Digital Marketplace.

Inspired by Convivio's Digital Marketplace Scraper

Installation

Add this line to your application's Gemfile:

gem 'marketplace_opportunity_scraper'

And then execute:

$ bundle

Or install it yourself as:

$ gem install marketplace_opportunity_scraper

You can then fetch the latest opportunities as follows:

require 'marketplace_opportunity_scraper'

opportunities = MarketplaceOpportunityScraper::Opportunity.all

opportunities.each do |o|
  o.id # An opportunity's ID
  o.url # The url of the opportunity
  o.title # The title of the opportunity
  o.buyer # The name of the client organisation
  o.location # Where the client is located
  o.published # When the opportunity was published
  o.question_deadline # Deadline for questions
  o.closing # Closing date
  o.description # Description of the opportunity
  o.budget # The budget
  o.skills # An array of required skills
end

Or you can get opportunities with a specific type (digital-outcomes, digital-specialists or user-research-participants):

opportunities = MarketplaceOpportunityScraper::Opportunity.all(type: 'digital-outcomes')

By default, the scraper gets only open opportunities, but you can get closed ones too:

opportunities = MarketplaceOpportunityScraper::Opportunity.all(status: 'closed')

You can also get an opportunity by its ID:

require 'marketplace_opportunity_scraper'

opportunity = MarketplaceOpportunityScraper::Opportunity.find(123)

Development

After checking out the repo, run bundle install to install dependencies. Then, run rake to run the tests.

To install this gem onto your local machine, run bundle exec rake install.

To release a new version, update the version number in marketplace_opportunity_scraper/version.rb, commit the change and then create a git tag for that version in the format x.x.x (where x is each version number). Github Actions will then automatically push the latest version to Rubygems.

Contributing

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

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

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