0.0
No commit activity in last 3 years
No release in over 3 years
Gem wrapping biostars.org public API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.7.9, ~> 1.7
>= 2.12.4, ~> 2.12
>= 2.4.4, ~> 2.4
>= 5.5.1, ~> 5.5
>= 1.0.11, ~> 1.0
~> 10.0
>= 1.2.1, ~> 1.2
>= 2.9.3, ~> 2.9
>= 1.20.4, ~> 1.20

Runtime

~> 0.13.3
>= 1.8.2, ~> 1.8
 Project Readme

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