Skip to content

OctoLinker/api

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

OctoLinker API

Returns the github repository url for the requested package.

The supported registries are:

Example:

[POST] https://octolinker-api.now.sh/

Body:

[
  { "type": "npm", "target": "react" },
  { "type": "composer", "target": "phpunit/phpunit" },
  { "type": "ping", "target": "https://github.com" },
  { "type": "npm", "target": "unknown-package" }
]

or as

[GET] https://octolinker-api.now.sh/?npm=react,lodash&composer=phpunit/phpunit

Type must be one of:

  • npm
  • bower
  • composer
  • rubygems
  • pypi
  • crates
  • java
  • go
  • pub
  • cran
  • nuget
  • ping

Response:

{
  "result": [
    {
      "type": "npm",
      "target": "react",
      "result": "https://github.com/facebook/react"
    },
    {
      "type": "composer",
      "target": "phpunit/phpunit",
      "result": "https://github.com/sebastianbergmann/phpunit"
    },
    {
      "type": "ping",
      "target": "https://github.com",
      "result": "https://github.com"
    },
    {
      "type": "npm",
      "target": "unknown-package"
    }
  ]
}

Installation

Install dependencies:

npm install

Run server:

npm run dev

Testing

npm test

Privacy Policy

Our Privacy Policy describes our practices related to the use, storage and disclosure of information we collect when you're using our service.

License

Copyright (c) 2015–present Stefan Buck and other contributors. Licensed under the MIT license.

Releases

No releases published

Packages

No packages published