{"id":15562215,"url":"https://github.com/deanpcmad/ecologi","last_synced_at":"2025-03-29T04:44:13.516Z","repository":{"id":147888406,"uuid":"463325043","full_name":"deanpcmad/ecologi","owner":"deanpcmad","description":"Ruby library for interacting with the Ecologi API","archived":false,"fork":false,"pushed_at":"2022-02-24T22:54:21.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-03T14:37:12.486Z","etag":null,"topics":["ecologi","ruby","rubygem"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deanpcmad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-24T22:49:30.000Z","updated_at":"2022-02-27T11:58:28.000Z","dependencies_parsed_at":"2023-05-27T20:15:16.206Z","dependency_job_id":null,"html_url":"https://github.com/deanpcmad/ecologi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanpcmad%2Fecologi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanpcmad%2Fecologi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanpcmad%2Fecologi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanpcmad%2Fecologi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deanpcmad","download_url":"https://codeload.github.com/deanpcmad/ecologi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246140543,"owners_count":20729797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecologi","ruby","rubygem"],"created_at":"2024-10-02T16:12:26.481Z","updated_at":"2025-03-29T04:44:13.509Z","avatar_url":"https://github.com/deanpcmad.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ecologi\n\nThis is a Ruby library for interacting with the Ecologi API.\n\n## Usage\n\nTo get started, install the gem as normal:\n\n```ruby\ngem \"ecologi\"\n```\n\nThen you'll need to grab an API key from your [Impact API page](https://ecologi.com/account/api).\n\nOnce you've got an API key, setup a client like so:\n\n```ruby\n@client = Ecologi::Client.new(api_key: ENV[\"API_KEY\"])\n```\n\nYou can then use the following methods.\n\n### Purchasing Trees\n\nTo purchase trees for an account. Requires a number. The name parameter is optional.\n\n```ruby\n@client.trees.purchase number: 2, name: \"Tree's for user\"\n\n#=\u003e #\u003cEcologi::TreePurchase amount=0.38...\n```\n\n### Purchasing Carbon Offsets\n\nTo purchase carbon offsets for an account. Requires number and units.\n\nUnits must be either KG or Tonnes.\n\n```ruby\n@client.carbon_offsets.purchase number: 2, units: \"KG\"\n\n#=\u003e #\u003cEcologi::CarbonOffsetPurchase number=2...\n```\n\n### Reporting - Total Impact\n\nReturns the total number of trees and carbon offset for a user.\n\n```ruby\n@client.reporting.total_impact username: \"deanpcmad\"\n\n#=\u003e #\u003cEcologi::Report trees=1337...\n```\n\n### Reporting - Total Trees\n\nReturns the total number of trees for a user.\n\n```ruby\n@client.reporting.total_trees username: \"deanpcmad\"\n\n#=\u003e #\u003cEcologi::Report total=1337...\n```\n\n### Reporting - Total Carbon Offset\n\nReturns the total amount of carbon offset for a user.\n\n```ruby\n@client.reporting.total_carbon username: \"deanpcmad\"\n\n#=\u003e #\u003cEcologi::Report total=1337...\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/deanpcmad/ecologi.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanpcmad%2Fecologi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeanpcmad%2Fecologi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanpcmad%2Fecologi/lists"}