Coder Social home page Coder Social logo

bucketface's Introduction

bucketface

Simple Ruby wrapper for the Bitbucket API. (This code is based on octopussy)

Installation

sudo gem install bucketface

Some examples

Show a user

Bucketface.user('cored')
<#Hashie::Mash first_name="Rafael" last_name="George" resource_uri="/1.0/users/cored/" username="cored">

Show followers for a giving user

Bucketface.followers('cored')
[<#Hashie::Mash _state="<django.db.models.base.ModelState object at 0x66d8590>" avatar_id=nil cname=nil differ="udiff" digest="b0634325ca1a1bb69bd227f521b9b20c" email_notifications=false feature_per_user_pricing=true id=1600 location="Denver, CO" plan_id=7 user_id=1602 website="http://www.percious.com/">, <#Hashie::Mash _state="<django.db.models.base.ModelState object at 0x66d8f90>" avatar_id=nil cname=nil differ="udiff" digest="861e1c2f15e3fc5f55b32a1e10f6ec78" email_notifications=true feature_per_user_pricing=true id=7010 location=nil plan_id=7 user_id=7012 website=nil>, <#Hashie::Mash _state="<django.db.models.base.ModelState object at 0x66d88d0>" avatar_id=nil cname=nil differ="udiff" digest="24c19e325a62a293c26c2f38ee62f6ef" email_notifications=true feature_per_user_pricing=true id=1906 location="Detroit, Michigan, USA" plan_id=7 user_id=1908 website="http://lost-theory.org/">]

Working with repositories

Methods that require a repo argument may be passed in any of the following forms

  • "cored/test-repo"
  • {:username => 'cored', :name => 'test-repo'}
  • {:username => 'cored', :repo => 'test-repo'}
  • instance of Repo

Show a repo

Bucketface.repo("cored/test-repo")
<#Hashie::Mash description="Testing ticketmaster with this repo" followers_count=1 name="test-repo" slug="test-repo" website="">

Authenticated requests

Some methods require authentication so you'll need to pass a login and a password.

client = Bucketface::Client.new(:login => 'cored', :password => 'hithere')
client.open_issue('cored/test-repo', 'testing', 'testing')

TODO

  • Add documentation to all classes
  • Functionality for the following API resources
    • Privileges
    • Wiki
    • Source
  • Create examples
  • Refactor code to abstract functionality from client class
  • Add bad response handling

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

Bucketface is based and inspired by Octopussy

Copyright

Copyright (c) 2010 Rafael George

bucketface's People

Contributors

cored avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bucketface's Issues

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.