1. Go to this page and download the library: Download coincitymexico/coincity-sdk 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/ */
coincitymexico / coincity-sdk example snippets
$token = "your token for sdk"
$sdk = new Configuration();
// Set your token
$sdk->setToken($token);
// Disable SSL/HTTPS only for local use
$sdk->setSsl(false);
// Custom your website base endpoint
$sdk->setWebsite("https://localhost/coincity/dash/api");
use \Coincity\SDK\Fun;
Fun\User::class;
Fun\Search::class;
Fun\SearchCookie::class;
Fun\Stock::class;
Fun\StockSync::class;
Fun\StockMovement::class;
Fun\Category::class;
Fun\SubCategory::class;
Fun\SubCategoryMachine::class;
Fun\Brands::class;
Fun\Model::class;
// ... wait for more
$user = new User();
$id = 123;
$user->attributes->setId($id);// this says if is new register or edit
$user->attributes->setName("Testing");
$user->attributes->setLastName("Now");
$user->attributes->setEmail("[email protected]");
$user->attributes->setEmailAlternative("[email protected]");
$user->attributes->setPassword("12345678");
$user->attributes->setPasswordConfirm("12345678");
$user->attributes->setCompany("OWL DESARROLLOS");
$result = $user->save();