You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more
There's a large wodge of code on this page -
https://www.savio.no/analytics/get-mailchimp-api-3-0-campaign-data-google-sheets
It looks like this, to save you the bother of clicking:
var campaignList = '/campaigns?&count='+count+'&since_send_time='+REPORT_START_DATE
var options = {"headers": {"authorization": 'apikey '+API_KEY}};
var apiCall = function(endpoint){
apiResponseCampaigns = UrlFetchApp.fetch(api+endpoint,options);
json = JSON.parse(apiResponseCampaigns);
return json
}var campaigns = apiCall(campaignList);
var total = campaigns.total_items;
var campaignData = campaigns.campaigns;if (campaignData) {
sheet.clear(); // Clear MailChimp data in Spreadsheet
// Append Column Headers
sheet.appendRow(["Sent Time", "Campaign ID", "Campaign Title", "Subject Line", "Emails Sent", "Abuse Reports", "Unsubscribed", "Unsubscribe Rate", "Hard Bounces", "Soft Bounces", "Bounces Total", "Syntax Errors", "Forwards Count", "Forwards Opens", "Opens Total", "Unique Opens", "Open Rate", "Last Open", "Clicks Total", "Unique Clicks","Unique Subscriber Clicks", "Click Rate", "Last Click"]);
}
If I wanted to be able to write an API scripty thing like that, what online n00b course should i sign up for? Is it Python?
Looks like Javascript
That's Javascript.
For APIs in general, they'll usually use a common language to pass the data, like JSON, which can be parsed by any language.
First rule of pasting code to online forums
use the code tag!
JavaScript yes. Back in the day, most languages were developed for specific purposes, until more generic ones became more popular. The specific purpose of JavaScript is to put people off learning to code by being bloody awful.
Makes sense to me retro. Fun with typecasting!
Fun with typecasting!
[] + []
""
[] + {}
[object Object]
{} + []
0
{} + {}
NaN
🤔
The English of programming languages. It's easy to learn, difficult to master and riddled with bizzare idiosyncracies. And thanks to some historical quirks it's bloody everywhere now, so you might as well make your peace with it.
Is it Python?
I work with a lot of people using Python, pretty much none of the them are complimentary about it, so as you asked about learning something, it's probably not where I'd start 🙂
Hi, professional software engineer of 20 years with a CompSci degree here. Python is awesome. Sure, it's got quirks, but Python 3 was a good shake out of the nonsense.
Thanks all - off to Codecademy i go 🙂
The specific purpose of JavaScript is to put people off learning to code by being bloody awful.
I think you're talking about perl.
As the saying goes about Perl, "Perl – The only language that looks the same before and after RSA encryption"
Johnny come latelys, don’t know you’re born.
Once you’ve mastered the RPG II logic cycle, then you can start moaning 😉
JavaScript is good because you can do anything you want
JavaScript is bad because you can do anything you want
The assembly language of the internet
Hi, professional software engineer of 20 years with a CompSci degree here. Python is awesome
Yep Pythons really nice and combined with the Requests is lovely to do Jason rest Api calls.
And if you do it on AWS Lambdas you can do some great stuff 🙂
The assembly language of the internet
most def, well webassembly will probably end up getting that title if it gains traction but I think your right everything ends up getting transmogrified to JS.
I think you’re talking about perl.
I thought she was a singer
Dudeifdoom - I see what you did there - nicely played sir 😁
If you haven't seen the JavaScript WAT! talk, then you are in for a rare treat!
https://www.destroyallsoftware.com/talks/wat

