Skip to content

Instantly share code, notes, and snippets.

@sudeeptarlekar
Last active December 6, 2018 10:04
Show Gist options
  • Save sudeeptarlekar/b158d4ccfa772ffd4fb7780870261a8b to your computer and use it in GitHub Desktop.
Save sudeeptarlekar/b158d4ccfa772ffd4fb7780870261a8b to your computer and use it in GitHub Desktop.
Monthly Summary API

API

curl -X GET \
  'http://localhost:3000/api/v1/organizations/big_binary/time_trackings/monthly_summary?month=12&year=2018 \
  -H 'Content-Type: application/json' \
  -H 'X-Auth-Email: neeraj@bigbinary.com' \
  -H 'X-Auth-Token: kCK-Wh-xk6oYwpJn4BdP' \

JSON Response

{
    "2018-11-01": 8,
    "2018-11-02": 6.5,
    "2018-11-03": 0,
    "2018-11-04": 4,
    "2018-11-05": 9,
    "2018-11-06": 8,
    "2018-11-07": 5.033333333333333,
    "2018-11-08": 12,
    "2018-11-09": 8,
    "2018-11-10": 0,
    "2018-11-11": 0,
    "2018-11-12": 8,
    "2018-11-13": 0,
    "2018-11-14": 0,
    "2018-11-15": 0,
    "2018-11-16": 0,
    "2018-11-17": 0,
    "2018-11-18": 32,
    "2018-11-19": 0,
    "2018-11-20": 0,
    "2018-11-21": 0,
    "2018-11-22": 0,
    "2018-11-23": 0,
    "2018-11-24": 0,
    "2018-11-25": 40,
    "2018-11-26": 0,
    "2018-11-27": 0,
    "2018-11-28": 0,
    "2018-11-29": 0,
    "2018-11-30": 0,
    "2018-12-01": 0,
    "2018-12-02": 40,
    "2018-12-03": 5,
    "2018-12-04": 0,
    "2018-12-05": 0,
    "2018-12-06": 0,
    "2018-12-07": 0,
    "2018-12-08": 0,
    "2018-12-09": 0,
    "2018-12-10": 0,
    "2018-12-11": 0,
    "2018-12-12": 0,
    "2018-12-13": 0,
    "2018-12-14": 0,
    "2018-12-15": 0,
    "2018-12-16": 0,
    "2018-12-17": 0,
    "2018-12-18": 0,
    "2018-12-19": 0,
    "2018-12-20": 0,
    "2018-12-21": 0,
    "2018-12-22": 0,
    "2018-12-23": 0,
    "2018-12-24": 0,
    "2018-12-25": 0,
    "2018-12-26": 0,
    "2018-12-27": 0,
    "2018-12-28": 0,
    "2018-12-29": 0,
    "2018-12-30": 0,
    "2018-12-31": 0,
    "2019-01-01": 0,
    "2019-01-02": 0,
    "2019-01-03": 0,
    "2019-01-04": 0,
    "2019-01-05": 0,
    "2019-01-06": 0,
    "2019-01-07": 0,
    "2019-01-08": 0,
    "2019-01-09": 0,
    "2019-01-10": 0,
    "2019-01-11": 0,
    "2019-01-12": 0,
    "2019-01-13": 0,
    "2019-01-14": 0,
    "2019-01-15": 0,
    "2019-01-16": 0,
    "2019-01-17": 0,
    "2019-01-18": 0,
    "2019-01-19": 0,
    "2019-01-20": 0,
    "2019-01-21": 0,
    "2019-01-22": 0,
    "2019-01-23": 0,
    "2019-01-24": 0,
    "2019-01-25": 0,
    "2019-01-26": 0,
    "2019-01-27": 0,
    "2019-01-28": 0,
    "2019-01-29": 0,
    "2019-01-30": 0,
    "2019-01-31": 0
}

Rails

  • /app/contorllers/api/v1/time_trackings_controller.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment