Activity
Posted in Adding an extra method to an API wrapper
Hey! I've been following the API wrapper series and I've got my Gem pretty much ready to go. There's a few areas of the API which I'd like to make easier and I'm trying to work out how to do this.
In the API there's a createdAt
field in this format: 1635031167000
. Trying to convert this with Time.at
throws an error so I'd like to add a created_at
field in this Object method, which parses it properly as Time.at(completedAt.to_s[0..-4].to_i)
, but I can't work out how to add it to the OpenStruct.
Any help would be appreciated!