Joules utility microservice consumes utilityAPI to provide realtime electricity stats for Run The Jules users. Where a user can sign up and compare their electricity usage with their friends or to an anynomous average in their area!
This project is deployed on:
-
Ruby 2.5.3
-
Rails 5.2.4.3
Table of Contents
This application provides API endpoints for our Jules-API to consume, and fetches data from utilityAPI.
-
Fork and Clone the repo
git clone https://github.com/run-the-jules/joules-utility-microservice.git
-
Install gems -- For list of Gems see here
bundle install
-
Get your API key, you can request a demo here
-
Set API key with
export UTILITY_API_KEY='Your Key Here'
A Postman collection can be imported here to test endpoints directly from the UtliityAPI.
-
Utilities
get "/api/v1/utilities"
This will return a list of all currently supported utilities in the following format
["{\"data\":[{\"id\":\"ACE\",\"utility_name\":\"Atlantic City Electric\"}, {\"id\":\"AEPOHIO\",\"utility_name\":\"American Electric Power Ohio\"},{\"id\":\"APS\",\"utility_name\":\"Arizona Public Service Company\"},{\"id\":\"AustinEnergy\"}"]
-
New User
get "/api/v1/new_user"
This request must include an email and utility param. It will verify a user and return a referral code that allows meters activation.
{\"data\":{\"authorization_uid\":null,\"created\":\"2021-02- 27T19:19:55.504653+00:00\",\"customer_email\":\"\",\"disabled\":false,\"is_archived\":false,\"scope\":{},\"template_uid\":\"33ae3462\",\"uid\":\"222222\",\"updated\":\"2021-02-27T19:19:55.514430+00:00\",\"url\":\"https://utilityapi.com/authorize/customername?f=11014777-7efa-4aea-afac-96d032600cec\",\"user_email\":\"[email protected]\",\"user_uid\":\"12121\",\"utility\":\"ACE\"}}"
-
Meters
get "/api/v1/get_meters"
This request must include a referral param. It will return a meter_uid allowing bill retrieval.
"{\"data\":[{\"meter_uid\":\"711267\"}]}"
-
Bills
get "/api/v1/bills"
This request must include a meter_uid param. This param allows bill retrieval in the following format.
"{\"data\":[{\"start_date\":\"2020-12-31T16:00:00.000000-08:00\",\"end_date\":\"2021-01-31T16:00:00.000000-08:00\",\"kwh\":743.0,\"meter_uid\":\"711267\",\"user_uid\":185072}}]}"
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
- Alexander Osborne - Github LinkedIn
- Aiden Mendez - Github LinkedIn
- Catherine Dean - Github LinkedIn
- James Fox-Collis - Github LinkedIn
- Robert Heath - Github LinkedIn
- Joe Jiang - Github LinkedIn
Project Link: https://github.com/run-the-jules/joules-utility-microservice