CampaignBuilderItems.php 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. namespace OntraportAPI;
  3. /**
  4. * Class CampaignBuilderItems
  5. *
  6. * @author ONTRAPORT
  7. *
  8. * @package OntraportAPI
  9. */
  10. class CampaignBuilderItems extends BaseApi
  11. {
  12. /**
  13. * $var string endpoint for single campaign
  14. */
  15. protected $_endpoint = "CampaignBuilderItem";
  16. /**
  17. * $var string endpoint for plural campaigns
  18. */
  19. protected $_endpointPlural = "CampaignBuilderItems";
  20. /**
  21. * @param Ontraport $client
  22. */
  23. public function __construct(Ontraport $client)
  24. {
  25. parent::__construct($client);
  26. }
  27. /**
  28. * @brief Retrieve a single specified campaign
  29. *
  30. * @param mixed[] $requestParams The parameters to submit with GET request.
  31. * Possible array keys: "id" (required)
  32. *
  33. * @return string JSON formatted response
  34. */
  35. public function retrieveSingle($requestParams)
  36. {
  37. return parent::_retrieveSingle($requestParams);
  38. }
  39. /**
  40. * @brief Retrieve a list of campaigns, handle pagination
  41. *
  42. * @param mixed[] $requestParams Array of parameters to submit with GET request. All parameters are optional but if "ids"
  43. * are not specified, all will be selected.
  44. * Possible array keys: "ids","start","range","sort","sortDir","condition","search",
  45. * "searchNotes","group_ids","performAll","externs","listFields"
  46. *
  47. * @return string JSON formatted array of paginated response data: each page of data will be an element in that array
  48. */
  49. public function retrieveMultiplePaginated($requestParams)
  50. {
  51. return parent::_retrieveMultiplePaginated($requestParams);
  52. }
  53. /**
  54. * @brief Retrieve a list of campaigns
  55. *
  56. * @param mixed[] $requestParams Array of parameters to submit with GET request. All parameters are optional but if "ids"
  57. * are not specified, all will be selected.
  58. * Possible array keys: "ids","start","range","sort","sortDir","condition","search",
  59. * "searchNotes","group_ids","performAll","externs","listFields"
  60. *
  61. * @return string JSON formatted response
  62. */
  63. public function retrieveMultiple($requestParams)
  64. {
  65. return parent::_retrieveMultiple($requestParams);
  66. }
  67. /**
  68. * @brief Retrieve information (such as number of campaigns) about campaign collection
  69. *
  70. * @param mixed[] $requestParams Array of parameters to submit with GET request. All parameters are optional.
  71. * Possible array keys: "condition","search","searchNotes","group_ids","performAll"
  72. *
  73. * @return string JSON formatted response
  74. */
  75. public function retrieveCollectionInfo($requestParams)
  76. {
  77. return parent::_retrieveCollectionInfo($requestParams);
  78. }
  79. /**
  80. * @brief Retrieve meta for a campaign object
  81. *
  82. * @return string JSON formatted response
  83. */
  84. public function retrieveMeta()
  85. {
  86. return parent::_retrieveMeta();
  87. }
  88. }