Skip to content

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!

Notifications You must be signed in to change notification settings

run-the-jules/joules-utility-microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

joules-utility-microservice

About this App

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:

Versions

  • Ruby 2.5.3

  • Rails 5.2.4.3

Contributors Forks Stargazers Issues

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Contact
  6. Acknowledgements

About The Application

This application provides API endpoints for our Jules-API to consume, and fetches data from utilityAPI.

Built With

Getting Started

Installation

  1. Fork and Clone the repo

    git clone https://github.com/run-the-jules/joules-utility-microservice.git
    
  2. Install gems -- For list of Gems see here

    bundle install
    
  3. Get your API key, you can request a demo here

  4. Set API key with

    export UTILITY_API_KEY='Your Key Here'
    

Endpoints

A Postman collection can be imported here to test endpoints directly from the UtliityAPI.

  1. 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\"}"]
    
  2. 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\"}}"
    
    
  3. 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\"}]}"
    
  4. 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}}]}"
    

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Project Link: https://github.com/run-the-jules/joules-utility-microservice

Acknowledgements

About

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!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages