What (computer) lan...
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] What (computer) language is this?

21 Posts
17 Users
0 Reactions
122 Views
Posts: 4420
Free Member
Topic starter
 

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?


 
Posted : 22/05/2020 3:54 pm
Posts: 4985
Full Member
 

Looks like Javascript


 
Posted : 22/05/2020 4:03 pm
Posts: 5297
Full Member
 

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.


 
Posted : 22/05/2020 4:06 pm
Posts: 8771
Full Member
 
First rule of pasting code to online forums
use the code tag!

 
Posted : 22/05/2020 4:14 pm
Posts: 91000
Free Member
 

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.


 
Posted : 22/05/2020 4:21 pm
Posts: 621
Free Member
 

good ol' javascript

[img] [/img]


 
Posted : 22/05/2020 4:25 pm
Posts: 30093
Full Member
 

Makes sense to me retro. Fun with typecasting!


 
Posted : 22/05/2020 4:29 pm
Posts: 621
Free Member
 

Fun with typecasting!

[] + []
""
[] + {}
[object Object]
{} + []
0
{} + {}
NaN

🤔


 
Posted : 22/05/2020 4:49 pm
Posts: 981
Free Member
 

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.


 
Posted : 22/05/2020 4:50 pm
Posts: 5686
Full Member
 

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 🙂


 
Posted : 22/05/2020 4:58 pm
Posts: 1862
Free Member
 

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.


 
Posted : 22/05/2020 5:07 pm
Posts: 4420
Free Member
Topic starter
 

Thanks all - off to Codecademy i go 🙂


 
Posted : 22/05/2020 5:54 pm
Posts: 4954
Free Member
 

The specific purpose of JavaScript is to put people off learning to code by being bloody awful.

I think you're talking about perl.


 
Posted : 22/05/2020 6:30 pm
Posts: 0
Free Member
 

As the saying goes about Perl, "Perl – The only language that looks the same before and after RSA encryption"


 
Posted : 22/05/2020 7:06 pm
Posts: 7169
Full Member
 

Johnny come latelys, don’t know you’re born.

Once you’ve mastered the RPG II logic cycle, then you can start moaning 😉


 
Posted : 22/05/2020 7:44 pm
Posts: 3284
Full Member
 

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


 
Posted : 22/05/2020 7:53 pm
Posts: 5560
Full Member
 

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 🙂


 
Posted : 22/05/2020 9:15 pm
Posts: 5560
Full Member
 

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.


 
Posted : 22/05/2020 9:22 pm
Posts: 5560
Full Member
 

I think you’re talking about perl.

I thought she was a singer


 
Posted : 22/05/2020 9:24 pm
Posts: 0
Free Member
 

Dudeifdoom - I see what you did there - nicely played sir 😁


 
Posted : 22/05/2020 10:45 pm
Posts: 7076
Full Member
 

If you haven't seen the JavaScript WAT! talk, then you are in for a rare treat!

https://www.destroyallsoftware.com/talks/wat


 
Posted : 22/05/2020 11:06 pm
Posts: 0
Free Member
 

null


 
Posted : 23/05/2020 1:11 am

6 DAYS LEFT
We are currently at 95% of our target!