Retrieve List Details
Use the Get method to return information about existing lists.
Ruby
require 'fuelsdk'
myClient = FuelSDK::Client.new {'client' => { 'id' => CLIENTID, 'secret' => SECRET }}
list = FuelSDK::List.new
list.authStub = myclient
response = list.get
p responsePHP
require('ET_Client.php');
$myclient = new ET_Client();
$list = new ET_List();
$list->authStub = $myclient;
$response = $list->get();
print_r($response);Python
import ET_Client
myclient = ET_Client.ET_Client()
list = ET_Client.ET_List()
list.auth_stub = myclient
results = list.get()
print resultsCSharp
Using FuelSDK;
ET_Client myclient = new ET_Client();
ET_List list = new ET_List();
list.AuthStub = myclient;
GetReturn results = list.Get();
Console.WriteLine("Get Status: " + results.Status.ToString());Java
Documentation for the Fuel Java SDK can be found at http://salesforce-marketingcloud.github.io/FuelSDK-Java/
Streamline Your Usage of Get
Optionally, you can set the props property when using the Get method in order to limit the number of fields returned. If you don't define the props property, the call returns all fields. You can provide the props property as an array containing any combination of the following values:
- ID
- ObjectID
- PartnerKey
- CreatedDate
- ModifiedDate
- Client.ID
- Client.PartnerClientKey
- ListName
- Description
- Category
- Type
- CustomerKey
- ListClassification
- AutomatedEmail.ID
Ruby
list.props = ['Name', 'CustomerKey']PHP
$list->props = array('Name', 'CustomerKey');Python
list.props = ["Name", "CustomerKey"]CSharp
list.Props = new string[] { "Name", "CustomerKey" };Java
Documentation for the Fuel Java SDK can be found at http://salesforce-marketingcloud.github.io/FuelSDK-Java/
Filter Get Requests
Optionally, you can set the filter property to limit the number of results returned. If you don't define the props property, the call returns all fields. A filter consists of three key/value pairs:
- Property: Any of the properties that can be returned for a list
-
SimpleOperator: Valid simple operators include the following:
- equals
- notEquals
- greaterThan
- lessThan
- Value/DateValue: Use DateValue to match values when using a Date datatype. Otherwise, use Value.
Ruby
list.filter = {'Property' => 'CustomerKey','SimpleOperator' => 'equals','Value' => 'MyList'}PHP
$list->filter = array('Property' => 'CustomerKey','SimpleOperator' => 'equals','Value' => 'MyList');Python
list.filter = {"Property" => "CustomerKey","SimpleOperator" => "equals","Value" => "MyList"}CSharp
list.SearchFilter = new SimpleFilterPart() { Property = "CustomerKey", SimpleOperator = SimpleOperators.equals, Value = new String[] { "MyList" } };Java
Documentation for the Fuel Java SDK can be found at http://salesforce-marketingcloud.github.io/FuelSDK-Java/