Skip to content

Commit

Permalink
USE_CASES.md fix sendgrid#353 issue
Browse files Browse the repository at this point in the history
Add RecipientSearch with conditions[POST]
  • Loading branch information
kostyaHrytsyuk committed Oct 28, 2017
1 parent 5f95c89 commit 54e6a77
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions USE_CASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,47 @@ namespace Example
}
```

<a name="search-recipients-with-conditions"></a>
#Search recipients with conditions

```csharp
using SendGrid;
using SendGrid.Helpers.Mail;
using System;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace Example
{
internal class Example
{
private static void Main()
{
Execute().Wait();
}

static async Task Execute()
{
string data=@"{
'conditions': [
{
'field' : 'last_name',
'value': 'test last name',
'operator': 'eq',
'and_or': ''
}]
}";

dynamic response = await sq.Client.contactdb.recipients.search.post(requestBody:data);
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();

}
}
}

<a name="singleemailmultiplerecipients"></a>
# Send a Single Email to Multiple Recipients

Expand Down Expand Up @@ -586,6 +627,8 @@ namespace Example
}
```



<a name="transient-faults"></a>
# Transient Fault Handling

Expand Down

0 comments on commit 54e6a77

Please sign in to comment.