GithubHelp home page GithubHelp logo

juyonce / req-uscis-status Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tonybranfort/req-uscis-status

0.0 1.0 0.0 11 KB

Module to return USCIS case status from https://egov.uscis.gov/casestatus/landing.do

License: MIT License

Makefile 0.60% JavaScript 99.40%

req-uscis-status's Introduction

req-uscis-status

NPM version Build Status via Travis CI Coverage Status

Module to get US Citizenship and Immigration Services (USCIS) case status from the USCIS Case Status Online web page given a USCIS Receipt Number.

This is simply a screen scrape from the USCIS case status website after posting a USCIS Receipt Number. This module and the support of it is not in any way affiliated with USCIS. Any changes that they make to the case status web site could and likely would impact this module.

There is just one exposed function with this module : getStatus(receiptNumber, callback). The callback is called with an error, if any, and the result. The result is one object :

  var statusObj = {
    errHtml: undefined,  // error, if any, on the uscis page after posting receipt number
    statusShortHtml: undefined,  
    statusShortText: undefined, 
    statusLongHtml: undefined, 
    statusLongText: undefined
  }; 

Each of the 5 properties in the status object returned are 'cleaned' of return lines, new line breaks, tabs and duplicate spaces.

Install with npm install req-uscis-status.

Examples

var rus = require('req-uscis-status');

rus.getStatus('MSC1591345031', 
  function(err, statusObject) { 
    console.log(statusObject);

    // { 
    //  errHtml: undefined,
    //  statusShortHtml: '<strong>Your Current Status:</strong> Card Was Delivered To Me By The Post Office <span class="appointment-sec-show" tabindex="-1" title="View Case Status Full Description">+</span>',
    //  statusShortText: 'Your Current Status: Card Was Delivered To Me By The Post Office',
    //  statusLongHtml: '<h1>Card Was Delivered To Me By The Post Office</h1> <p>On November 12, 2015, the Post Office delivered your new card for Receipt Number MSC1591345031, to the address that you gave us. The tracking number assigned is 9205592338400179142710. You can use your tracking number at <a href="https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9205592338400179142710" target="_blank">www.USPS.com</a> in the Quick Tools Tracking section. If you move, go to <a href="https://egov.uscis.gov/coa/displayCOAForm.do" target="_blank">www.uscis.gov/addresschange</a> to give us your new mailing address.</p>',
    //  statusLongText: 'Card Was Delivered To Me By The Post Office On November 12, 2015, the Post Office delivered your new card for Receipt Number MSC1591345031, to the address that you gave us. The tracking number assigned is 9205592338400179142710. You can use your tracking number at www.USPS.com in the Quick Tools Tracking section. If you move, go to www.uscis.gov/addresschange to give us your new mailing address.' 
    // }
  }
);

req-uscis-status's People

Contributors

tonybranfort avatar songgao avatar

Watchers

Helena KC avatar

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.