php mautic类别

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php mautic类别相关的知识,希望对你有一定的参考价值。

<?php
$categoryApi = $api->newApi("categories", $auth, $apiUrl);

//get an category
$category = $categoryApi->get($id);

//Returns a list of contact categories available to the user
$categories = $categoryApi->getList($searchFilter, $start, $limit, $orderBy, $orderByDir, $publishedOnly, $minimal);

//create new category
$data = array(
    'categoryname' => 'test',
    'categoryemail' => 'test@category.com',
    'categorycity' => 'Raleigh',
);

$category = $categoryApi->create($data);

//edit a category
$id   = 1;
$data = array(
    'title' => 'test',
    'bundle' => 'asset'
);

// Create new a category of ID 1 is not found?
$createIfNotFound = true;

$category = $categoryApi->edit($id, $data, $createIfNotFound);

//delete a category
$category = $categoryApi->delete($id);

以上是关于php mautic类别的主要内容,如果未能解决你的问题,请参考以下文章

php mautic短信

php mautic chanel营销信息

php mautic动态内容

php Mautic运动

php mautic API - 联系

PHP:使用 OAuth1a 调用 Mautic API