How to get a github usesr top laguages used using a github api - github

is there and way to get a users most used languages just like github gives us
like this:
https://github-readme-stats.vercel.app/api/top-langs/?username=rjoydip
using GitHub API

Apprently not, if I interpret correctly the anuraghazra/github-readme-stats/src/fetchers/top-languages-fetcher.js#fetchTopLanguages() function used to get those stats.
It has to iterate on all repositories, and get languages from each one.

Related

Github Search API for searching code using a repository name

I am using Github search APIs of enterprise version (https://{{GitBaseInternalURL}}/api/v3) in my code.
I am able to search the code using the endpoint below:
"code_search_url": "https://{{GitBaseInternalURL}}/api/v3/search/code?q={query}{&page,per_page,sort,order}"
However I want to search the code based on the given repository name.
I have searched a lot of content online and I could not find any suitable endpoint for my use case.
Can anybody help me find the right endpoint for my purpose?

Find all my contributions including issues

Is there any way to find all interactions between 2 users? For e.g. Here are 2 users...
https://github.com/kavgan
https://github.com/shantanuo
I remember that I have raised an issue in one of repos of the user "kavgan". But is there a way to find that? What I expect is this...
https://github.com/kavgan/nlp-in-practice/issues/3
You can use filter in an issue search for a given repository, as described in this article
is:issue author:shantanuo
See the results here.
But to apply the same to all repositories, you would need a graphql query, similar to this one.

Filter SourceGear VaultWeb Checkins by user

We're still using SourceGear Vault as VCS for some of our older projects.
Vault provides a html web interface called VaultWeb which enabled you to view the latest checkins, transactions and so on.
For example you can view a list of the most recent checkins via an uri like this:
http://sourcegear.service.foo.bar/VaultService/VaultWeb/RecentCheckins.aspx?repid=42&days=7
This lists all checkins in repository 42 (repid=42) within the last week (days=7).
What I'm wondering: is there any way to filter the result at a more detailed level?
At least I'd like to filter the checkins per user. So I thought appending a query parameter like &username=alice would do the trick. But this doesn't filter anything...
Does anybody have an idea?
I searched the web but didn't find anything helpful (list of parameters or something like that)...

Github API V3 Search Repo issues

I'm trying to get 3 repos with highest numbers of stars in given language. I have 3 issues with it:
search is using legacy pagination style and per_page does not seem to work
language parameter is also not respected, I get php, java etc
i'm sorting by start but in result i get detailed repo info with everything
but stars count...
curl "https://api.github.com/legacy/repos/search/foobar?sort=stars&order=desc&language=VimL&per_page=3"
First of all, per_page isn't listed as an accepted parameter. With that in mind, it could be invalidating the rest of your parameters being sent. If removing that does in fact fix the issue, you should contact GitHub support directly. If in fact you do this, be sure to include "API" in the topic so it gets routed directly to the API team so you can get your answer faster.
Re:
i'm sorting by start but in result i get detailed repo info with everything but stars count.
The legacy API (as you already noted this was) returned old style (v2) Repository information. If you want information about the stars you'll have to make a direct call to /repos/:user/:repo after you find the repositories you want.

Creating custom tags

I knew that recently there was a bug that allowed you to tag someone without using their name.
Something along the lines of this: ##[0:[Facebook ID:0:Tag Name]]
This no longer seems to work. Is there anything in the api that will allow you to do the same? I am attempting to make a simple app that will allow people to easily create custom tags...
Facebook has disabled the old tagging method ##[0:[Facebook ID:0:Tag Name]], but have enabled tagging via the API (in limited form). Follow the Mention Tagging documentation.
You need to create an app and use actions in order to use it...