Giter Club home page Giter Club logo

Comments (7)

jiahao avatar jiahao commented on June 28, 2024

The complete list of missing fields is

    avatar_url
    followers_url
    following_url
    gists_url
    starred_url
    subscriptions_url
    organizations_url
    repos_url
    events_url
    received_events_url
    contributions

Unfortunately, contributions doesn't make sense as an attribute intrinsic to a user account, unless it is explicitly related to the corresponding repo. So maybe this will have to be stored as Dict("JuliaLang/julia" => 716) within the Owner type in the example of the OP.

from github.jl.

jiahao avatar jiahao commented on June 28, 2024

Oh never mind, I see that contributions is mapped to the value of the Dict that is output_of_ contributors[1][i].

from github.jl.

jrevels avatar jrevels commented on June 28, 2024

Yeah, I left out a good chunk of the *_url fields from various types because most of that info can be naturally obtained/interacted with via the other API methods, but that was probably the wrong decision (also, it left some holes e.g. avatar_url).

Feel free to open a PR with the fix you added.

from github.jl.

Keno avatar Keno commented on June 28, 2024

avatar_url is just https://avatars.githubusercontent.com/u/$(get(owner.id)). I don't think we should represent these urls in the types, because we also hardcode them in the various accessor methods. I'd rather be consistent about than end up with a weird mix.

from github.jl.

jrevels avatar jrevels commented on June 28, 2024

I'd rather be consistent about than end up with a weird mix.

I'm still not opposed to this change (it's better to hew closer to GitHub's actual schema when possible), but this is a good point. We should add the URL fields for every GitHubTypes all at once to avoid confusion or not make the change at all.

cc @KristofferC, since you have a PR for part of this

from github.jl.

Keno avatar Keno commented on June 28, 2024

What I meant is that we hardcode paths e.g. here: https://github.com/JuliaWeb/GitHub.jl/blob/master/src/owners/owners.jl#L78
with this change, should we change that to

gh_get_paged_json(owner.orgs_url)

If so, that doesn't work with skinny objects any more. If not, then why do we want to expose those fields? We could compute them on-demand from the hardcoded strings.

from github.jl.

KristofferC avatar KristofferC commented on June 28, 2024

Not really since the API is field access?

from github.jl.

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.