GithubHelp home page GithubHelp logo

epo-ops's Introduction

Build Status Code Climate

epo-ops

Ruby interface to the EPO Open Patent Services (OPS).

Full documentation can be found here

Usage

Quickstart

Simply install this gem and start a ruby console.

$ gem install epo-ops
$ irb

and start querying the API

require 'epo_ops'

patent_application = EpoOps::PatentApplication.find("EP14731659")
patent_application.title  # "DEVICE AND METHOD FOR INTRODUCING FIBRES INTO AN EXTRUDER"
patent_application.classifications # ["B29C47/10", "B29C47/68", "B29C47/92", "B29C45/00", "B01D46/24"]
patent_application.applicants.first.name # "Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V."

Supported Ruby Versions

For supported versions see .travis.yml. We try to keep it updated to officially supported Ruby versions.

Advanced Usage

OAuth

EPO offers an anonymous developer access to their API with very little quota. To get extended quotas you can register an account at the EPO for OAuth

After your account has been approved configure your credentials

EpoOps.configure do |conf|
  conf.authentication = :oauth
  conf.consumer_key = "YOUR_KEY"
  conf.consumer_secret = "YOUR_SECRET"
end

The temporary access token is kept in memory for subsequent retrievals. To share this between several processes the token storage strategy may be changed as shown in epo/ops/token_store for redis.

Querying and searching patent applications

Currently this gem focuses mostly around patent applications. It is possible to search for specific applications by application number and to search for applications using a CQL search query

For example to find all applications in IPC Class A01 (and all subclasses) that were updated on 2016-01-01

query = EpoOps::SearchQueryBuilder.build("A01", Date.parse("2016-01-06"))
applications = EpoOps::PatentApplication.search(query)
applications.count #=> 66
applications.map {|application| puts application.application_nr } # print all application numbers
applications.map {|application| application.fetch} # fetch complete bibliographic data for each document

The Request will return a search result containing the number of all applications matching the search. By default the search will return 10 documents (max is 100). You can use start_rang and end_range of EpoOps::SearchQueryBuilder.build to page through all results

Note: EPO will always only return up to 2000 documents even if the search would return more

Search for all Patents on a given Date

To circumvent the restriction of max 2000 search results this gem offers a convenient method to search for all patents updated on a given date and/or a given IPC class

EpoOps::Register.search("A", Date.new(2016,2 ,3))
# or for all ipc classes
EpoOps::Register.search(nil, Date.new(2016,2 ,3))

You can now retrieve the bibliographic entries of all these:

patent_applications = EpoOps::Register.search(nil, Date.new(2016,2 ,3))
patent_applications.count == patent_applications.patents.count #=> true

Note: Both operations take a considerable amount of time. Also you may not want to develop and test with many of these requests, as they can quite quickly exceed your limits.

Further Reading

The EPO provides a developer playground, where you can test-drive the OPS-API. They also provide extensive documentation of the different endpoints and how to use them (see the 'Downloads' section).

Development

This gem is still an early version and it is far from covering the whole API. If you are interested to include different API endpoints than the register it should be easy to include those and we are happy to accept pull requests.

epo-ops's People

Contributors

darthmax avatar tamaloa avatar telzul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

epo-ops's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.