Fork me on GitHub

embadge.io

embadge.io is a simple Ember.js community badge service. It's inspired by Matthew Beale's Ember Community Versions and is open-sourced on Github

Create a badge, embed it in your post, maintain it and let the community update the badge when its information is out of date.

Github Badges

The embadge API supports generating badges for your Ember projects on Github. The API for github badges is

https://embadge.io/v1/:user/:repo/:branch/:package.svg
user
Your Github username or organization.
repo
The name of your repository.
branch
The branch you want to create the badge for (e.g. master).
package
The package from your package.json you want the badge for. This will also be your default label.
Optionally you can also pass an optional label GET-parameter that will replace the label shown on the badge.

Embadge heavily caches badges generated for Github repositories. It is therefore recommended to set up a webhook to invalidate our cache and update your badge:

https://embadge.io/v1/webhook

Static Badges

In case you want to use a static badge and specify version information yourself, you can use the embadge.io API. It supports four different parameters.

The API supports HTTPS and is accessed from is

https://embadge.io/v1/badge.svg?param=...
label
Used to define the text label shown on the badge (default: 'ember-versions')
start
Valid semver string noting the earliest supported version.
end
(Optional) Valid semver string noting the last supported version.
range
(Optional) Valid semver range (e.g. "^2.3.0") noting a supported range of versions. If given, "start" and "end" will be ignored

Examples

Start version
Start and end version
Range
Custom label
Custom label & range

Browser

In order to easily add embadge.io to your website you can include the following script in the body:

<script src="//embadge.io/v1/badge.js" type="text/javascript"></script>

This will search your page for span elements with the embadge class and use data attributes to generate the image URL.

<span class="embadge" data-start="2.3.0"><span>