Skip to content

Commit

Permalink
Ecologi (Independent Publisher) (microsoft#1353)
Browse files Browse the repository at this point in the history
* certify-connector

HubSpot CRM, CMS, and Marketing connectors

* certify-connector

Xero Accounting and Payroll connectors

* Revert "certify-connector"

This reverts commit 5fb06db.

* Revert "certify-connector"

This reverts commit 160b208.

* certify-connector

* certify-connector

* certify-connector

* Update apiDefinition.swagger.json

Fixed description

* Update apiDefinition.swagger.json

Cut to below 500

* Update apiDefinition.swagger.json

Cut to below 500.

* Delete icon.png

* Delete settings.json

* Update apiDefinition.swagger.json

* Delete independent-publisher-connectors/HubSpot CMS directory

* Delete independent-publisher-connectors/HubSpot CRM directory

* Delete independent-publisher-connectors/HubSpot Marketing directory

* Delete independent-publisher-connectors/Xero Accounting directory

* Delete independent-publisher-connectors/Xero Payroll - UK directory

* Delete independent-publisher-connectors/Xero Projects directory

* Include iconBrandColor #da3b01 for IP

* Include iconBrandColor #da3b01 in best practices

* Rename README.template.md to readme.md

* Add templates for IP

* Fix typo

* Add files via upload

* Delete Google Cloud Translation directory

* Add files via upload
  • Loading branch information
troystaylor authored Feb 7, 2022
1 parent c601d06 commit 8d79160
Show file tree
Hide file tree
Showing 3 changed files with 346 additions and 0 deletions.
297 changes: 297 additions & 0 deletions independent-publisher-connectors/Ecologi/apiDefinition.swagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,297 @@
{
"swagger": "2.0",
"info": {
"title": "Ecologi",
"description": "Ecologi is a platform to reverse and halt climate change. We facilitate the funding of climate projects and tree planting projects around the world, allowing ordinary people to contribute to real climate action. Our mission is to remove 50% of global CO2 emissions by 2040 and to responsibly plant billions of trees every year.",
"version": "1.0",
"contact": {
"name": "Troy Taylor",
"url": "https://www.hitachisolutions.com",
"email": "ttaylor@hitachisolutions.com"
}
},
"host": "public.ecologi.com",
"basePath": "/",
"schemes": [
"https"
],
"consumes": ["application/json"],
"produces": ["application/json"],
"paths": {
"/impact/trees": {
"post": {
"responses": {
"201": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"format": "float",
"description": "The number of trees to purchase.",
"title": "Amount"
},
"currency": {
"type": "string",
"description": "The currency of the amount.",
"title": "Currency"
},
"treeUrl": {
"type": "string",
"description": "The URL for the trees you just planted.",
"title": "Tree URL"
},
"name": {
"type": "string",
"description": "The name you passed.",
"title": "Name"
}
}
}
}
},
"summary": "Purchase trees",
"description": "Use this action to purchase 1 or more trees per request.",
"operationId": "PurchaseTrees",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"number": {
"type": "integer",
"format": "int32",
"description": "The number of trees to purchase.",
"title": "Number"
},
"name": {
"type": "string",
"description": "The funded by name for these trees.",
"title": "Name"
},
"test": {
"type": "boolean",
"description": "Whether this is a test transaction or not.",
"title": "Test"
}
},
"required": ["number"]
}
}
]
}
},
"/impact/carbon": {
"post": {
"responses": {
"201": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"number": {
"type": "integer",
"format": "int32",
"description": "The number of units you purchased.",
"title": "Number"
},
"units": {
"type": "string",
"description": "The type of purchase you made.",
"title": "Units"
},
"numberInTonnes": {
"type": "number",
"format": "float",
"description": "The number of units you purchased converted to tons.",
"title": "Number In Tons"
},
"amount": {
"type": "integer",
"format": "int32",
"description": "The total cost of this transaction.",
"title": "Amount"
},
"currency": {
"type": "string",
"description": "The currency of the amount.",
"title": "Currency"
}
}
}
}
},
"summary": "Purchase carbon offsets",
"description": "Use this action to purchase 1 or more KG of carbon offsets per request.",
"operationId": "PurchaseOffsets",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"number": {
"type": "integer",
"format": "int32",
"description": "The number of units to purchase.",
"title": "Number"
},
"units": {
"type": "string",
"description": "The type of purchase to make.",
"title": "Units"
},
"test": {
"type": "boolean",
"description": "Whether this is a test transaction or not.",
"title": "Test"
}
},
"required": ["number", "units"]
}
}
]
}
},
"/users/{username}/impact": {
"get": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"trees": {
"type": "integer",
"format": "int32",
"description": "The total number of trees purchased.",
"title": "Trees"
},
"carbonOffset": {
"type": "integer",
"format": "int32",
"description": "The total number of carbon offsets purchased.",
"title": "Carbon Offset"
}
}
}
}
},
"summary": "Get total impact",
"description": "How many trees has this user planted, and how many tons of CO2 emissions have been offset.",
"operationId": "GetImpact",
"parameters": [
{
"name": "username",
"in": "path",
"x-ms-summary": "Username",
"x-ms-url-encoding": "single",
"description": "Your Ecologi username.",
"required": true,
"type": "string"
}
]
}
},
"/users/{username}/trees": {
"get": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"format": "int32",
"description": "The total number of trees purchased.",
"title": "Total"
}
}
}
}
},
"summary": "Get total number of trees",
"description": "The total number of trees this user has planted.",
"operationId": "GetTrees",
"parameters": [
{
"name": "username",
"in": "path",
"x-ms-summary": "Username",
"x-ms-url-encoding": "single",
"description": "Your Ecologi username.",
"required": true,
"type": "string"
}
]
}
},
"/users/{username}/carbon-offset": {
"get": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"format": "int32",
"description": "The total number of carbon offsets purchase.",
"title": "Total"
}
}
}
}
},
"summary": "Get total tons of CO2e offset",
"description": "The total number of tons of CO2e emissions has this user offset.",
"operationId": "GetOffset",
"parameters": [
{
"name": "username",
"in": "path",
"x-ms-summary": "Username",
"x-ms-url-encoding": "single",
"description": "Your Ecologi username.",
"required": true,
"type": "string"
}
]
}
}
},
"definitions": {},
"parameters": {},
"responses": {},
"securityDefinitions": {
"api_key": {
"type": "apiKey",
"in": "header",
"name": "Authorization"
}
},
"security": [],
"tags": [],
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://ecologi.com/"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://ecologi.com/pages/privacy-policy"
},
{
"propertyName": "Categories",
"propertyValue": "Lifestyle and Entertainment"
}
]
}
23 changes: 23 additions & 0 deletions independent-publisher-connectors/Ecologi/apiProperties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"properties": {
"connectionParameters": {
"api_key": {
"type": "securestring",
"uiDefinition": {
"displayName": "API Key (in the form 'Bearer ' API Key)",
"description": "The API Key (in the form 'Bearer ' API Key) for this api",
"tooltip": "Provide your API Key (in the form 'Bearer ' API Key)",
"constraints": {
"tabIndex": 2,
"clearText": false,
"required": "true"
}
}
}
},
"iconBrandColor": "#da3b01",
"capabilities": [],
"publisher": "Troy Taylor",
"stackOwner": "Ecologi"
}
}
26 changes: 26 additions & 0 deletions independent-publisher-connectors/Ecologi/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Ecologi
Ecologi is a platform to reverse and halt climate change. We facilitate the funding of climate projects and tree planting projects around the world, allowing ordinary people to contribute to real climate action. Our mission is to remove 50% of global CO2 emissions by 2040 and to responsibly plant billions of trees every year.

## Publisher: Troy Taylor, Hitachi Solutions

## Prerequisites
After reviewing the information on the [Business page](https://ecologi.com/business/overview), you will create a [pay-as-you-go account](https://ecologi.com/pay-as-you-go) in order to access the
Impact API.

## Obtaining Credentials
Once your pay-as-you-go account is created, navigate to the 'Impact API' page in your account to retrieve your API key.

## Supported Operations
### Purchase trees
Use this action to purchase 1 or more trees per request.
### Purchase carbon offsets
Use this action to purchase 1 or more KG of carbon offsets per request.
### Get total impact
How many trees has this user planted, and how many tons of CO2 emissions have been offset.
### Get total number of trees
The total number of trees this user has planted.
### Get total tons of CO2e offset
The total number of tons of CO2e emissions has this user offset.

## Known Issues and Limitations
The Impact API is not available for subscription accounts.

0 comments on commit 8d79160

Please sign in to comment.