Skip to content

Commit

Permalink
move weight and body fat goals into goals file; singularize names of …
Browse files Browse the repository at this point in the history
…weight and body fat goals methods for more clarity
  • Loading branch information
zokioki committed May 1, 2016
1 parent fe11e9a commit 0d87468
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-----
- Add support for Activity and Heart Rate Intraday Time Series endpoints.
- Add support for weight and fat logging and deletion endpoints.
- Renamed `#weight_goals` and `#body_fat_goals` to `#weight_goal` and `#body_fat_goal`.

0.6.0
-----
Expand Down
8 changes: 0 additions & 8 deletions lib/fitbyte/body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ def body_fat_logs(date=Date.today, opts={})
get("user/-/body/log/fat/date/#{format_date(date)}.json", opts)
end

def weight_goals(opts={})
get("user/-/body/log/weight/goal.json", opts)
end

def body_fat_goals(opts={})
get("user/-/body/log/fat/goal.json", opts)
end

def body_time_series(resource, opts={})
start_date = opts[:start_date]
end_date = opts[:end_date] || Date.today
Expand Down
12 changes: 12 additions & 0 deletions lib/fitbyte/goals.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ class Client
# GET Goals
# =========

# Retrieves a user's current weight goal.

def weight_goal(opts={})
get("user/-/body/log/weight/goal.json", opts)
end

# Retrieves a user's current body fat percentage goal.

def body_fat_goal(opts={})
get("user/-/body/log/fat/goal.json", opts)
end

# Retrieves a user's current daily activity goals.

def daily_goals(opts={})
Expand Down

0 comments on commit 0d87468

Please sign in to comment.