DripDotNet 2.0.0
See the version list below for details.
dotnet add package DripDotNet --version 2.0.0
NuGet\Install-Package DripDotNet -Version 2.0.0
<PackageReference Include="DripDotNet" Version="2.0.0" />
paket add DripDotNet --version 2.0.0
#r "nuget: DripDotNet, 2.0.0"
// Install DripDotNet as a Cake Addin #addin nuget:?package=DripDotNet&version=2.0.0 // Install DripDotNet as a Cake Tool #tool nuget:?package=DripDotNet&version=2.0.0
Drip API Wrapper - .NET
This project is no longer under active development and is in need of a maintainer.
If you would consider maintaining this project please get in touch with us at support@getdrip.com.
An object-oriented .NET wrapper for Drip's REST API v2.0. This implementation supports both synchronous and Task-based asynchronous calling semantics.
Installation
NuGet
Install-Package Leadpages.Drip.DripDotNet
From Binaries
Reference the bin/Debug or bin/Release dll's in your project.
From Source
Clone the repo.
Open "DripDotNet-vs2013.sln" or "DripDotNet-vs2015.sln" in Visual Studio 2013.
Build the DripDotNet-vs2013 or DripDotNet-vs2015 project in Release or Debug mode.
Reference the DripDotNet.dll and RestSharp.dll in your .NET 4.5 project.
Usage
Your account ID can be found here.
For private integrations, you may use your personal API key (found
here) via the apiKey
constructor parameter
or via the public properties on the DripClient:
var client = new Drip.DripClient("YOUR_API_KEY", "YOUR_ACCOUNT_ID");
or
var client = new Drip.DripClient {
ApiKey = "YOUR_API_KEY",
AccountId = "YOUR_ACCOUNT_ID"
};
Just make sure the API Key and Account ID are set prior to using the API.
For public integrations, pass in the user's OAuth token via the AccessToken
property:
var client = new Drip.DripClient {
AccessToken = "YOUR_ACCESS_TOKEN",
AccountId = "YOUR_ACCOUNT_ID"
};
Since the Drip client is a flat API client, most API actions are available as methods on the client object. The following methods are currently available with both synchronous and asynchronous signatures (only synchronous shown here):
Action | Method |
---|---|
Create/update a subscriber | CreateOrUpdateSubscriber(subscriber) |
Create/update a batch of subscribers | CreateOrUpdateSubscribers(subscribers) |
Fetch a subscriber | GetSubscriber(idOrEmail) |
Subscribe to a campaign | SubscribeToCampaign(campaignId, campaignSubscriber) |
Unsubscribe | UnsubscribeFromCampaign(idOrEmail, campaignId = null) |
Apply a tag | ApplyTagToSubscriber(email, tag) |
Remove a tag | RemoveTagFromSubscriber(email, tag) |
Track an event | TrackEvent(dripEvent) |
Track a batch of events | TrackEvents(dripEvents) |
Actions that require complex arguments take them in the form of a strongly typed
Request
object.
Note: We do not have complete API coverage yet. If we are missing an API method that you need to use in your application, please file an issue and/or open a pull request. See the official REST API docs for a complete API reference.
Examples
var client = new Drip.DripClient("YOUR_API_KEY", "YOUR_ACCOUNT_ID");
// Fetch a subscriber
var resp = client.GetSubscriber("foo@example.com")
Debug.WriteLine("Did it work? " + resp.HasSuccessStatusCode());
//# Did it work? true
var subscriber = resp.Subscribers.First()
Debug.WriteLine("Subscriber Email: " + subscriber.Email);
//# Subscriber Email: foo@example.com
Contributing
- Fork it ( https://github.com/DripEmail/drip-dot-net/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Testing
In order to run the tests you need to set two environment variables or you will get exceptions.
DRIP_API_KEY="YOUR_API_KEY"
DRIP_ACCOUNT_ID="YOUR_ACCOUNT_ID"
XUnit is used for testing. Install the xunit test runner to easily run from within the Visual Studio solution.
Since we do not yet support creating campaigns via API there is a TestCampaignId constant in the CampaignTests.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Newtonsoft.Json (>= 11.0.2)
- RestSharp (>= 106.5.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.