List supported platforms in badge
bruno-garcia opened this issue · comments
This endpoint provides the platform list: https://pub.dev/api/packages/pana/metrics?pretty
Create a badge such as:
This issue is now unblocked to use a single endpoint for all:
Following the PR #17 we can now see the additional metrics:
Stats for sentry:
Likes: 171
Popularity: 98
Pub Points: 130
Max Points: 130
Last Updated: 2021-04-08 05:16:58.964692Z
Package Name: sentry
Package Version: 5.0.0
Runtime Version: null
Created: null
Version Created: 2021-03-31 08:45:59.398791Z
Derived Tags: [sdk:dart, sdk:flutter, platform:android, platform:ios, platform:windows, platform:linux, platform:macos, platform:web, runtime:native-aot, runtime:native-jit, runtime:web, is:null-safe]
Flags: [latest-stable]
Report Types: [dartdoc, pana]
Thanks @AldrinMathew
However, before we can close this issue, we still need to render a proper badge for the platforms as the issue suggest.
Currently, only the keys from scores
can pass through to render the badge:
Line 86 in e498f04
If we add to the list the keys from scorecardTypes
, it's possible to get a badge for derived tags
:
But that's not nice in raw format. Ideally we introduce new keys such as platforms
, that renders the badge more in the way that pub.dev does:
One idea:
badges.bar/sentry/platforms
Renders: platforms: dart, flutter
And:
badges.bar/sentry/platforms/dart
Renders: dart: native, JS
badges.bar/sentry/platforms/flutter
Renders: dart: windows, android, ios, web, macos, linux
See #27