0

i want to build an APP which need access to channels of my EE instance. I found Open API (https://github.com/putyourlightson/open-api) but it is outdated (last change > 5 yrs). Is there another way to get the entries (and other stuff maybe) or has someone experience with using Open API with EE?

Greetings

0

Maybe you could use the excellent https://addons.reinos.nl/webservice

| improve this answer | |
  • Mhm.. i will take a look – Lars Apr 17 '19 at 9:07
0

You can get Channel Entries by using latest feature of EE and i.e.Model. You need to write below code to get the entries.

$data = ee('Model')->get('ChannelEntry')
    ->filter('channel_id', 'enter_your_channel_id') //filter by channel_id
    ->all();

Here, I have included only channel_id as a filter parameter but you can add many more according to your requirement.

| improve this answer | |
  • I can use these php code in a ee template which can be used api? – Lars Apr 17 '19 at 9:07
  • Yes, this PHP code will works in EE templates with turning on PHP. In other way, you can create simple plugin from where you can return $data by parsing the template variable. – Harsh Barach Apr 17 '19 at 11:27
  • is there somewhere a documentation about ee('Model') and other php classes? In the official docs i doesn't find smth – Lars Apr 17 '19 at 12:46
  • @Lars There is no official docs for EE Models. You can get more idea by reviewing it's core files. – Harsh Barach Apr 17 '19 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.