Loading...
Changes Saved.
Error Occurred!
Home Products Blog Community Support Resellers

Accessing API Commands in Your Custom Module

JEM allows you to access certain API commands for custom modules. You may need this for forwarding member data to your custom modules/functions.

To load API commands, you must first do the following:

  1. Open up /system/application/config/api.php
  2. Locate the module type you are using, and add the API classes you need to load for each type.  Separate them with commas.  For example:

    $config['jem_api_login_models'] = 'members,products,commissions';
    $config['jem_api_login_helpers'] = 'country,string';

  3. the models are essentially the classes listed in /system/application/models, while helpers are the function files listed in /system/application/helpers.  For more information on models and helpers, consult the CodeIgniter documentation
  4. Once you have saved the api.php file, you can now access the api commands in your module.  For example:

    $this->members_api->_get_member_details($data['member_id']);

  5. Listing of API commands can be found here



Related Articles

  • Module API Commands (50.38%)
    Here is a listing of API classes available for access in custom...
    0.00 - 2009-04-04 06:51:12
  • Creating a New JEM Module (37.99%)
    This document will attempt to outline steps for creating a module in...
    4.00 - 2009-11-29 14:32:52
  • Members Module API Commands (33.65%)
    *Use only on Custom Modules for login, account add, account update, account...
    0.00 - 2009-04-04 06:50:55