Пример #1
0
class PyVersions(Service):
    name = "PyPi Python Versions"
    example = "3.4, 3.5, 3.6"
    shield = TextShield(prefix="Python")
    base = "pypi"
    routes = ["pyversions/:project"]

    def route(self, project):
        return api.pyversions(project)
Пример #2
0
class Version(Service):
    name = "RubyGems Version"
    shield = TextShield(prefix="Version")
    base = "rubygems"
    example = "12.0.4"
    routes = ["version/:gem"]

    def route(self, gem):
        return api.version(gem)
Пример #3
0
class Downloads(Service):
    name = "PePy Total Downloads"
    example = 150000
    shield = TextShield(prefix="Downloads")
    base = "pepy"
    routes = ["downloads/:project"]

    def route(self, project):
        return api.downloads(project)
Пример #4
0
class Version(Service):
    name = "Chrome Web Store Version"
    example = "2.0.4"
    shield = TextShield(prefix="Version")
    base = "chrome"
    routes = ["version/:appId"]

    def route(self, appId):
        return api.version(appId)
Пример #5
0
class Votes(Service):
    name = "Arch User Repository Votes"
    example = "75"
    shield = TextShield(prefix="Votes")
    base = "aur"
    routes = ["votes/:package"]

    def route(self, package):
        return api.votes(package)
Пример #6
0
class Domains(Service):
    name = "Mastodon Domains"
    shield = TextShield(prefix="Domains")
    base = "mastodon"
    example = 8795
    routes = ["domains/:instance"]

    def route(self, instance):
        return api.domains(instance)
Пример #7
0
class Users(Service):
    name = "Chrome Web Store Users"
    example = 1380
    shield = TextShield(prefix="Users")
    base = "chrome"
    routes = ["users/:appId"]

    def route(self, appId):
        return api.users(appId)
Пример #8
0
class Posts(Service):
    name = "Discourse Posts"
    shield = TextShield(prefix="Posts")
    base = "discourse"
    example = 209
    routes = ["posts/:instance"]

    def route(self, instance):
        return api.posts(instance)
Пример #9
0
class Likes(Service):
    name = "Discourse Likes"
    shield = TextShield(prefix="Likes")
    base = "discourse"
    example = 209
    routes = ["likes/:instance"]

    def route(self, instance):
        return api.likes(instance)
Пример #10
0
class Version(Service):
    name = "PyPi Version"
    example = "0.2.0"
    shield = TextShield(prefix="PyPi")
    base = "pypi"
    routes = ["version/:project"]

    def route(self, project):
        return api.version(project)
Пример #11
0
class Users(Service):
    name = "Discourse Users"
    shield = TextShield(prefix="Users")
    base = "discourse"
    example = 209
    routes = ["users/:instance"]

    def route(self, instance):
        return api.users(instance)
Пример #12
0
class License(Service):
    name = "PyPi License"
    example = "MIT License"
    shield = TextShield(prefix="License")
    base = "pypi"
    routes = ["license/:project"]

    def route(self, project):
        return api.license(project)
Пример #13
0
class Format(Service):
    name = "PyPi Format"
    example = "wheel"
    shield = TextShield(prefix="Format")
    base = "pypi"
    routes = ["format/:project"]

    def route(self, project):
        return api.format(project)
Пример #14
0
class Status(Service):
    name = "PyPi Status"
    example = "Production/Stable"
    shield = TextShield(prefix="Status")
    base = "pypi"
    routes = ["status/:project"]

    def route(self, project):
        return api.status(project)
Пример #15
0
class LatestRelease(Service):
    name = "Latest Release"
    example = "1.1.2"
    shield = TextShield(prefix="Release")
    base = "github"
    routes = ["release/:owner/:repository"]

    def route(self, owner, repository):
        return api.latest_release(owner, repository, token())
Пример #16
0
class Status(Service):
    name = "Discourse Status"
    shield = TextShield(prefix="Status")
    base = "discourse"
    example = "Online"
    routes = ["status/:instance"]

    def route(self, instance):
        return "Online" if api.status(instance) else "Offline"
Пример #17
0
class Statuses(Service):
    name = "Mastodon Statuses"
    shield = TextShield(prefix="Statuses")
    base = "mastodon"
    example = 12859684
    routes = ["statuses/:instance"]

    def route(self, instance):
        return api.statuses(instance)
Пример #18
0
class Topics(Service):
    name = "Discourse Topics"
    shield = TextShield(prefix="Topics")
    base = "discourse"
    example = 209
    routes = ["topics/:instance"]

    def route(self, instance):
        return api.topics(instance)
Пример #19
0
class Users(Service):
    name = "Mastodon Users"
    shield = TextShield(prefix="Users")
    base = "mastodon"
    example = 306391
    routes = ["users/:instance"]

    def route(self, instance):
        return api.users(instance)
Пример #20
0
class LanguageCount(Service):
    name = "Repository Language Count"
    example = 4
    shield = TextShield(prefix="Languages")
    base = "github"
    routes = ["languages/count/:owner/:repo"]

    def route(self, owner, repo):
        return api.language_count(owner, repo, token())
Пример #21
0
class Rating(Service):
    name = "Chrome Web Store Rating"
    example = 4.2
    shield = TextShield(prefix="Rating")
    base = "chrome"
    routes = ["rating/:appId"]

    def route(self, appId):
        return api.rating(appId)
Пример #22
0
class Forks(Service):
    name = "Repository Forks"
    example = 332
    shield = TextShield(prefix="Forks")
    base = "github"
    routes = ["forks/:owner/:repo"]

    def route(self, owner, repo):
        return api.forks(owner, repo, token())
Пример #23
0
class License(Service):
    name = "Arch User Repository License"
    example = "Apache"
    shield = TextShield(prefix="License")
    base = "aur"
    routes = ["license/:package"]

    def route(self, package):
        return api.license(package)
Пример #24
0
class License(Service):
    name = "Repository License"
    example = "Apache License 2.0"
    shield = TextShield(prefix="License")
    base = "github"
    routes = ["license/:owner/:repo"]

    def route(self, owner, repo):
        return api.license(owner, repo, token())
Пример #25
0
class Version(Service):
    name = "Arch User Repository Version"
    example = "3.3.0-1"
    shield = TextShield(prefix="Version")
    base = "aur"
    routes = ["version/:package"]

    def route(self, package):
        return api.version(package)
Пример #26
0
class Stars(Service):
    name = "Repository Stars"
    example = 165
    shield = TextShield(prefix="Stars")
    base = "github"
    routes = ["stars/:owner/:repo"]

    def route(self, owner, repo):
        return api.stars(owner, repo, token())
Пример #27
0
class Downloads(Service):
    name = "RubyGems Downloads"
    shield = TextShield(prefix="Downloads")
    base = "rubygems"
    example = 1024
    routes = ["downloads/:gem", "downloads/:gem/:version"]

    def route(self, gem, version=None):
        return api.downloads(gem, version)
Пример #28
0
class Followers(Service):
    name = "User Followers"
    example = 92
    shield = TextShield(prefix="Followers")
    base = "github"
    routes = ["followers/:username"]

    def route(self, username):
        return api.followers(username, token())
Пример #29
0
class Coverage(Service):
    name = "Coverage"
    shield = TextShield(prefix="Coverage", suffix="%")
    base = "codecov"
    example = 86.5
    routes = ["coverage/:vcs/:user/:repo", "coverage/:vcs/:user/:repo/:branch"]

    def route(self, vcs, user, repo, branch=None):
        return round(api.coverage(vcs, user, repo, branch=branch), 1)
Пример #30
0
class Alerts(Service):
    name = "LGTM Alerts"
    shield = TextShield(prefix="LGTM", suffix=" Alerts")
    base = "lgtm"
    example = 104
    routes = ["alerts/:owner/:repo"]

    def route(self, owner, repo):
        return api.alerts(owner, repo)