SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,343
    Mentioned
    192 Post(s)
    Tagged
    4 Thread(s)

    Github API - example code

    I am working on a project in which I intend to leverage the Github API.
    I have found a few Ruby Gems, but none that seems quite "ready for prime time".

    Do you have experience with (or have written yourself) a good Gem for access to the Github API?

    Do you have a snippet (Gist or other) of sample code that demonstrates:
    • Authentication with OAuth/OAuth2
    • Access to a list of Public Gists (just as an example)


    I have Registered the application in Github; so I have a 'Client ID' and 'Client Secret'
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Git is for EVERYONE
    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,649
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    No examples but for Oauth there should be some solid gems that implement that, requests should be easy on top of it.

    Not a whole lot of ruby seat time so I don't have any more.

  3. #3
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,116
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Hey,

    For oauth I've just used omniauth with the facebook/twitter adapters but omniauth-github should do the same.
    The 'gh' gem works for cases where you want to access private repos
    Code ruby:
    @gh || = GH.with(
      username: ENV["github_username"],
      password: ENV["github_password"]
    )
    There's a good public JSON api's you can use also.
    https://api.github.com/users/markbrown4/gists
    https://github.com/markbrown4.json

    All the best,

  4. #4
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,343
    Mentioned
    192 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by markbrown4 View Post
    Hey,

    For oauth I've just used omniauth with the facebook/twitter adapters but omniauth-github should do the same.
    The 'gh' gem works for cases where you want to access private repos
    Code ruby:
    @gh || = GH.with(
      username: ENV["github_username"],
      password: ENV["github_password"]
    )
    There's a good public JSON api's you can use also.
    https://api.github.com/users/markbrown4/gists
    https://github.com/markbrown4.json

    All the best,
    That is great. Thanks for the response.
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Git is for EVERYONE
    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains

  5. #5
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,883
    Mentioned
    74 Post(s)
    Tagged
    6 Thread(s)
    @ParkinT

    http://www.labnol.org/internet/github-gist-tutorial/28499/


    I recently received the above blog post mostly about Github Gists.

    What I liked mostly was the

    http://bl.ocks.org/

    demo:

    http://bl.ocks.org/mbostock/1353700

    and one from me:

    http://bl.ocks.org/John-Betong/raw/c...260d65d7cf98d/

    Notice the addition of /raw/ after username, in the last URL. This prevents source code display.
    Last edited by John_Betong; May 5, 2014 at 03:44. Reason: spelling and added another link
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Wolfshade on earning Member of the Month for August 2014

  6. #6
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,343
    Mentioned
    192 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by John_Betong View Post
    @ParkinT

    http://www.labnol.org/internet/github-gist-tutorial/28499/


    I recently received the above blog post mostly about Github Gists.

    What I liked mostly was the

    http://bl.ocks.org/

    demo:

    http://bl.ocks.org/mbostock/1353700

    and one from me:

    http://bl.ocks.org/John-Betong/raw/c...260d65d7cf98d/

    Notice the addition of /raw/ after username, in the last URL. This prevents source code display.
    Whoa. That is really cool.
    There are many, many creative ways people have applied the Github API. I am playing with it.

    Thanks for sharing that.
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Git is for EVERYONE
    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •