SAP-samples / artifact-of-the-month

A SAPUI5 application that ranks the popularity of SAP packages and repositories from multiple platforms. The usage data is pulled periodically from these platforms by GitHub Actions. The web app itself is hosted via GitHub Pages.
https://sap-samples.github.io/artifact-of-the-month/
Apache License 2.0
9 stars 9 forks source link

borderline stuff #3

Open marcellourbani opened 3 years ago

marcellourbani commented 3 years ago

Is this supposed to cover external stuff like my vscode plugin, AbapPretty and abap_test_runner_cli? AbapLint? Libraries like abap-adt-api?

IObert commented 3 years ago

In general: Yes, everything that has "ABAP" in the name probably qualifies :)

Feel free to open a PR that adds your npm packages and github repo.

The VS Code Extension items would also be great. But for this, I (or someone else) would need to add a new provider that uses an official API from the VS Code Marketplace. Is there such an API that also provides the download count?

marcellourbani commented 3 years ago

Yes there's an api Will look into it when I have time

On Wed, 25 Aug 2021, 17:19 Marius Obert, @.***> wrote:

In general: Yes, everything that has "ABAP" in the name probably qualifies :)

Feel free to open a PR that adds your npm packages and github repo.

The VS Code Extension items would also be great. But for this, I (or someone else) would need to add a new provider that uses an official API from the VS Code Marketplace. Is there such an API that also provides the download count?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SAP-samples/artifact-of-the-month/issues/3#issuecomment-905681421, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASW6HMVRQ7ZFRRVK5FAJADT6UJXPANCNFSM5CZCHRUA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

IObert commented 3 years ago

I added some of the items that you mentioned above (besides the VS Code Marketplace thing)

marianfoo commented 2 years ago

@marcellourbani what API do you mean? There is a non-documented API? https://github.com/microsoft/vscode/issues/31168 But even with that, downloads are not included. There is always scraping, but i don´t think Marius would like that :D

marcellourbani commented 2 years ago

try this:

curl 'https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery' -H 'content-type: application/json' \
 --data-raw '{"filters":[{"criteria":[{"filterType":8,"value":"Microsoft.VisualStudio.Code"},{"filterType":10,"value":"abap"},{"filterType":12,"value":"4096"}],"pageNumber":1,"pageSize":50,"sortBy":0,"sortOrder":0}],"assetTypes":[],"flags":950}' \
  --compressed\
|jq '.results[].extensions[]|{displayName,installs:.statistics[] | select(.statisticName == "install").value}'
marianfoo commented 2 years ago

Yeah, works well but is it officially allowed? Apparently it's more of a grey area. Marius would have to decide, but would be great to use it.

curl --location --request POST 'https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery' \
--header 'Accept: application/json;api-version=3.0-preview.1' \
--header 'Content-Type: application/json' \
--data-raw '{
    "filters": [
        {
            "criteria": [
                {
                    "filterType": 7,
                    "value": "larshp.vscode-abap"
                },
                {
                    "filterType": 12,
                    "value": "4096"
                }
            ],
            "pageNumber": 1,
            "pageSize": 50,
            "sortBy": 0,
            "sortOrder": 0
        }
    ],
    "assetTypes": [],
    "flags": 950
}'

Result:

Click to show result ```json { "results": [ { "extensions": [ { "publisher": { "publisherId": "6b5dee1c-f4de-4091-bbbd-015bac016b03", "publisherName": "larshp", "displayName": "Lars Hvam", "flags": "verified", "domain": null, "isDomainVerified": false }, "extensionId": "a3eeaa55-4a2a-4d0e-8dad-bdda31ae5926", "extensionName": "vscode-abap", "displayName": "ABAP", "flags": "validated, public", "lastUpdated": "2021-11-05T13:52:13.387Z", "publishedDate": "2016-01-22T12:04:04.14Z", "releaseDate": "2016-01-22T12:04:05.07Z", "shortDescription": "Syntax highlighting for ABAP", "versions": [ { "version": "0.5.6", "flags": "validated", "lastUpdated": "2021-11-05T13:52:13.387Z", "files": [ { "assetType": "Microsoft.VisualStudio.Code.Manifest", "source": "https://larshp.gallerycdn.vsassets.io/extensions/larshp/vscode-abap/0.5.6/1636120196687/Microsoft.VisualStudio.Code.Manifest" }, { "assetType": "Microsoft.VisualStudio.Services.Content.Details", "source": "https://larshp.gallerycdn.vsassets.io/extensions/larshp/vscode-abap/0.5.6/1636120196687/Microsoft.VisualStudio.Services.Content.Details" }, { "assetType": "Microsoft.VisualStudio.Services.Content.License", "source": "https://larshp.gallerycdn.vsassets.io/extensions/larshp/vscode-abap/0.5.6/1636120196687/Microsoft.VisualStudio.Services.Content.License" }, { "assetType": "Microsoft.VisualStudio.Services.Icons.Default", "source": "https://larshp.gallerycdn.vsassets.io/extensions/larshp/vscode-abap/0.5.6/1636120196687/Microsoft.VisualStudio.Services.Icons.Default" }, { "assetType": "Microsoft.VisualStudio.Services.Icons.Small", "source": "https://larshp.gallerycdn.vsassets.io/extensions/larshp/vscode-abap/0.5.6/1636120196687/Microsoft.VisualStudio.Services.Icons.Small" }, { "assetType": "Microsoft.VisualStudio.Services.VsixManifest", "source": "https://larshp.gallerycdn.vsassets.io/extensions/larshp/vscode-abap/0.5.6/1636120196687/Microsoft.VisualStudio.Services.VsixManifest" }, { "assetType": "Microsoft.VisualStudio.Services.VSIXPackage", "source": "https://larshp.gallerycdn.vsassets.io/extensions/larshp/vscode-abap/0.5.6/1636120196687/Microsoft.VisualStudio.Services.VSIXPackage" } ], "properties": [ { "key": "Microsoft.VisualStudio.Services.Links.Getstarted", "value": "https://github.com/larshp/vscode-abap.git" }, { "key": "Microsoft.VisualStudio.Services.Links.Support", "value": "https://github.com/larshp/vscode-abap/issuess" }, { "key": "Microsoft.VisualStudio.Services.Links.Learn", "value": "https://github.com/larshp/vscode-abap#readme" }, { "key": "Microsoft.VisualStudio.Services.Links.Source", "value": "https://github.com/larshp/vscode-abap.git" }, { "key": "Microsoft.VisualStudio.Services.Links.GitHub", "value": "https://github.com/larshp/vscode-abap.git" }, { "key": "Microsoft.VisualStudio.Code.Engine", "value": "^0.10.1" }, { "key": "Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown", "value": "true" }, { "key": "Microsoft.VisualStudio.Code.ExtensionDependencies", "value": "" }, { "key": "Microsoft.VisualStudio.Code.ExtensionPack", "value": "" }, { "key": "Microsoft.VisualStudio.Code.LocalizedLanguages", "value": "" }, { "key": "Microsoft.VisualStudio.Code.ExtensionKind", "value": "ui,workspace,web" } ], "assetUri": "https://larshp.gallerycdn.vsassets.io/extensions/larshp/vscode-abap/0.5.6/1636120196687", "fallbackAssetUri": "https://larshp.gallery.vsassets.io/_apis/public/gallery/publisher/larshp/extension/vscode-abap/0.5.6/assetbyname" } ], "categories": [ "Programming Languages" ], "tags": [ "__ext_abap", "__web_extension", "abap" ], "statistics": [ { "statisticName": "install", "value": 24197.0 }, { "statisticName": "averagerating", "value": 4.7142858505249023 }, { "statisticName": "ratingcount", "value": 7.0 }, { "statisticName": "trendingdaily", "value": 0.0 }, { "statisticName": "trendingmonthly", "value": 3.1005829095870023 }, { "statisticName": "trendingweekly", "value": 0.60771425027905246 }, { "statisticName": "updateCount", "value": 35387.0 }, { "statisticName": "weightedRating", "value": 4.5312969556921789 }, { "statisticName": "downloadCount", "value": 108.0 } ], "deploymentType": 0 } ], "pagingToken": null, "resultMetadata": [ { "metadataType": "ResultCount", "metadataItems": [ { "name": "TotalCount", "count": 1 } ] } ] } ] } ```
marcellourbani commented 2 years ago

No idea, I just replicated the call vscode does. There should be some documentation somewhere as openvsix has a similar one, and you can replace it in vscode.

Now, since this is:

one can legitimately assume it is, but it's not rock solid. Probably opening a vscode issue is the only way to be sure

IObert commented 2 years ago

I'm afraid these points don't make it a public API as there is not real documentation for it. I think we need to keep this item on hold until there is a definite page that explains the usage.