Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.
/ gsxwsapi Public archive

This project is no longer maintained, see README!

Notifications You must be signed in to change notification settings

yesdevnull/gsxwsapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

GSX Web Services API Project Status

A PHP Class by Dan "theblahman" Barrett

This class is intended for AASPs only

This project is no longer maintained as I'm no longer a member of an AASP

Web: http://theblahman.net

Content Outputs:

  • PHP
  • JSON
  • .plist

REQUIRES

  • PHP 5.3 and greater
  • SOAP module for PHP
  • JSON module for PHP

USAGE

INSTANTIATION

require_once ( 'gsxwsapi/gsx.php' );
	
$details = array (
	'apiMode'			=> 'production',
	'regionCode'		=> 'apac',
	'userId'			=> 'user@example.net',
	'password'			=> 'professor',
	'serviceAccountNo'	=> '0000XXXXXX',
	'languageCode'		=> 'en',
	'userTimeZone'		=> 'AEST' ,
	'returnFormat'		=> 'php' ,
);
	
$gsx = new GSX ( $details );

OBTAIN WARRANTY FROM SERIAL NUMBER

$gsx->lookup ( 'SERIALNUM' , 'warranty' );

LIST PARTS FOR SERIAL

$gsx->part ( 'SERIALNUM' );

OR

$gsx->part ( array ( 'serialNumber' => 'SERIALNUM' ) );

Or to specify certain parts within a serial number, combine serial number with a part description to get a filtered list:

$gsx->part ( array ( 'serialNumber' => 'SERIALNUM' , 'partDescription' => 'fan' ) );

PART DETAILS AND INFO

$gsx->part ( '922-9225' );

OR

$gsx->part ( array ( 'partNumber' => '922-9225' ) );

FUTURE PLANS

I hope to provide much nicer output than what is currently present.

Current:

array(1) {
  ["PartsLookupResponse"]=>
  array(3) {
    ["operationId"]=>
    string(23) "miscOpId"
    ["parts"]=>
    array(9) {
      ["partDescription"]=>
      string(3) "Fan"
      ["eeeCode"]=>
      string(0) ""
      ["exchangePrice"]=>
      string(1) "0"
      ["laborTier"]=>
      string(4) "LAB1"
      ["partNumber"]=>
      string(8) "922-9643"
      ["partType"]=>
      string(11) "Replacement"
      ["stockPrice"]=>
      string(4) "20.8"
      ["componentCode"]=>
      string(1) "1"
      ["isSerialized"]=>
      string(1) "N"
    }
    ["communicationMessage"]=>
    string(0) ""
  }
}

I'd ideally like to provide cleaner output along with HTTP style codes; in fact, codes will copy current HTTP/1.1 codes.

Planned:

array(1){
	["ResponseArray"]=>
	array(4) {
		["type"]=>
		string(6) "output"
		["code"]=>
		string(3) "200"
		["responseData"]=>
		array(9) {
			["partDescription"]=>
			string(3) "Fan"
			["eeeCode"]=>
			string(0) ""
			["exchangePrice"]=>
			string(1) "0"
			["laborTier"]=>
			string(4) "LAB1"
			["partNumber"]=>
			string(8) "922-9643"
			["partType"]=>
			string(11) "Replacement"
			["stockPrice"]=>
			string(4) "20.8"
			["componentCode"]=>
			string(1) "1"
			["isSerialized"]=>
			string(1) "N"
		}
		["urgentMessage"]=>
		string(0) ""
	}
}

Coming soon:

  • Clean display of content along with appropriate return codes
  • hopefully clean error output

Bitdeli Badge

About

This project is no longer maintained, see README!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages