PHP code example of meiosis-io / amino

1. Go to this page and download the library: Download meiosis-io/amino 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/ */

    

meiosis-io / amino example snippets


$amino = new Meiosis\Amino($token, $team);
$pages = $amino
    ->pages($siteId)
    ->search([
        'name' => 'Press Release'
    ]);

// Show a list of the our page names:
foreach ($pages as $page) {
    echo $page->name;
}

$amino = new Meiosis\Amino($token, $team);
$newCustomer = $amino->customers()->blueprint();

$amino = new Meiosis\Amino($token, $team);
$customer = $amino->customers()->find($customerID);
// Save the customer
$amino->customers->save($customer);

$amino = new Meiosis\Amino($token, $team);
$customer = $amino->customers()->find($customerID);
// Save the customer
$customer->save();

$amino = new Meiosis\Amino($token, $team);

$amino = new Meiosis\Amino($token, $team);
return $amino->remoteTest();

$amino = new Meiosis\Amino($token, $team);
$customers = $amino->customers();

$amino = new Meiosis\Amino($token, $team);
$organizations = $amino->organizations();

$amino = new Meiosis\Amino($token, $team);
$transactions = $amino->transactions();

$amino = new Meiosis\Amino($token, $team);
$sites = $amino->sites();

$amino = new Meiosis\Amino($token, $team);
$siteToken = '12345-12345-123-12345';
$pages = $amino->pages($siteToken);

$amino = new Meiosis\Amino($token, $team);
$siteToken = '12345-12345-123-12345';
$pageTypes = $amino->pageTypes($siteToken);

$amino = new Meiosis\Amino($token, $team);
$siteToken = '54321-54321-543-54321';
$pageType = '12345-12345-123-12345';
$pageAttributes = $amino->pageAttributes($siteToken, $pageType);

$amino = new Meiosis\Amino($token, $team);

$customer = $amino->customers()->blueprint();

$customer->first = "John";
$customer->last  = "Doe";
$customer->email = "[email protected]";
$customer->save();

$amino->customers()->trackInteraction($customer, 'My Site', 'Filled out a form');

$amino = new Meiosis\Amino($token, $team);
$customer = $amino->customers()->find('[email protected]');

// Create a transaction Object
$transaction = $amino->transactions()->blueprint();

// Alternatively, you can instantate a new transaction directly.
// You'll need to pass it an instance of the CRMTransaction endpoint
// in order to use it's ->save() method.
// $transaction = new Meiosis\Models\Transaction([], $amino->transactions());

// Attach the customer
$transaction->customer = $customer;

// Create an item
$item = new Meiosis\Models\TransactionItem();
$item->price = 5.00;
$item->quantity = 2.25;

// Add the item to the transaction
$transaction->addItem($item);

// Save the transaction
$transaction->save();

$amino = new Meiosis\Amino($token, $team);

$siteID = '12345-123-123-12345';
$pages = $amino->pages($siteID)->search([
    'attr_category' => 'news'
]);