Giter Site home page Giter Site logo

Comments (6)

pengwynn avatar pengwynn commented on August 15, 2024

Patches are always welcome. Just to understand the question, do you mean passing in a username to build the path to the repo? The repo argument to most of those calls is a Repository type, which represents both the user and the repo name.

https://github.com/pengwynn/octokit/blob/master/lib/octokit/repository.rb

from octokit.rb.

bmuschko avatar bmuschko commented on August 15, 2024

Yeah, that's what I meant. I was trying to get the languages of a specific repository. I am pretty new to Ruby so I might have missed something here. Here's an example:

client = Octokit::Client.new(:login => "bmuschko", :password => "pwd")
puts Octokit.languages("gradle-gae-plugin")

What I get as a result is something like this:

GET https://api.github.com/repos/gradle-gae-plugin//languages: 404: Not Found

Can you give me a hint on what I am doing wrong?

from octokit.rb.

pengwynn avatar pengwynn commented on August 15, 2024

Try adding the username to that string:

Octokit.languages("bmuschko/gradle-gae-plugin")

or whatever the username is.

from octokit.rb.

bmuschko avatar bmuschko commented on August 15, 2024

Great, thanks! That does it. This kind of led me to my question I guess. Shouldn't there be another parameter that defines the username? The method repositories for example does define one.

from octokit.rb.

catsby avatar catsby commented on August 15, 2024

As far as Octokit client is concerned, a "Repository" in this context is a username/repo pair, as @pengwynn mentioned, referenced here https://github.com/pengwynn/octokit/blob/master/lib/octokit/repository.rb

So when you see things like this https://github.com/pengwynn/octokit/blob/master/lib/octokit/client/repositories.rb#L33-35 , here repo is something like pengwynn/octokit.

The repositories method you mention is different because we're listing repositories for a user, where as in other contexts we're referring to a single repository.

from octokit.rb.

bmuschko avatar bmuschko commented on August 15, 2024

Cool, thanks for the feedback.

from octokit.rb.

Related Issues (20)

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.