https://github.com/andrew/octokit.rb

Simple Ruby wrapper for the GitHub API

https://github.com/andrew/octokit.rb

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 78 committers (1.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (5.2%) to scientific vocabulary

Keywords from Contributors

authorization oauth2 oauth2-client oidc oidc-client
Last synced: 10 months ago · JSON representation

Repository

Simple Ruby wrapper for the GitHub API

Basic Info
  • Host: GitHub
  • Owner: andrew
  • License: mit
  • Language: Ruby
  • Default Branch: master
  • Homepage:
  • Size: 5.19 MB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 4
  • Open Issues: 0
  • Releases: 0
Fork of octokit/octokit.rb
Created almost 13 years ago · Last pushed about 7 years ago
Metadata Files
Readme Changelog Contributing License

README.md

Octokit

Simple Ruby wrapper for the GitHub API.

Installation

gem install octokit

Documentation

http://rdoc.info/gems/octokit

Examples

Show a user

ruby Octokit.user "sferik" => #<Hashie::Mash avatar_url="https://secure.gravatar.com/avatar/1f74b13f1e5c6c69cb5d7fbaabb1e2cb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png" bio="" blog="http://twitter.com/sferik" company="" created_at="2008-05-14T20:36:12Z" email="sferik@gmail.com" events_url="https://api.github.com/users/sferik/events{/privacy}" followers=662 followers_url="https://api.github.com/users/sferik/followers" following=102 following_url="https://api.github.com/users/sferik/following{/other_user}" gists_url="https://api.github.com/users/sferik/gists{/gist_id}" gravatar_id="1f74b13f1e5c6c69cb5d7fbaabb1e2cb" hireable=false html_url="https://github.com/sferik" id=10308 location="San Francisco, CA" login="sferik" name="Erik Michaels-Ober" organizations_url="https://api.github.com/users/sferik/orgs" public_gists=59 public_repos=83 received_events_url="https://api.github.com/users/sferik/received_events" repos_url="https://api.github.com/users/sferik/repos" starred_url="https://api.github.com/users/sferik/starred{/owner}{/repo}" subscriptions_url="https://api.github.com/users/sferik/subscriptions" type="User" updated_at="2013-05-31T16:01:08Z" url="https://api.github.com/users/sferik">

Repositories

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

```ruby Octokit.repo "octokit/octokit.rb"

Octokit.repo {:username => "octokit", :name => "octokit.rb"}

Octokit.repo {:username => "octokit", :repo => "octokit.rb"}

Octokit.repo Repository.new('octokit/octokit.rb') ```

List the commits for a repository

```ruby Octokit.commits("octokit/octokit.rb")

Octokit.list_commits("octokit/octokit.rb")

=> [# commit=# commentcount=0 committer=# message="Fix bug with archivelink for private repo" tree=# url="https://api.github.com/repos/octokit/octokit.rb/git/commits/8db3df37fad3a021eb8036b007c718149836cb32"> committer=# parents=[#] sha="8db3df37fad3a021eb8036b007c718149836cb32" url="https://api.github.com/repos/octokit/octokit.rb/commits/8db3df37fad3a021eb8036b007c718149836cb32">, ... , ...] ```

Authenticated Requests

For methods that require authentication, you'll need to setup a client with your login and password.

ruby client = Octokit::Client.new(:login => "me", :password => "sekret") client.follow("sferik")

Alternately, you can authenticate with a GitHub OAuth2 token.

ruby client = Octokit::Client.new(:login => "me", :oauth_token => "oauth2token") client.follow("sferik")

Requesting a specific media type

You can pass an :accept option value to request a particular media type.

ruby Octokit.contents 'octokit/octokit.rb', :path => 'README.md', :accept => 'application/vnd.github.html'

Using with GitHub Enterprise

To use with GitHub Enterprise, you'll need to set the API and web endpoints before instantiating a client.

```ruby Octokit.configure do |c| c.apiendpoint = 'https://github.company.com/api/v3' c.webendpoint = 'https://github.company.com/' end

@client = Octokit::Client.new(:login => 'USERNAME', :password => 'PASSWORD') ```

Supported Ruby Versions

This library aims to support and is [tested against][travis] the following Ruby implementations:

  • Ruby 1.8.7
  • Ruby 1.9.2
  • Ruby 1.9.3
  • Ruby 2.0.0

If something doesn't work on one of these Ruby versions, it's a bug.

This library may inadvertently work (or seem to work) on other Ruby implementations, however support will only be provided for the versions listed above.

If you would like this library to support another Ruby version, you may volunteer to be a maintainer. Being a maintainer entails making sure all tests run and pass on that implementation. When something breaks on your implementation, you will be responsible for providing patches in a timely fashion. If critical issues for a particular implementation exist at the time of a major release, support for that Ruby version may be dropped.

Versioning

This library aims to adhere to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, that version should be immediately yanked and/or a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions. As a result of this policy, you can (and should) specify a dependency on this gem using the Pessimistic Version Constraint with two digits of precision. For example:

spec.add_dependency 'octokit', '~> 1.0'

JSON dependency

Since JSON is included in 1.9 now, we no longer include it as a hard dependency. Please require it explicitly if you're running Ruby 1.8

gem 'json', '~> 1.7'

Contributors

Octokit was initially created by Wynn Netherland and Adam Stacoviak but has turned into a true community effort. Special thanks to the following contributors:

Inspiration

Octokit was inspired by Octopi and aims to be a lightweight, less-ActiveResourcey alternative.

Copyright

Copyright (c) 2011-2013 Wynn Netherland, Adam Stacoviak, Erik Michaels-Ober. See LICENSE for details.

Owner

  • Name: Andrew Nesbitt
  • Login: andrew
  • Kind: user
  • Location: Bristol, UK
  • Company: @ecosyste-ms and @octobox

Working on mapping the world of open source software @ecosyste-ms and empowering developers with @octobox

GitHub Events

Total
Last Year

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 745
  • Total Committers: 78
  • Avg Commits per committer: 9.551
  • Development Distribution Score (DDS): 0.723
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Erik Michaels-Ober s****k@g****m 206
Clint Shryock c****t@c****m 105
Wynn Netherland w****d@g****m 82
Wynn Netherland w****n@g****m 80
Joey Wendt j****y@j****m 47
Wynn Netherland w****n@s****m 32
Sebastian Staudt k****r@g****m 14
Geoff Low g****w@m****m 13
Andrew Nesbitt a****z@g****m 9
Carlos Vilhena c****a@g****m 9
Nat Welch n****t@n****m 9
Rein Henrichs r****h@r****m 9
Ross Paffett r****s@r****m 8
willrax me@w****m 8
Ariel H. Pillet a****t@g****m 7
Brian Guthrie b****e@g****m 6
Lucas Jenss l****s@x****e 6
Adam Stacoviak a****m@g****m 4
Joseph Anthony Pasquale Holsten j****h@j****m 4
Josh Kalderimis j****s@g****m 4
Derek Myers a****o@g****m 3
James Bence j****e@m****m 3
Kevin Jalbert k****t@g****m 3
Oleksandr Petrov o****v@g****m 3
Richard Huang f****m@g****m 3
Masahiro Saito c****a@g****m 3
Alex Wolfe a****e@g****m 2
Chih-Wei Lee d****y@g****m 2
Dale Campbell o****a@g****m 2
Enrico Bianco e****b@g****m 2
and 48 more...

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels