当前位置: 首页>>代码示例>>PHP>>正文


PHP Client::relateIQ方法代码示例

本文整理汇总了PHP中Client::relateIQ方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::relateIQ方法的具体用法?PHP Client::relateIQ怎么用?PHP Client::relateIQ使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Client的用法示例。


在下文中一共展示了Client::relateIQ方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testListsGetAll

 public function testListsGetAll()
 {
     Client::relateIQ(GlobalVar::KEY, GlobalVar::SECRET);
     Lists::setFetchOptions(["_ids" => "53ae0c09e4b0f0eb6bc57ecd"]);
     $lists = Lists::fetchPage();
     $this->assertNotNull($lists);
 }
开发者ID:vicioux,项目名称:apisdk,代码行数:7,代码来源:lists_tests_console.php

示例2: testAccountSaveCreate

 public function testAccountSaveCreate()
 {
     Client::relateIQ(GlobalVar::KEY, GlobalVar::SECRET);
     $account = new Account(['name' => 'Account Created']);
     $res = $account->save();
     $this->assertInstanceOf('Account', $res);
     $this->assertEquals('Account Created', $res->name());
 }
开发者ID:vicioux,项目名称:apisdk,代码行数:8,代码来源:accounts_test.php

示例3: testUsers

 public function testUsers()
 {
     Client::relateIQ(GlobalVar::KEY, GlobalVar::SECRET);
     $data = ['id' => '538530d2e4b00530d85ae1bf', 'name' => 'Juan Perez', 'email' => 'juan@gmail.com'];
     $other = new User(['data' => $data]);
     $this->assertInstanceOf('User', $other);
     $this->assertEquals($data['id'], $other->id());
     $this->assertEquals($data['name'], $other->name());
     $this->assertEquals($data['email'], $other->email());
 }
开发者ID:vicioux,项目名称:apisdk,代码行数:10,代码来源:users_test.php

示例4: testEvent

 public function testEvent()
 {
     Client::relateIQ(GlobalVar::KEY, GlobalVar::SECRET);
     $event = new Events([]);
     $event->subject("Support Ticket #12345: How do I create an event?");
     $event->body("Just called Tim and walked him through how to create an event with the new API.\n    He'll reach out to support@relateiq.com with any questions he might have.\n    Resolving.\n    - James");
     $participantIds = [["type" => "email", "value" => "james.mcsales@relateiq.com"], ["type" => "email", "value" => "tim.archer@avocado.com"], ["type" => "phone", "value" => "8001235555"]];
     $event->participantIds($participantIds);
     $res = $event->update();
     $this->assertInstanceOf('Events', $res);
 }
开发者ID:vicioux,项目名称:apisdk,代码行数:11,代码来源:events_test.php

示例5: testListitemDelete

 public function testListitemDelete()
 {
     Client::relateIQ(GlobalVar::KEY, GlobalVar::SECRET);
     $data = ["id" => "53ae0c09e4b0f0eb6bc57ecd"];
     $listObj = new Lists($data);
     $this->assertNotNull($listObj->id());
     //Creating ListItems...
     $account = new Account([]);
     $contact = new Contact(["id" => "53b4b4cce4b0e6c80c5fca0c"]);
     $listItem = new ListItems(["parent" => $listObj]);
     $listItem->accountId($account->id());
     $listItem->contactIds($contact->id());
     $listItem->name("MASH Realtors");
     $listItem->fieldValues(["0" => "5", "2" => "0"]);
     $res = $listItem->create();
     $this->assertNotNull($res->id());
     $idList = $res->id();
     //Deleting ListItems...
     $listItem = $listObj->ListItem($idList);
     $res = $listItem->delete();
     $this->assertEquals(true, $res);
 }
开发者ID:vicioux,项目名称:apisdk,代码行数:22,代码来源:listitems_tests_console.php

示例6: testContactLimit

 public function testContactLimit()
 {
     Client::relateIQ(GlobalVar::KEY, GlobalVar::SECRET);
     $testLimit = 1;
     Contact::setPageSize($testLimit);
     $this->assertEquals($testLimit, Contact::getPageSize());
     $contacts = Contact::fetchByIds(["54ee0ed6e4b08099b9917451"]);
     $this->assertNotNull($contacts["54ee0ed6e4b08099b9917451"]->id());
     $this->assertNotNull($contacts["54ee0ed6e4b08099b9917451"]->name());
     $contacts2 = Contact::fetchByIds([]);
     $this->assertEquals([], $contacts2);
 }
开发者ID:vicioux,项目名称:apisdk,代码行数:12,代码来源:contacts_test.php

示例7: testPutEvent

 public function testPutEvent()
 {
     Client::relateIQ(GlobalVar::KEY, GlobalVar::SECRET);
     Client::endpoint('https://api.relateiq.com/v2/events');
     Client::headers(["Content-type" => "application/json", "Accept" => "application/json"]);
     $data = ["subject" => "Support Ticket #12345: How do I create an event?", "body" => "Just called Tim and walked him through how to create an event with the new API.\n-James.", "participantIds" => [["type" => "email", "value" => "james.mcsales@relateiq.com"], ["type" => "email", "value" => "tim.archer@avocado.com"], ["type" => "phone", "value" => "8001235555"]]];
     $res = Client::put('', $data, []);
     $this->assertEquals(204, $res->code);
 }
开发者ID:vicioux,项目名称:apisdk,代码行数:9,代码来源:client_test.php


注:本文中的Client::relateIQ方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。