Comments (3)
How can I get all Subscriber with the custom fields for the same Campaign
This is a two step process, because of how the Campaign Monitor API works. You need to get the campaign recipients, and then look up the corresponding subscriber for each recipient.
Using this library, you can do that as follows:
from createsend import *
auth = {'api_key': 'your api key'}
campaign_id = 'your campaign id'
campaign = Campaign(auth, campaign_id)
recipients = campaign.recipients().Results
for r in recipients:
subscriber = Subscriber(auth).get(r.ListID, r.EmailAddress)
print subscriber.EmailAddress
# Here you can access subscriber.CustomFields
how can I download Campaign report files
I suggest that you take a look at the Campaigns API Docs to figure out which reporting data you want. This library implements everything which is covered there.
Future questions about the API itself are best asked in the Campaign Monitor API Developers forum.
/cc @tobio to ensure that I'm not mistaken.
from createsend-python.
Thanks for your answer. @jdennes
I do the same, but if I have 2500 recipients, than it means 2500 queries which is very slowly and takes a long time. Do you know any other method which can help me?
from createsend-python.
2500 recipients, than it means 2500 queries which is very slowly and takes a long time. Do you know any other method which can help me?
I recommend hitting up the API Developers forum with more information about exactly what you're trying to build.
from createsend-python.
Related Issues (20)
- Issue installing as a dependency HOT 2
- access response headers for transactional API calls
- Support unicode in json_to_py
- module on pypi is missing six dependence HOT 3
- Failed to install 4.2.2 from pypi HOT 14
- Code in master can't doesn't allow installation using pip HOT 4
- Test requirements installed HOT 2
- WHATEVER CAMPAIGN MONITOR TEAM THAT OWNS THIS BURNING PILE OF RUBISH PLEASE GET YOUR ACT TOGETHER HOT 2
- Clean up `simplejson` imports
- Values of PageNumber and NumberOfPages seems inconsistent.
- Question: timing expectations
- API auth not working, contradicting documentation. HOT 2
- Upgrading to 6.0.0 breaks existing Subscriber implementations HOT 6
- No module named 'createsend' HOT 1
- Python wrapper not working with API connection HOT 2
- None handling
- Stop hiding HTTP status codes HOT 1
- How do I get data using createsend? HOT 2
- Is it possible to override the From field in a smart email? HOT 4
- client.campaigns() TypeError: 'type' object is not iterable HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from createsend-python.