blog-contest-may-mayhem icon indicating copy to clipboard operation
blog-contest-may-mayhem copied to clipboard

APIs The Eloquent Way - A Package To Consume Third Party APIs Like A Database. Models, Relations, Method Chaining And More

Open oheck opened this issue 6 years ago • 4 comments

https://blackbits.io/blog/apis-the-eloquent-way

oheck avatar May 29 '18 01:05 oheck

Interesting subject. For the Active Record part, if you did not already, you should read this series of posts

RemiCollin avatar May 29 '18 08:05 RemiCollin

This is a really interesting take on a problem I've also tried to tackle.

I approached it slightly differently, using a kind of Eloquent Model (called a Resource) that's been adapted to replace calls to a DB with a generic GuzzleHttp client instance.

I haven't quite tackled all of the areas of concern that this covers though. Plus it feels much nicer to be able to distinguish which API client-model combo is the target by declaring it explicitly during invocation... that would make working with multiple APIs a lot easier!

Great work!

simonhamp avatar May 29 '18 12:05 simonhamp

https://i.imgur.com/M7FFyuW.gif

ananasili avatar May 30 '18 09:05 ananasili

Very nice Work!

dswagner94 avatar Jun 01 '18 17:06 dswagner94