Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
This gem provides a common API to multiple APIs. See the server for a deployment.
To add support for new APIs, see the documentation for Request and Response.
In this example, we convert generic API parameters to an OpenCorporates API URL, and request the URL with Faraday. Then, we convert the OpenCorporates API response to a generic API response.
require 'whos_got_dirt'
require 'faraday'
input = {
'subject' => [{
'name~=' => 'John Smith',
}],
'jurisdiction_code|=' => ['gb', 'ie'],
'role' => 'director',
'inactive' => false,
}
url = WhosGotDirt::Requests::Relation::OpenCorporates.new(input).to_s
#=> "https://api.opencorporates.com/officers/search?q=John+Smith&jurisdiction_code=gb%7Cie&position=director&inactive=false&order=score"
response = Faraday.get(url)
results = WhosGotDirt::Responses::Relation::OpenCorporates.new(response).to_a
#=> [{"@type"=>"Relation",
# "subject"=>
# {"name"=>"JOHN SMITH",
# "contact_details"=>[],
# "occupation"=>"CONTRACTS DIRECTORS"},
# "object"=>
# {"name"=>"IMPERIAL DUCTWORK SERVICES HOLDINGS LIMITED",
# "identifiers"=>[{"identifier"=>"08484366", "scheme"=>"Company Register"}],
# "links"=>[{"url"=>"https://opencorporates.com/companies/gb/08484366", "note"=>"OpenCorporates URL"}],
# "jurisdiction_code"=>"gb"},
# "start_date"=>"2013-04-30",
# "identifiers"=>[{"identifier"=>"71863990", "scheme"=>"OpenCorporates"}],
# "links"=>[{"url"=>"https://opencorporates.com/officers/71863990", "note"=>"OpenCorporates URL"}],
# "updated_at"=>"2014-10-13T13:57:58+00:00",
# "current_status"=>"CURRENT",
# "jurisdiction_code"=>"gb",
# "role"=>"director",
# "sources"=>[{"url"=>"https://api.opencorporates.com/officers/search?inactive=false&jurisdiction_code=gb%7Cie&order=score&position=director&q=John+Smith", "note"=>"OpenCorporates"}]},
# ...]
Most terms are from Popolo. The request and response formats are inspired from the Metaweb Query Language and the OpenRefine Reconciliation Service API.
Copyright (c) 2015 James McKinney, released under the MIT license
FAQs
Unknown package
We found that whos_got_dirt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.