Good afternoon,
I have a bit of a noob question here. I’m learning swift, and I’d like to write an application to access (read only at first) data from my EE3 site. All the good data I’m hoping to access is locked behind logins for members (https)
I’ve read a number of terms, but I was hoping someone might be able to point me in the right direction on what I should study up on first?
REST? JSON? AJAX? XID_CODE?
I understand I’ll probably using a swift NSURLSession call along with some authentication.
Really appreciate anyone’s thoughts here.
Cheers!
I don’t know anything about Swift, but I’ve created a few APIs for accessing EE data. You’ll need to create a module and register an of action for each endpoint in your API. Check out this page for how to create a module (or work your way through the add-on development section of the documentation). You’ll also want to implement the Strict_XID interface on your action receiving class in the module, as per the security guidelines. In your client-side code you’ll need to have a hidden field with the name csrf_token and pass this token along with your other form data when you make your AJAX request to the action endpoint.
I found the best way to get to grips with developing modules in EE was to rip apart an existing well-written module, such as those created by Low. He’s also created a video course called “Building an ExpressionEngine Add-on” (note that the course is for EE 2, but a lot of the core principles in developing EE 2 modules still apply in EE 3). There seems to be a dearth of information about developing add-ons specifically for EE 3.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.