Happpi PHP Library

submitReview()

Submits a review for a particular part.

Return Type

string

Required Parameters

    submitReview(int $rating, string $subject, string $review_text, string $name, string $email)

Optional Parameters

    None

Dependencies

    $part->setPartID(int $value)

Example:

<!-- submitReview() -->
<?php
	require_once('libraries/happpi/LoadAll.php'); // points to the LoadAll.php file for loading the library.

	// once the library is required, you can now use one of the main "interaction" classes.
	// These interaction classes contain methods that get information from our REST API and
	// converts them to PHP objects for you to use.
	$Part = new CurtPart(); // create new part object to gain access to its functions.
	$Part->setPartID(11000); // set required dependency of partID to chose which part the review is for.
	// use the SubmitReview() method to submit a review of a part
	//echo $Part->submitReview(5, "Subject here", "review text here", "Name here", "email here" ); //  and then return a success/failure message.
?>