Giter Site home page Giter Site logo

apillet / octopussy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from octokit/octokit.rb

1.0 2.0 0.0 296 KB

Simple Ruby wrapper for the GitHub v2 API and feeds

Home Page: http://wynnnetherland.com/projects/octopussy

License: MIT License

Ruby 100.00%

octopussy's Introduction

octopussy

Simple Ruby wrapper for the GitHub v2 API.

Installation

sudo gem install octopussy

Some examples

Show a user

Octopussy.user('pengwynn')
=> <#Hashie::Mash blog="http://wynnnetherland.com" company="Orrka" created_at="2008/02/25 10:24:19 -0800" email="[email protected]" followers_count=21 following_count=55 id=865 location="Dallas, TX" login="pengwynn" name="Wynn Netherland" public_gist_count=4 public_repo_count=16>

Show who a user follows

Octopussy.following('pengwynn')
=> ["cglee", "bryansray", "rails", "zachinglis", "wycats", "obie", "mully", "squeejee", "jderrett", "Shopify", "ReinH", "technoweenie", "errfree", "defunkt", "joshsusser", "hashrocket", "newbamboo", "bigtiger", "github", "jamis", "jeresig", "thoughtbot", "therealadam", "jnunemaker", "seaofclouds", "choan", "llimllib", "kwhinnery", "marshall", "handcrafted", "adamstac", "jashkenas", "dan", "remy", "hayesdavis", "documentcloud", "imathis", "mdeiters", "njonsson", "asenchi", "mattsa", "marclove", "webiest", "brogers", "polomasta", "stephp", "mchelen", "piyush", "davidnorth", "rmetzler", "jferris", "madrobby", "zh", "erikvold", "desandro"]

Working with repositories

For convenience, methods that require a repo argument may be passed in any of the following forms

  • "pengwynn/linked"
  • {:username => 'pengwynn', :name => 'linkedin'}
  • {:username => 'pengwynn', :repo => 'linkedin'}
  • instance of Repo

Show a repo

Octopussy.repo("pengwynn/linkedin")
=> <#Hashie::Mash description="Ruby wrapper for the LinkedIn API" fork=false forks=1 homepage="http://bit.ly/ruby-linkedin" name="linkedin" open_issues=2 owner="pengwynn" private=false url="http://github.com/pengwynn/linkedin" watchers=36>

Authenticated requests

Some methods require authentication so you'll need to pass a login and an api_token. You can find your GitHub API token on your account page

client = Octopussy::Client.new(:login => 'pengwynn', :token => 'OU812')
client.follow!('adamstac')

Read the full docs or check out the examples

TODO

  • Feed parsing
  • More examples

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Credits

Octopussy is inspired by Octopi and aims to be a lightweight, less active-resourcey alternative.

Copyright

Copyright (c) 2009 Wynn Netherland, Adam Stacoviak. See LICENSE for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.