Comments (6)
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.
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.
Try adding the username to that string:
Octokit.languages("bmuschko/gradle-gae-plugin")
or whatever the username is.
from octokit.rb.
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.
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.
Cool, thanks for the feedback.
from octokit.rb.
Related Issues (20)
- [FEAT]: Add methods for app webhooks HOT 1
- [BUG]: Fetch a given reference uses the wrong API HOT 5
- [FEAT]: add missing endpoints HOT 2
- [BUG]: OAuth token auth applies a different Authorization header than using curl or postman HOT 6
- [DOCS]: README and yardocs refer to deleted method `#create_authorization` HOT 1
- [FEAT]: Refresh a user's access token with refresh token HOT 1
- Test issue HOT 1
- [FEAT]: Support Org Secrets HOT 1
- Get Projects by personal access token-Must have admin rights to Repository HOT 2
- [FEAT]: Provide response types with Sorbet HOT 1
- [BUG]: HTTP caching middleware returns cached responses to wrong users HOT 4
- [BUG]: `list_app_installation_repositories` does not return `rels` HOT 1
- [BUG]: Net::OpenTimeout (Faraday::ConnectionFailed) for request in threads HOT 1
- [FEAT]: timeline events are not supported? HOT 2
- How to get repository by its ID? HOT 2
- [FEAT]: Add Full Code Scanning Support HOT 1
- [DOCS]: How can I use octokit to manager new project HOT 1
- [DOCS]: Fix / update generation for the docs for Octokit.rb HOT 1
- [BUG]: `faraday-multipart` warning always printed HOT 2
- [FEAT]: Enable and disable automated security fixes on a repo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octokit.rb.