Skip to content

Instantly share code, notes, and snippets.

View kevinjosephjohn's full-sized avatar

Kevin kevinjosephjohn

View GitHub Profile
@kevinjosephjohn
kevinjosephjohn / index.js
Last active May 6, 2019 21:13
Function to check if new shows are added in SPI cinemas
// Check movie status
// Check movie status
function checkTickets() {
var request = require("request");
var options = {
method: 'GET',
url: 'https://www.spicinemas.in/chennai/show-times/data/07-05-2019',
qs: {
@kevinjosephjohn
kevinjosephjohn / index.js
Last active May 6, 2019 17:46
Send telegram message to chat
// Telegram Credentials
var telegramapi = new telegram({
token: 'XXXXXXXXXX',
updates: {
enabled: true
}
});
// Send message with Telegram
/**
@kevinjosephjohn
kevinjosephjohn / index.js
Last active May 7, 2019 12:03
Add Twilio
//Twilio Credentials
const accountSid = 'xxxxxxxxxxxxxxx'; // Your Account SID from www.twilio.com/console
const authToken = 'xxxxxxxxxxxxxxxxxxx'; // Your Auth Token from www.twilio.com/console
// Make call with twilio
function makeCall() {
if (callFlag == true) {
phoneNumbers.forEach(phoneNumber => {
client.calls
@kevinjosephjohn
kevinjosephjohn / index.js
Last active May 6, 2019 17:06
Include required packages and global variables
const telegram = require('telegram-bot-api'); // Pushing notification to telegram channel.
const request = require('request'); // Making api call to spicinemas.
const twilio = require('twilio'); // Making the phone call for waking me up.
const moment = require('moment'); // Converting date time from the api.
//Twilio Credentials
// Telegram Credentials
@kevinjosephjohn
kevinjosephjohn / show-times.json
Created May 6, 2019 12:23
Showtimes from SPI Cinemas web app.
{
"screenSchedules": [{
"movieName": "A DOG'S WAY HOME ENGLISH",
"movieID": "2356",
"language": "english",
"certification": "U",
"sluggedCertificate": "u",
"sluggedMovieName": "a-dogs-way-home-english",
"screenName": "KITES",
"cinemaName": "Escape",