Sha256: aad65b9f63c01578f2f56a9eb894a6af769e1d807a4d7a816c41e07ca20e2ce8

Contents?: true

Size: 1.54 KB

Versions: 4

Compression:

Stored size: 1.54 KB

Contents

# Celsius::Primo

[![Build Status](https://travis-ci.org/ubpb/celsius-primo.svg?branch=master)](https://travis-ci.org/ubpb/celsius-primo)
[![Test Coverage](https://codeclimate.com/github/ubpb/celsius-primo/badges/coverage.svg)](https://codeclimate.com/github/ubpb/celsius-primo)
[![Code Climate](https://codeclimate.com/github/ubpb/celsius-primo/badges/gpa.svg)](https://codeclimate.com/github/ubpb/celsius-primo)

Celsius::Primo aims to provide an adapter layer above various Primo apis. The goal is, to use primo in a way similar to Elasticsearch by translating Elasticsearch requests to Primo requests and vice versa.

## Usage

```ruby
require "celsius/primo"

adapter = Celsius::Primo::Adapter.new({
  institution: "PAD",
  languages: [
    "ger",
    "eng"
  ],
  locations:[
    {
      type: "local",
      value: "scope:(PAD_ALEPH)"
    }
  ],
  soap_api_options: {
    searcher_url: "http://primo.kobv.de/primo_library/libweb/webservices/services/searcher"
  }
})

adapter.search({
  # Elasticsearch style search request
  from: 0,
  size: 20,
  query: {
    bool: {
      must: [
        query_string: {
          default_operator: "AND",
          fields: ["_all"],
          query: "linux"
        }
      ]
    }
  }
}) # => Elasticsearch style response
```

## Contributing

1. Fork it ( https://github.com/[my-github-username]/celsius-primo/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
celsius-primo-0.1.4 README.md
celsius-primo-0.1.3 README.md
celsius-primo-0.1.2 README.md
celsius-primo-0.1.1 README.md