This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | constructor(auth: Auth.OAuth2Client | JSONClient) { | |
| super(auth); | |
| // gotta know which Friday we are doing | |
| const nextFriday = 5 - this.weekEndingDate.getDay(); | |
| this.weekEndingDate.setDate(this.weekEndingDate.getDate() + nextFriday); | |
| this.targetDateTitle = this.getTargetTitle(); | |
| this.kickItOff(); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | require_relative 'api_key.rb' | |
| require 'protobuf' | |
| require 'google/transit/gtfs-realtime.pb' | |
| require 'net/http' | |
| require 'uri' | |
| require 'byebug' | |
| data = Net::HTTP.get(URI.parse("http://datamine.mta.info/mta_esi.php?key=#{ApiKey::KEY}&feed_id=1")) | |
| feed_list = Transit_realtime::FeedMessage.decode(data).entity | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | { | |
| "stop_sequence": 0, | |
| "arrival": { | |
| "delay": 0, | |
| "time": 1541275032, | |
| "uncertainty": 0 | |
| }, | |
| "departure": { | |
| "delay": 0, | |
| "time": 1541275032, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | require_relative 'api_key.rb' | |
| require 'protobuf' | |
| require 'google/transit/gtfs-realtime.pb' | |
| require 'net/http' | |
| require 'uri' | |
| require 'byebug' | |
| data = Net::HTTP.get(URI.parse("http://datamine.mta.info/mta_esi.php?key=#{ApiKey::KEY}&feed_id=1")) | |
| feed_list = Transit_realtime::FeedMessage.decode(data).entity | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | require_relative 'api_key.rb' | |
| require 'protobuf' | |
| require 'google/transit/gtfs-realtime.pb' | |
| require 'net/http' | |
| require 'uri' | |
| require 'byebug' | |
| data = Net::HTTP.get(URI.parse("http://datamine.mta.info/mta_esi.php?key=#{ApiKey::KEY}")) | |
| feed_list = Transit_realtime::FeedMessage.decode(data).entity | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | config.middleware.insert_before 0, Rack::Cors do | |
| allow do | |
| origins '*' | |
| resource '*', | |
| :headers => :any, | |
| :expose => ['access-token', 'expiry', 'token-type', 'uid', 'client'], | |
| :methods => [:get, :post, :patch, :delete, :options] | |
| end | |
| end | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | fetch('http://localhost:3000/') | |
| .then((resp) => { | |
| resp.json() | |
| .then((data) => { | |
| let posting = document.getElementById('api-result') | |
| posting.innerHTML = data.hi | |
| }) | |
| }) | |
| .catch((err) => { | |
| console.log(err) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class TestsController < ApplicationController | |
| def index | |
| render json: {hi: 'greetings'} | |
| end | |
| end | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class AddIndexToUid < ActiveRecord::Migration[5.1] | |
| def change | |
| add_index :users, [:uid, :provider], unique: true | |
| end | |
| end | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class AddEmailToUid < ActiveRecord::Migration[5.1] | |
| def self.up | |
| User.update_all("uid=email") | |
| end | |
| def self.down | |
| end | |
| end | 
NewerOlder