shusaura85 / fancourier-api

PHP library to work with the new Fan Courier API v2.0 (selfawb.ro / api.fancourier.ro)
MIT License
21 stars 9 forks source link

Added new expiresAt field for Auth #19

Closed daika7ana closed 3 months ago

daika7ana commented 3 months ago

They added a new field on the Auth request that specifies when the returned token will expire on.

{"status":"success","data":{"token":"48944740|EJU0MgzeWY4y1zy9JpQg3cu3cDiqoVg1ZXsIrqLQ","expiresAt":"2024-06-11 07:23:53"}}

Therefore I added the following:

Sadly, their expiresAt is a bit vague since it's not your typical json date format that includes timezone information ( eg. 2012-12-25T16:30:00.000000Z. It's just a Y-m-d H:i:s format which I did note down in the code. My guess the timezone is Europe\Bucharest.