@octokit/endpoint
Advanced tools
Comparing version 6.0.10 to 6.0.11
@@ -369,3 +369,3 @@ 'use strict'; | ||
const VERSION = "6.0.10"; | ||
const VERSION = "6.0.11"; | ||
@@ -372,0 +372,0 @@ const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "6.0.10"; | ||
export const VERSION = "6.0.11"; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "6.0.10"; | ||
export declare const VERSION = "6.0.11"; |
@@ -360,3 +360,3 @@ import { isPlainObject } from 'is-plain-object'; | ||
const VERSION = "6.0.10"; | ||
const VERSION = "6.0.11"; | ||
@@ -363,0 +363,0 @@ const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; |
{ | ||
"name": "@octokit/endpoint", | ||
"description": "Turns REST API endpoints into generic request options", | ||
"version": "6.0.10", | ||
"version": "6.0.11", | ||
"license": "MIT", | ||
@@ -27,3 +27,3 @@ "files": [ | ||
"dependencies": { | ||
"@octokit/types": "^6.0.0", | ||
"@octokit/types": "^6.0.3", | ||
"is-plain-object": "^5.0.0", | ||
@@ -30,0 +30,0 @@ "universal-user-agent": "^6.0.0" |
@@ -62,3 +62,3 @@ # endpoint.js | ||
```js | ||
const requestOptions = endpoint("GET /orgs/:org/repos", { | ||
const requestOptions = endpoint("GET /orgs/{org}/repos", { | ||
headers: { | ||
@@ -127,3 +127,3 @@ authorization: "token 0000000000000000000000000000000000000001", | ||
<td> | ||
If set, it has to be a string consisting of URL and the request method, e.g., <code>GET /orgs/:org</code>. If it’s set to a URL, only the method defaults to <code>GET</code>. | ||
If set, it has to be a string consisting of URL and the request method, e.g., <code>GET /orgs/{org}</code>. If it’s set to a URL, only the method defaults to <code>GET</code>. | ||
</td> | ||
@@ -151,3 +151,3 @@ </tr> | ||
<strong>Required unless <code>route</code> is set.</strong> A path or full URL which may contain <code>:variable</code> or <code>{variable}</code> placeholders, | ||
e.g., <code>/orgs/:org/repos</code>. The <code>url</code> is parsed using <a href="https://github.com/bramstein/url-template">url-template</a>. | ||
e.g., <code>/orgs/{org}/repos</code>. The <code>url</code> is parsed using <a href="https://github.com/bramstein/url-template">url-template</a>. | ||
</td> | ||
@@ -228,3 +228,3 @@ </tr> | ||
1. If the option key has a placeholder in the `url`, it will be used as the replacement. For example, if the passed options are `{url: '/orgs/:org/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos`. | ||
1. If the option key has a placeholder in the `url`, it will be used as the replacement. For example, if the passed options are `{url: '/orgs/{org}/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos`. | ||
2. If the `method` is `GET` or `HEAD`, the option is passed as a query parameter. | ||
@@ -296,3 +296,3 @@ 3. Otherwise, the parameter is passed in the request body as a JSON key. | ||
request(myEndpoint(`GET /orgs/:org/repos`)); | ||
request(myEndpoint(`GET /orgs/{org}/repos`)); | ||
``` | ||
@@ -345,3 +345,3 @@ | ||
}); | ||
myProjectEndpoint.merge("GET /orgs/:org/repos", { | ||
myProjectEndpoint.merge("GET /orgs/{org}/repos", { | ||
headers: { | ||
@@ -357,3 +357,3 @@ authorization: `token 0000000000000000000000000000000000000001`, | ||
// method: 'GET', | ||
// url: '/orgs/:org/repos', | ||
// url: '/orgs/{org}/repos', | ||
// headers: { | ||
@@ -360,0 +360,0 @@ // accept: 'application/vnd.github.v3+json', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116149
Updated@octokit/types@^6.0.3