PHP Classes
elePHPant
Icontem

jApi RPC : Handle client and server API calls

Recommend this page to a friend!
  Info   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2013-09-27 (3 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 296 All time: 7,010 This week: 889Up
Version License PHP version Categories
japi-rpc 1.0Freely Distributable5PHP 5, User Management, Web services
Description Author

This package can handle client and server API calls.

The server classes can handle remote calls to an API implemented by custom classes.

The server classes can forward the calls to the API classes with the names as call parameters along with the functions being called.

API calls are available to establish authenticated user session management storing the user session data in files associated to cookies.

A client class is also made available to obtain access authorization from the server and keep it as a session token.

Picture of Bijaya Kumar  Behera
Name: Bijaya Kumar Behera <contact>
Classes: 6 packages by
Country: India India
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

Details
How to setup a jApi severver

1. open the jApi_config.php
2. create a new auth token id ,ie in example "jApi-12-4858"
3. $jApi_rules['jApi-12-4858'], $jApi_rules['jApi-12-4859'] ....
4. assign auth api user IP in 'auth_ip' from where api session request will sent to jAPi server
5. assign auth verify user url 
6. create api method 
    create a folder i,e jApi_server/jApi_accounts/jApi-12-4858/classes
    then create a file jApi_default_class.php
    code : 
    <?php
		class default_jApi_class extends jApi_class
		{
			static function function1 ($userid, $sess_data) {

			}
		}
	?>



How to setup a jApi cleint
1. open the jApi_config.php
2. // assign ur jApi JSON Api server 

define('jApi_auth_token', 'jApi-12-4858');

define('jApi_uri', 'http://localhost/jApi_server/pull.php');


3.  on client html javascript
   jApi.doApiCall('function1');
    or 
   jApi.doApiCall('default.function1');


   jApi.doApiCall('<class>.<method>');
  Files folder image Files  
File Role Description
Files folder imagejApi_client (4 files, 2 directories)
Files folder imagejApi_server (4 files, 3 directories)
Accessible without login Plain text file readme.txt Doc. example file

  Files folder image Files  /  jApi_client  
File Role Description
Files folder imagejApi_libs (2 directories)
Files folder imagejs (1 file)
  Accessible without login Plain text file index.php Aux. example file
  Accessible without login Plain text file jApi_config.php Conf. example file
  Accessible without login Plain text file jApi_verify.php Example example file
  Accessible without login Plain text file login.php Example example file

  Files folder image Files  /  jApi_client  /  jApi_libs  
File Role Description
Files folder imagejs (1 file)
Files folder imagesrc (1 file)

  Files folder image Files  /  jApi_client  /  jApi_libs  /  js  
File Role Description
  Accessible without login Plain text file jApi.js Data jPAi js file

  Files folder image Files  /  jApi_client  /  jApi_libs  /  src  
File Role Description
  Plain text file jApi_verify.class.php Class auxiliary file

  Files folder image Files  /  jApi_client  /  js  
File Role Description
  Accessible without login Plain text file functions.js Data example file

  Files folder image Files  /  jApi_server  
File Role Description
Files folder imagejApi_accounts (1 directory)
Files folder imagejApi_libs (1 file)
Files folder imagetmp (1 file)
  Accessible without login Plain text file jApi_config.php Conf. config file
  Accessible without login Plain text file jApi_session.php Example auxiliary file
  Accessible without login Plain text file jApi_verify_response.php Example auxiliary file
  Accessible without login Plain text file pull.php Example auxiliary file

  Files folder image Files  /  jApi_server  /  jApi_accounts  
File Role Description
Files folder imagejApi-12-4858 (1 directory)

  Files folder image Files  /  jApi_server  /  jApi_accounts  /  jApi-12-4858  
File Role Description
Files folder imageclasses (1 file)

  Files folder image Files  /  jApi_server  /  jApi_accounts  /  jApi-12-4858  /  classes  
File Role Description
  Plain text file jApi_default_class.php Class user class file

  Files folder image Files  /  jApi_server  /  jApi_libs  
File Role Description
  Plain text file jApi_class.php Class class source

  Files folder image Files  /  jApi_server  /  tmp  
File Role Description
  Accessible without login Plain text file index.php Data temp folder

 Version Control Unique User Downloads Download Rankings  
 0%
Total:296
This week:0
All time:7,010
This week:889Up