aarondcoleman / Fitbit.NET

Fitbit .NET API Client Library
MIT License
193 stars 138 forks source link

Update, Tidy and Tweak #246

Open WestDiscGolf opened 5 years ago

WestDiscGolf commented 5 years ago

The general theme for this pull request is update and clean to aid with on boarding when new people start using the library and ready for the next release. The repository was generally a bit of a mess if we're being honest and this prevents people from understanding, consuming and contributing.

I also took the opportunity to remove the multiple solutions we had in the repository and clean that up as well. With the progression which has occurred with netstandard in the past year I have updated the project to multi target netstandard1.3 (is this still required?!) and netstandard2.0 and made the unit tests run on .NETCoreApp 2.1, 2.2 and .NETFramwork 4.6.1

In more detail:

  1. Removed the old OAuth 1 related projects as no longer required.
  2. Removed the "live debug" example, as no longer required and over complicated.
  3. Removed the old MVC sample and re-added with a more simpler cut down version
  4. (re)Added in Alex's sample console application (+ couple of tweaks)
  5. Upgraded Fitbit.Portable and Tests to use the new csproj version to allow for multi target
  6. Remove un-required packages related items, eg. .nuget folder and packages.config
  7. Upgraded some of the supporting nuget packages

And it addresses: #231, #230, #182, #237

@aarondcoleman There are a number of items from your team which I wasn't sure which branch they were/weren't in so there maybe commits in the request which have already been merged into the right place.

@AlexGhiondea Would be good to get your feedback on this request from a netstandard/netcore perspective now I've managed to merge all the projects into one with multi targeting.

aarondcoleman commented 5 years ago

We do want to remove all OA1 parts and finish the .Net Standard stuff, so if that can be done in a segregated way without internal library changes, we can work on taking that work.

Cheers, —Aaron

On Sat, Jan 5, 2019 at 12:59 PM Adam Storr notifications@github.com wrote:

The general theme for this pull request is update and clean to aid with on boarding when new people start using the library and ready for the next release. The repository was generally a bit of a mess if we're being honest and this prevents people from understanding, consuming and contributing.

I also took the opportunity to remove the multiple solutions we had in the repository and clean that up as well. With the progression which has occurred with netstandard in the past year I have updated the project to multi target netstandard1.3 (is this still required?!) and netstandard2.0 and made the unit tests run on .NETCoreApp 2.1, 2.2 and .NETFramwork 4.6.1

In more detail:

  1. Removed the old OAuth 1 related projects as no longer required.
  2. Removed the "live debug" example, as no longer required and over complicated.
  3. Removed the old MVC sample and re-added with a more simpler cut down version
  4. (re)Added in Alex's sample console application (+ couple of tweaks)
  5. Upgraded Fitbit.Portable and Tests to use the new csproj version to allow for multi target
  6. Remove un-required packages related items, eg. .nuget folder and packages.config
  7. Upgraded some of the supporting nuget packages

And it addresses: #231 https://github.com/aarondcoleman/Fitbit.NET/issues/231, #230 https://github.com/aarondcoleman/Fitbit.NET/issues/230, #182 https://github.com/aarondcoleman/Fitbit.NET/issues/182, #237 https://github.com/aarondcoleman/Fitbit.NET/issues/237

@aarondcoleman https://github.com/aarondcoleman There are a number of items from your team which I wasn't sure which branch they were/weren't in so there maybe commits in the request which have already been merged into the right place.

@AlexGhiondea https://github.com/AlexGhiondea Would be good to get your feedback on this request from a netstandard/netcore perspective now I've managed to merge all the projects into one with multi targeting.

You can view, comment on, or merge this pull request online at:

