Ruby gem for Lagotto application
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
doc update dos Jan 8, 2016
examples
ignore dropped alerts for now since I cant test Nov 21, 2015
lib
pkg
test
.gitignore
.travis.yml
CHANGELOG.md
CONDUCT.md
Gemfile
Gemfile.lock
LICENSE
README.md update docs and readme Jan 8, 2016
Rakefile
lagotto-rb.gemspec

README.md

lagotto-rb

Build Status gem version codecov.io

A Ruby client for the Lagotto application for article level metrics data

This is alpha software, so expect changes

Other Lagotto clients:

Changes

For changes see the Changelog

API

Methods in relation to Lagotto API routes

  • /works - Lagotto.works()
  • /works_sources - Lagotto.works_sources()
  • /events - Lagotto.events()
  • /publishers - Lagotto.publishers()
  • /groups - Lagotto.groups()
  • /references - Lagotto.references()
  • /work_types - Lagotto.work_types()
  • /docs - Lagotto.docs()
  • /relation_types - Lagotto.relation_types()
  • /sources - Lagotto.sources()
  • /recommendations - Lagotto.recommendations()
  • /status - Lagotto.status()

Install

Release version

gem install lagotto-rb

Development version

Install dependencies

git clone git@github.com:sckott/serrano.git
cd serrano
rake install

In Ruby repl

Get altmetrics by DOI

Lagotto.works(ids: 'http://doi.org/10.15468/DL.SQNY5P', instance: "crossref")

Search for altmetrics by source

Lagotto.works(source: 'twitter', instance: "crossref")

Make a /works route request by source

Lagotto.works_sources(source: 'twitter', per_page: 2)

Make a /events route request

Lagotto.events(ids: '10.1371/journal.pone.0029797', instance: "crossref")

Make a /publishers route request

Lagotto.publishers(id: 340)

Make a /groups route request

Lagotto.groups()

Make a /references route request

Lagotto.references(per_page: 5, instance: 'crossref')

On the CLI

~$ lagotto
Commands:
  lagotto help [COMMAND]  # Describe available commands or one specific command
  lagotto version         # Get lagotto-rb version
  lagotto works [ids]     # Get works by ids
# A single id
~$ lagotto works http://doi.org/10.1371/journal.pone.0025110

DOI: 10.1371/journal.pone.0033693
type: journal-article
title: Methylphenidate Exposure Induces Dopamine Neuron Loss and Activation of Microglia in the Basal Ganglia of Mice

# JSON output
~$ lagotto works --limit=2 --json

{"meta":{"status":"ok","message-type":"work-list", ...

# JSON output, parse with jq
~$ lagotto works --limit=2 --json | jq .works[].DOI

"10.1371/journal.pgen.1005692"
"10.1371/journal.pgen.1005425"

Meta

  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
  • License: MIT