PHP code example of amattu2 / vinwiki-wrapper

1. Go to this page and download the library: Download amattu2/vinwiki-wrapper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

amattu2 / vinwiki-wrapper example snippets




$wrapper = new amattu2\VINwiki\Client("email|username", "password");

  // for the current user
  print_r($wrapper->getPersonProfile());

  // or for a specific user
  print_r($wrapper->getPersonProfile("61382da4-25c6-494f-8065-87afdfb4f50d"));
  

  $person = new amattu2\VINwiki\Models\Person([
    "email" => "[email protected]",
  ]);
  print_r($wrapper->updatePersonProfile("{UUID GOES HERE}", $person));
  

  print_r($wrapper->getPersonNotifications());
  

  // for the current user
  print_r($wrapper->getPersonFeed());

  // or for a specific user
  print_r($wrapper->getPersonFeed("61382da4-25c6-494f-8065-87afdfb4f50d", false));
  

  // for the current user
  print_r($wrapper->getPersonPosts());

  // or for a specific user
  print_r($wrapper->getPersonPosts("61382da4-25c6-494f-8065-87afdfb4f50d"));
  

  print_r($wrapper->getRecentVins());
  

  print_r($wrapper->plateLookup("HELLO", "US", "CA"));
  

  print_r($wrapper->getFeed("WBAPL33579A406957"));
  

  print_r($wrapper->getVehicle("WBAPL33579A406957"));
  

  print_r($wrapper->vehicleSearch("2011 Toyota Corolla"));
  

  print_r($wrapper->updateVehicle("WBAPL33579A406957", 2009, "BMW", "335i", "xDrive"));
  

  // Create a new post class
  $post = new amattu2\VINwiki\Models\VehiclePost([
    "mileage" => 43000,
    "text" => "This is a test post from the VINwiki-Wrapper PHP library.",
  ]);

  // Post it
  print_r($wrapper->createPost("WBAPL33579A406957", $post));
  

  print_r($wrapper->deletePost("61382da4-25c6-494f-8065-87afdfb4f50d"));