Exemplo n.º 1
0
 * @author dhermes@google.com
 * @copyright Google Inc, 2011
 * @package GShoppingContent
 */
// import our library
require_once 'GShoppingContent.php';
// Get the user credentials
$creds = Credentials::get();
// Create a client for our merchant and log in
$client = new GSC_Client($creds["merchantId"]);
$client->login($creds["email"], $creds["password"]);
// Now enter some account data
$account = new GSC_ManagedAccount();
$account->setTitle("ABC Store");
$account->setDescription("Description of ABC Store");
$account->setAccountLink("http://abcstore.example.com/new");
$account->setAdultContent("no");
$account->setInternalId("BCDE");
$account->setReviewsUrl("http://my.site.com/reviews?mo=user-rating");
$insertedAccount = $client->insertAccount($account);
echo 'Inserted: ' . $insertedAccount->getAtomId() . "\n";
/**
 * Credentials - Enter your own values
 *
 * @author afshar@google.com
**/
class Credentials
{
    public static function get()
    {
        return array("merchantId" => "7842698", "email" => "*****@*****.**", "password" => "subhanul");