Global Email Packages#
Packages/Samples covers the usage of Melissa Cloud APIs using popular third party tools, platforms, and programming languages. None of these are required but they can certainly get you up and running quickly.
For installation instructions and more detailed info, visit our Package Installation Guide: Installation Guide.
NuGet and Pip#
Melissa has developed an SDK for both NuGet (C# .NET) and pip (Python). Both environments follow the same patterns and naming convention so we will group them together.
GET Request#
Example
// Initialize Global Email
GlobalEmail globalEmail = new GlobalEmail(MELISSA_LICENSE_KEY);
// Set the parameters
globalEmail.Email = "info@melissa.com";
// Make the GET request
GlobalEmailResponse responseObject = globalEmail.Get<GlobalEmailResponse>();
// Access the response value
string recId = responseObject.RecordID;
# Initialize Global Email
global_email = GlobalEmail(MELISSA_LICENSE_KEY)
# Set the parameters
global_email.email = "info@melissa.com"
# Make the GET request
response_object = global_email.get(GlobalEmailResponse)
# Access the response value
rec_id = response_object.record_id
POST Request#
Example
// Initialize Global Email
GlobalEmail globalEmail = new GlobalEmail(MELISSA_LICENSE_KEY);
// Create a set of requests and set their parameters
globalEmail.AddRecord(new GlobalEmailRecordRequest
{
RecordID = "1",
Email = "info@melissa.com"
});
globalEmail.AddRecord(new GlobalEmailRecordRequest
{
RecordID = "2",
Email = "test@melissa.com"
});
// Make the POST request
GlobalEmailResponse responseObject = globalEmail.Post<GlobalEmailResponse>();
// Access the response value
foreach (var record in responseObject.Records)
{
Console.WriteLine("RecordID: " + record.RecordID);
}
# Initialize Global Email
global_email = GlobalEmail(MELISSA_LICENSE_KEY)
# Create a set of requests and set their parameters
global_email.add_record(GlobalEmailRecordRequest
(
record_id = "1",
email = "info@melissa.com"
}
))
global_email.add_record(GlobalEmailRecordRequest
(
record_id = "2",
email = "test@melissa.com"
))
# Make the POST request
response_object = global_email.post(GlobalEmailResponse)
# Access the response value
for record in response_object.records:
print("RecordID: ", record.record_id)
For more information on the Global Email Packages please click here.
To see detailed Sample Code for this package see:
OpenAPI (Swagger)#
OpenAPI is a popular specification for describing REST APIs. By providing swagger JSON documents, you can automatically generate client code and test applications.
Melissa is working on providing a swagger JSON document for our services. Please stay tuned!
Postman#
Postman is a quick and easy way to test raw HTTP requests and responses. Using our pre-made request templates, you can start testing and generating code snippets for our Cloud APIs in seconds.
Sample Code#
This sample code illustrates how to construct raw HTTP requests to Melissa’s cloud API.
Language |
Repository |
|---|---|
C# .NET |
|
Python3 |