Skip to content

Commit 5760c9c

Browse files
authored
Migrate endpoints to patch.io (#26)
* Change endpoint * Update changelog * Update links
1 parent 4b0e99e commit 5760c9c

File tree

5 files changed

+19
-13
lines changed

5 files changed

+19
-13
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.5.0] - 2021-03-01
9+
10+
### Changed
11+
12+
- Changed base URL from https://api.usepatch.com to https://api.patch.io
13+
814
## [1.4.0] - 2020-02-15
915

1016
### Added
@@ -20,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2026

2127
### Added
2228

23-
- Adds support for creating carbon emission estimates for flights, shipping, and vehicles. See the [docs](https://docs.usepatch.com/#/?id=estimates) for more information.
29+
- Adds support for creating carbon emission estimates for flights, shipping, and vehicles. See the [docs](https://docs.patch.io/#/?id=estimates) for more information.
2430

2531
## [1.2.5] - 2020-01-07
2632

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
[![npm version](https://badge.fury.io/js/%40patch-technology%[email protected])](https://www.npmjs.com/package/@patch-technology/patch)
55
[![Discord](https://img.shields.io/discord/733029448558837792)](https://discord.gg/M23NnGR)
66

7-
The official JavaScript package for the [Patch API](https://www.usepatch.com).
7+
The official JavaScript package for the [Patch API](https://www.patch.io).
88

99
## Documentation
1010

11-
For a complete API reference, check out [Patch's API Reference.](https://docs.usepatch.com)
11+
For a complete API reference, check out [Patch's API Reference.](https://docs.patch.io)
1212

1313
## Installation
1414

@@ -59,7 +59,7 @@ If you do not know how much to purchase, use an estimate.
5959
You can also create an order with a maximum desired price, and we'll allocate enough mass to
6060
fulfill the order for you.
6161

62-
[API Reference](https://docs.usepatch.com/#/?id=orders)
62+
[API Reference](https://docs.patch.io/#/?id=orders)
6363

6464
#### Examples
6565

@@ -96,7 +96,7 @@ patch.orders.retrieveOrders({ page });
9696

9797
Estimates allow API users to get a quote for the cost of compensating a certain amount of CO2. When creating an estimate, an order in the `draft` state will also be created, reserving the allocation of a project for 5 minutes. If you don't place your draft order within those 5 minutes, the order will automatically be cancelled.
9898

99-
[API Reference](https://docs.usepatch.com/#/?id=estimates)
99+
[API Reference](https://docs.patch.io/#/?id=estimates)
100100

101101
#### Examples
102102

@@ -147,7 +147,7 @@ When fetching Projects, you can add filters to the query to narrow the result. C
147147
- `type`
148148
- `minimumAvailableMass`
149149

150-
[API Reference](https://docs.usepatch.com/#/?id=projects)
150+
[API Reference](https://docs.patch.io/#/?id=projects)
151151

152152
#### Examples
153153

@@ -175,9 +175,9 @@ patch.projects.retrieveProjects({ minimumAvailableMass });
175175

176176
### Preferences
177177

178-
Preferences are how you route your orders in Patch. If you don't have a preference, Patch will allocate your order to the least expensive option. If you do have a preference, all of your orders will be sent to that project. You can set your preferences via API, or through the [Patch Dashboard](https://dashboard.usepatch.com/projects).
178+
Preferences are how you route your orders in Patch. If you don't have a preference, Patch will allocate your order to the least expensive option. If you do have a preference, all of your orders will be sent to that project. You can set your preferences via API, or through the [Patch Dashboard](https://dashboard.patch.io/projects).
179179

180-
[API Reference](https://docs.usepatch.com/#/?id=preferences)
180+
[API Reference](https://docs.patch.io/#/?id=preferences)
181181

182182
#### Examples
183183

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@patch-technology/patch",
3-
"version": "1.4.0",
3+
"version": "1.5.0",
44
"description": "JavaScript wrapper for the Patch API",
55
"license": "MIT",
66
"repository": {

src/ApiClient.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import querystring from 'querystring';
1010

1111
class ApiClient {
1212
constructor() {
13-
this.basePath = 'https://api.usepatch.com'.replace(/\/+$/, '');
13+
this.basePath = 'https://api.patch.io'.replace(/\/+$/, '');
1414
this.authentications = {
1515
bearer_auth: { type: 'bearer' }
1616
};
@@ -411,13 +411,13 @@ class ApiClient {
411411
hostSettings() {
412412
return [
413413
{
414-
url: 'https://api.usepatch.com',
414+
url: 'https://api.patch.io',
415415
description: 'No description provided',
416416

417417
variables: {
418418
defaultHost: {
419419
description: 'No description provided',
420-
default_value: 'api.usepatch.com',
420+
default_value: 'api.patch.io',
421421
enum_values: []
422422
}
423423
}

0 commit comments

Comments
 (0)