Code Monkey home page Code Monkey logo

isit737max's Introduction

Build Build & Deploy

Are you flying a 737 MAX ?

TL;DR

Just twit your flight number (eg. AA984) to @isit737MAX and a bot will reply with the actual aircraft type you're flying. Try it here!

Long(er) story and tech stuff

I'm an avgeek, and as such, I was very curious about the recent news about the 737 MAX. Investigation is still underway but there's a good article from the New York times about it. What You Need to Know After Deadly Boeing 737 Max Crashes.

Every 737 MAX was grounded waiting for "the fix", so I thought I could create something to let people know if they're flying a 737 MAX or not. Why?, because I could, and because it would be a fun experiment. And that's it!.

So I created a new twiiter handle called isit737MAX, which, when you tweet a flight number to it, it will reply letting you know if you're flying a 737 MAX or not.

How does it work?

The code here it's been deployed to an Azure Function, which is the one sending out the twits. But who is calling that function, how do I know who to reply to and what to reply.

I used to implement that part with a Microsoft Flow, I then moved it to an Azure Logic app and it even worked for a while with an IFTTT applet. The problem with those integrations is that they were all pulling data from the twitter API asking for mentions. They obviously have a windows in which they work. The Azure Logic app pulled every 5 minutes, and the IFTTT applet once every hour. So I needed/wanted something faster. That's how I discovered Twitter's Account Activity API which allows you to setup a webhook from an account to your endpoint.

So right now I have a small app (not in this repo) that using the TwitterLib creates a webhook and a subscription for the @IsIt737MAX twitter handle. The urls for that webhook is my Azure function, so now every time somebody mentions* @IsIt737MAX on a twit, the function get called. The function process the twit and send out a reply to the twit with the actual aircraft that's being used for the mentioned flight.

Give it a try, twit any flight number and let @IsIt737MAX let you know if you're flying in a 737 MAX.

And let me know what you think.

isit737max's People

Contributors

sebagomez avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

isit737max's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.