https://github.com/aarondcoleman/Fitbit.NET/pull/246 Commit Summary

  • Added new LogActivityAsync, GetActivityLogsList, GetHeartRate methods
  • Removed url string
  • Update to Newtownsoft
  • Start of adding some unit tests for new methods
  • Added unit tests for new methods
  • add heart rate methods to IFitBitClient interface
  • Update the version for the NUnit framework used to test
  • Change the way the sample data is discovered
  • Merge pull request #221 from bdrupieski/feature/add-heart-rate-methods-to-interface
  • Merge pull request #223 from AlexGhiondea/updateNUnit
  • Merge branch 'async-portable' of https://github.com/redmorello/Fitbit.NET-1 into redmorello-async-portable
  • Merge branch 'redmorello-async-portable' into issue228-CleanupActivityChanges
  • According to the API docs. The deault to represent the loggin in user shout be a "-" and not null
  • Renamed Value to HeartActivitesValue
  • Updated type of CustomHeartRateZones
  • Updated GetHeartActivitiesTimeSeries to work with new HeartActivities model
  • revert encodedUserId to default(string) since "ToFullUrl" takes care of the null values
  • Deleted file because the format did not match the api
  • New model to replace old Intraday model. This one matches the API
  • Project changes for the new model
  • Code to update Heart Rate Intraday
  • Update code for HeartRateTimeSeries
  • Updated client to reflect changes to the heart rate api structure
  • Removed old intraday code
  • Updated activity list model to match the api docs
  • Int to long
  • New functions to aloow for string dates to be passed
  • Extra tag broke csproj load
  • WIP: Started fixing tests for Heartrate
  • Refactor/Rename changed Value to HeartActivitiesValue. This was an unwanted change. Reverted back
  • Changes date prop from string to DateTIme
  • Fixed build errors that occured from changes to heart rate models
  • Added some instructions for use
  • Updated tests to validate HeartActivitiesIntradayTimeSeries
  • Changed Calories out to double to match API response
  • Include GetHeartRateTimeSeries1.1.json in output directory
  • Test and random changes before rollback
  • Partial rollback of changes, Decided to keep the previous version of the heart acvtivity models for ease of use. Also decided to kill the new heart rate methods (one's that allowed for a date string or a timespan)
  • Merge branch 'issue228-CleanupActivityChanges' of https://github.com/aarondcoleman/Fitbit.NET into issue228-CleanupActivityChanges
  • Updated Activity tests
  • Removed dup System.Threading.Tasks import in CSPROJ
  • Added System.Threading.Tasks back into CSPROJ
  • Removed f as calories is now represented as a double
  • Removed obsolete attributes
  • Update NUnit
  • Updated props to more closely resemble what Fitabase needs
  • One class per file
  • Naming conventions -- include Async
  • More formatting
  • Negative number check and formatting
  • comments and formatting
  • Unused class
  • Remove old commented code
  • One class per file
  • Imports
  • Merge pull request #229 from aarondcoleman/issue228-CleanupActivityChanges
  • Added DateOfActivity and changed Datetimes to DateTimeOffsets
  • Added function to pull activity logs for one day
  • return DateOfActivity as a string
  • Fixed DateTime comparison
  • Removed time from Activity Logs Request
  • Update tests to match activity changes
  • New test functions and file to test using the new activity logs format
  • New ActivityLog Model structure to more closely match Fitbit's response and allow for correctly deserialilzed time zone offsets
  • Added new serializer function, new method for getting one day's worth of activity, and changes to make use of the new Activity Logs Format
  • Adding the ability to init with JsonSerializerSettings that can be used to convert jsjon with time zones
  • LastModified to DateTimeOffset
  • DateOfActivity formatting
  • test deserialization error for time zones
  • New parse exception for time zones
  • Throw FitbitParseException
  • Use JsonDotNetSerializer class
  • XML comment update
  • Merge pull request #233 from aarondcoleman/issue232-OneDayActivityLogs
  • add IsNullOrWhiteSpace guard for userId param of GetHeartRateTimeSeries()
  • rework GetHeartRateTimeSeries to correctly utilize FitbitClientHelperExtensions.ToFullUrl(). Add better documentation on ToFullUrl()
  • Merge pull request #235 from aarondcoleman/issue234-getHeartRateTimeSeriesNullGuard
  • Cast HttpStatusCodes to int
  • Include System.Treading.Tasks nuget package
  • Revert "Include System.Treading.Tasks nuget package"
  • Fix System.Threading.Tasks reference
  • Merge pull request #244 from aarondcoleman/issue243-castHttpStatusCodeToInt
  • Merge; get up to date with v3 branch on Aaron's fork
  • remove oauth 1 projects; no longer required
  • remove fitbit live debug; no longer required, over complicating
  • remove fitbit samplewebmvc; old example
  • remove fitbit samplewebmvc; old example
  • Fixed some merge issues. Test only run in dotnetcore at the moment
  • Target Fitbit.Portable to netstandard 2.0 to remove the need for separate slns. Add multi target testing in the tests project; .NETCoreApp 2.1, 2.2 and .NETFramework 4.6.1
  • Removal of netcore sln/projs
  • Remove .nuget folder, no longer required.
  • Remove packages.config as no longer required
  • Re-add Alex's sample console application (+ couple of tweaks)
  • Remove secret things
  • Add back in the sample web application.

File Changes

Patch Links:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aarondcoleman/Fitbit.NET/pull/246, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ1CRXQh1gp2UTEzyl8MOUspk9TfUodks5vARIbgaJpZM4ZyFsP .

-- Founder & CEO Fitabase by Small Steps Labs LLC @aaronc

AlexGhiondea commented 5 years ago

Hey — didn’t see the notification for this until now — will take a look over the weekend!!