From 0a29e35ceef84c513b66231f6fbfcfbb5205b448 Mon Sep 17 00:00:00 2001 From: Lovisa Svallingson Date: Mon, 1 Mar 2021 09:59:21 -0800 Subject: [PATCH] Update Patch URL; lint --- CHANGELOG.md | 6 ++++++ README.md | 7 ++++--- patch_api/__init__.py | 2 +- patch_api/api_client.py | 2 +- patch_api/configuration.py | 6 +++--- setup.py | 2 +- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d5dcc7..6097346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.0] - 2021-03-01 + +### Changed + +- Changed base URL from https://api.usepatch.com to https://api.patch.io + ## [1.4.0] - 2021-02-15 ### Added diff --git a/README.md b/README.md index 51d1abd..6475a9f 100644 --- a/README.md +++ b/README.md @@ -4,18 +4,18 @@ [![PyPI version](https://badge.fury.io/py/patch-api.svg)](https://badge.fury.io/py/patch-api) [![Discord](https://img.shields.io/discord/733029448558837792)](https://discord.gg/AU8543D) -The official Python library for the [Patch API](https://www.usepatch.com). +The official Python library for the [Patch API](https://www.patch.io). ## Documentation -For a complete API reference, check out [Patch's API Reference.](https://docs.usepatch.com/). +For a complete API reference, check out [Patch's API Reference.](https://docs.patch.io/). ## Installation Add the library to your `requirements.txt` file: ```txt -patch_api >= 1.4.0 +patch_api >= 1.5.0 ``` Then run: @@ -153,6 +153,7 @@ patch.estimates.retrieve_estimates(page=page) Projects are the ways Patch takes CO2 out of the air. They can represent reforestation, enhanced weathering, direct air carbon capture, etc. When you place an order via Patch, it is allocated to a project. When fetching projects, you can supply filters to the query to narrow your result. Currently supported filters are: + - `country` - `type` - `minimum_available_mass` diff --git a/patch_api/__init__.py b/patch_api/__init__.py index db0ed7f..9ae2dbf 100644 --- a/patch_api/__init__.py +++ b/patch_api/__init__.py @@ -15,7 +15,7 @@ from __future__ import absolute_import -__version__ = "1.4.0" +__version__ = "1.5.0" # import ApiClient from patch_api.api_client import ApiClient diff --git a/patch_api/api_client.py b/patch_api/api_client.py index 3788548..87f1d48 100644 --- a/patch_api/api_client.py +++ b/patch_api/api_client.py @@ -91,7 +91,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.4.0/python" + self.user_agent = "OpenAPI-Generator/1.5.0/python" def __del__(self): if self._pool: diff --git a/patch_api/configuration.py b/patch_api/configuration.py index 296e1cf..39cc654 100644 --- a/patch_api/configuration.py +++ b/patch_api/configuration.py @@ -58,7 +58,7 @@ class Configuration(object): def __init__( self, - host="https://api.usepatch.com", + host="https://api.patch.io", api_key=None, api_key_prefix=None, username=None, @@ -341,7 +341,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: v1\n" - "SDK Package Version: 1.4.0".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 1.5.0".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self): @@ -356,7 +356,7 @@ def get_host_settings(self): "variables": { "defaultHost": { "description": "No description provided", - "default_value": "api.usepatch.com", + "default_value": "api.patch.io", } }, } diff --git a/setup.py b/setup.py index 20f4505..b819863 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "patch-api" -VERSION = "1.4.0" +VERSION = "1.5.0" # To install the library, run the following # # python setup.py install