Gem wrapping biostars.org public API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib/biostars
test
.gitignore
.travis.yml
Gemfile
LICENSE.txt
README.md
Rakefile
biostars-api.gemspec

README.md

biostars-api

Gem Version Build Status Inline docs

A wrapper for the biostars.org public API.

Biostars focuses on bioinformatics, computational genomics and biological data analysis.

Requirements

  • httparty
  • json

Installation

Add this line to your application's Gemfile:

gem 'biostars-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install biostars-api

Examples

# Retrieve the latest site traffic stats
traffic = Biostars::API.traffic
p traffic.post_views_last_60_min    # number of post views over the last hour

# Retrieve activity for the last 24 hours.
latest_info = Biostars::API::Stats.latest
p latest_info.new_users    # Arary of user ids [1,2,3..10]
p latest_info.comments     # Number of comments

# Retrieve an Array of the lastest users
latest_users = latest_info.all_users

# Get a specific Users information
user = Biostars::API::Stats.User.find(latest_users.first.id)
p user.id      # User id
p user.name    # Username

# The same can be achieved for Posts and Votes
latest_posts = latest_info.all_posts
latest_votes = latest_info.all_votes

Documentation

Contributing

  1. Fork it ( https://github.com/arian-amador/biostars-api/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