Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bulk endpoint #59

Merged
merged 3 commits into from
Apr 1, 2018
Merged

Add bulk endpoint #59

merged 3 commits into from
Apr 1, 2018

Conversation

stefanbuck
Copy link
Member

Towards our mission to use real links (see OctoLinker/OctoLinker#277), this PR adds a new bulk endpoint to our service. This is needed to reduce response times and server load when prefetching links for the OctoLinker browser extension.

The order of the response is equal to the order in request body. If a query fails or can't be resolved the api will return null.

Request body

[
    {
        "type": "registry",
        "registry": "npm",
        "target": "request"
    },
    {
        "type": "ping",
        "target": "https://nodejs.org/api/path.html"
    },
    {
        "type": "registry",
        "registry": "npm",
        "target": "package_which_does_not_exist"
    }
]

Response

[
	"https://github.com/request/request",
	"https://nodejs.org/api/path.html",
	null
]

@josephfrazier josephfrazier self-assigned this Apr 1, 2018
@josephfrazier josephfrazier merged commit 56de17b into OctoLinker:master Apr 1, 2018
@stefanbuck stefanbuck deleted the bulk branch April 1, 2018 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants