nhirschey / FSharp.Data.Fred

Wrapper for Federal Reserve Economic Data API https://nhirschey.github.io/FSharp.Data.Fred/
MIT License
2 stars 3 forks source link

Add new methods, new inputs, documentation and tests. #1

Closed DavideGCosta closed 2 years ago

DavideGCosta commented 3 years ago

I tried to think as a student to figure out the easiest way to use this library.

You can see that I changed the output of the functions to avoid using repetition. Example: To get observations, we would do: x.Fred.Series.Observations.Observations, I think this might confuse students.

Also, in this case, I thought, what do we really want from this function (the data and the value), so despite saying that getting the JSON values is interesting, I think that having so many fields might be tricky for students. So I did:

|> Seq.map(fun obs -> 
    {
        Date = obs.Date
        Value = obs.Value
      })

If you want to see these changes to the different functions, use control + F with - Davide Costa to find the comments.

nhirschey commented 2 years ago

Should we close this now @DavideGCosta ?

DavideGCosta commented 2 years ago

Yes, I can see the changes! Will keep them in mind for next time! Yes, we can close it