Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
REST Client
  • Hi guys,
    how can I use fuel classes to run a call to a REST services ( like Twitter, Facebook, Google Analytics, ... ) ?? Like Phil's REST Client ( https://github.com/philsturgeon/codeigniter-restclient ) Cheers
  • I haven't see a Fuel Rest Client function yet.
    Personally I think that can be a good feature to connect a webapp with external services like Google Analytics and others without using curl whenever. What do you think about that??
  • I'll leave this to Phil. Maybe you can contact him on twitter, he's travelling at the moment, I'm not sure he reads this...
  • Ok ok thank you.
    I didn't have any feedback and I didn't know that you have informed Phil We waiting the bad boy returns! :-)
  • I see all things. I'm probably going to be travelling for the forseeable future so don't worry about poking me, I fit in fun work when I've done all my client work and have to wait for the money to come in. Can't party for free! :( So a REST client would be sweet for sure, but I'm wondering about the best way. I COULD just port the CI library easily enough, but I would like it to be more awesome than that. The CI REST lib is just a convenience wrapper for the Curl library and the Format library, but so much more could be done to make it less weak. It depends what we plan on doing with the Request library, as that can deal with methods, headers, etc. Maybe we could beef up the Request library to handle external requests better, then have REST wrap around that instead of Curl? Could do with Dan's view on this one.
  • Where is dan lately anyways? I haven't even seen him since I joined the community.
  • And a great community it is.
    Core developers who want to create a framework just to make our lives (and theirs) a bit easier.
  • Any update on this? Would be quite a neat addition to Fuel :-)
  • Today WanWizard created first version of REST client. https://github.com/fuel/core/commit/68e660be08617e4b98ab9e8d0697d50fc562ee04 It's in the develop branch, if you wanna grab it and test, you can always pick up the files yourself and don't forget to update the bootstrap
  • Class Controller_Test extends \Controller_Rest {
        // your code here
    }
    

    See http://fuelphp.com/docs/general/controllers/rest.html for more information.
  • Thank you WanWizard,
    but I want a REST Client, not a REST Server to call, for example, Google Analytics with something like curl. There's a way to do this using Fuel classes or I have to use curl? Sorry if I haven't explained well

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion