Ruby gem for Lagotto application
Ruby
Latest commit 7ea8161 Jan 8, 2016 @sckott sckott update lock file
Permalink
Failed to load latest commit information.
bin udpated readme, fixes to cli tool Jan 8, 2016
doc update dos Jan 8, 2016
examples
ignore dropped alerts for now since I cant test Nov 21, 2015
lib update dos Jan 8, 2016
pkg fixed up cli tool, just works route for now, fix #6 Nov 21, 2015
test fixed test, removed info param from works method Nov 19, 2015
.gitignore added gitignore, updates Nov 17, 2015
.travis.yml add travis file Nov 18, 2015
CHANGELOG.md update docs and readme Jan 8, 2016
CONDUCT.md
Gemfile
Gemfile.lock
LICENSE added license and changed news to changelog Jan 8, 2016
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