|
| 1 | +# klimapi-python |
| 2 | +This API offers you the possibility to calculate and offset emissions, create checkout links, get statistics and much more. |
| 3 | + |
| 4 | +- API version: v2 |
| 5 | +- Package version: 1.1.24 |
| 6 | + |
| 7 | +For more information, please visit [https://klimapi.com/resources/docs](https://klimapi.com/resources/docs) |
| 8 | + |
| 9 | +## Requirements |
| 10 | + |
| 11 | +Python 3.7+ |
| 12 | + |
| 13 | +## Installation |
| 14 | + |
| 15 | +### pip install |
| 16 | + |
| 17 | +If the python package is hosted on a repository, you can install directly using: |
| 18 | + |
| 19 | +```sh |
| 20 | +pip install git+https://github.com/KlimAPI/klimapi-python.git |
| 21 | +``` |
| 22 | +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/KlimAPI/klimapi-python.git`) |
| 23 | + |
| 24 | +Then import the package: |
| 25 | +```python |
| 26 | +import klimapi_python |
| 27 | +``` |
| 28 | + |
| 29 | +## Setup new API Instance |
| 30 | + |
| 31 | +```python |
| 32 | +import klimapi_python |
| 33 | + |
| 34 | +klimapi = klimapi_python.KlimApi('your-private-api-key') |
| 35 | +``` |
| 36 | + |
| 37 | +## Methods |
| 38 | + |
| 39 | +Method | HTTP request | Description |
| 40 | +------------- | ------------- | ------------- |
| 41 | +[**add_webhook**](docs/KlimApi.md#add_webhook) | **POST** /webhooks/add | Add Webhook |
| 42 | +[**calculate**](docs/KlimApi.md#calculate) | **POST** /calculate | Calculate |
| 43 | +[**calculate_cart**](docs/KlimApi.md#calculate_cart) | **POST** /stores/{store_ident}/cart | Calculate |
| 44 | +[**get_categories**](docs/KlimApi.md#get_categories) | **GET** /categories | Get all Categories |
| 45 | +[**get_certification_authorities**](docs/KlimApi.md#get_certification_authorities) | **GET** /certification_authorities | Get all Certification Authorities |
| 46 | +[**get_metrics**](docs/KlimApi.md#get_metrics) | **POST** /metrics | Order Metrics |
| 47 | +[**get_order**](docs/KlimApi.md#get_order) | **GET** /orders/{order_id} | Get Order |
| 48 | +[**get_orders**](docs/KlimApi.md#get_orders) | **POST** /orders | Get Orders |
| 49 | +[**get_payment_link**](docs/KlimApi.md#get_payment_link) | **GET** /orders/link/{payment_link_id} | Get Checkout Link |
| 50 | +[**get_project**](docs/KlimApi.md#get_project) | **GET** /projects/{project_id} | Get Project |
| 51 | +[**get_projects**](docs/KlimApi.md#get_projects) | **GET** /projects | Get all supported Projects |
| 52 | +[**link_by_calculation**](docs/KlimApi.md#link_by_calculation) | **POST** /orders/link/calculate | By calculation |
| 53 | +[**link_by_carbon**](docs/KlimApi.md#link_by_carbon) | **POST** /orders/link/carbon | By carbon |
| 54 | +[**link_by_price**](docs/KlimApi.md#link_by_price) | **POST** /orders/link/price | By price |
| 55 | +[**me**](docs/KlimApi.md#me) | **GET** /me | Get Authenticated User |
| 56 | +[**order_by_calculation**](docs/KlimApi.md#order_by_calculation) | **POST** /orders/process/calculate | By calculation |
| 57 | +[**order_by_carbon**](docs/KlimApi.md#order_by_carbon) | **POST** /orders/process/carbon | By carbon |
| 58 | +[**order_by_price**](docs/KlimApi.md#order_by_price) | **POST** /orders/process/price | By price |
| 59 | +[**pending_by_calculation**](docs/KlimApi.md#pending_by_calculation) | **POST** /orders/pending/calculate | By calculation |
| 60 | +[**pending_by_carbon**](docs/KlimApi.md#pending_by_carbon) | **POST** /orders/pending/carbon | By carbon |
| 61 | +[**pending_by_price**](docs/KlimApi.md#pending_by_price) | **POST** /orders/pending/price | By price |
| 62 | +[**process**](docs/KlimApi.md#process) | **POST** /orders/{order_id}/process | Process pending Order |
| 63 | +[**process_cart**](docs/KlimApi.md#process_cart) | **POST** /stores/{store_ident}/cart/{order_id}/process | Process cart |
| 64 | +[**refund**](docs/KlimApi.md#refund) | **DELETE** /orders/{order_id}/refund | Refund Order |
| 65 | +[**remove_webhook**](docs/KlimApi.md#remove_webhook) | **DELETE** /webhooks/remove | Remove Webhook |
| 66 | +[**sync_bulk_store**](docs/KlimApi.md#sync_bulk_store) | **POST** /stores/{store_ident}/sync/bulk | Sync multiple Products |
| 67 | +[**sync_store**](docs/KlimApi.md#sync_store) | **POST** /stores/{store_ident}/sync | Sync a single Product |
| 68 | + |
| 69 | + |
| 70 | +## Models |
| 71 | + |
| 72 | + - [AddWebhookRequest](docs/AddWebhookRequest.md) |
| 73 | + - [BuyAmount](docs/BuyAmount.md) |
| 74 | + - [BuyPrice](docs/BuyPrice.md) |
| 75 | + - [CalculateRequest](docs/CalculateRequest.md) |
| 76 | + - [CalculationResult](docs/CalculationResult.md) |
| 77 | + - [CalculationResults](docs/CalculationResults.md) |
| 78 | + - [CartItem](docs/CartItem.md) |
| 79 | + - [CartResult](docs/CartResult.md) |
| 80 | + - [CartResultCalculationResultsInner](docs/CartResultCalculationResultsInner.md) |
| 81 | + - [CartResultSettings](docs/CartResultSettings.md) |
| 82 | + - [Category](docs/Category.md) |
| 83 | + - [CertificationAuthority](docs/CertificationAuthority.md) |
| 84 | + - [CheckoutLink](docs/CheckoutLink.md) |
| 85 | + - [CheckoutLinkCalculated](docs/CheckoutLinkCalculated.md) |
| 86 | + - [CheckoutLinks](docs/CheckoutLinks.md) |
| 87 | + - [CheckoutLinksCalculated](docs/CheckoutLinksCalculated.md) |
| 88 | + - [GetMetricsRequest](docs/GetMetricsRequest.md) |
| 89 | + - [GetOrdersRequest](docs/GetOrdersRequest.md) |
| 90 | + - [GetOrdersRequestFilters](docs/GetOrdersRequestFilters.md) |
| 91 | + - [LinkByCalculationRequest](docs/LinkByCalculationRequest.md) |
| 92 | + - [LinkByCarbonRequest](docs/LinkByCarbonRequest.md) |
| 93 | + - [LinkByPriceRequest](docs/LinkByPriceRequest.md) |
| 94 | + - [MetadataOrders](docs/MetadataOrders.md) |
| 95 | + - [Order](docs/Order.md) |
| 96 | + - [OrderByCalculationRequest](docs/OrderByCalculationRequest.md) |
| 97 | + - [OrderCalculated](docs/OrderCalculated.md) |
| 98 | + - [OrderMetrics](docs/OrderMetrics.md) |
| 99 | + - [OrderRecipient](docs/OrderRecipient.md) |
| 100 | + - [PendingByCalculationRequest](docs/PendingByCalculationRequest.md) |
| 101 | + - [PendingByCarbonRequest](docs/PendingByCarbonRequest.md) |
| 102 | + - [PendingByPriceRequest](docs/PendingByPriceRequest.md) |
| 103 | + - [PendingOrder](docs/PendingOrder.md) |
| 104 | + - [PendingOrderCalculated](docs/PendingOrderCalculated.md) |
| 105 | + - [PendingOrders](docs/PendingOrders.md) |
| 106 | + - [PendingOrdersCalculated](docs/PendingOrdersCalculated.md) |
| 107 | + - [ProcessOrder](docs/ProcessOrder.md) |
| 108 | + - [Product](docs/Product.md) |
| 109 | + - [Project](docs/Project.md) |
| 110 | + |
| 111 | + |
0 commit comments