Needlessly Postulating Minds

    sv-api

    1.0.11 • Public • Published

    sv-api

    Exposes operations supported by StudentVerification RESTful API. Operations are grouped in the following classes: isirs documents requirements

    sv-api~isirs

    Kind: inner class of sv-api

    new isirs()

    Represents functions associated with ISIR files

    isirs.upload(rootUrl, authorization, awardYear, content) ⇒ function

    upload a file as application/octet-stream content

    Kind: static method of isirs
    Returns: function - A promise. Any response whose status code is not 2xx will result in a rejected promise.

    Param Type Description
    rootUrl string url of awardletter API
    authorization string header value
    awardYear string Award/aid year in [YYYY]-[YYYY] format; ex. 2015-2016
    content object JSON content to be uploaded

    isirs.getCorrections(rootUrl, authorization, startDate, endDate, targetPath) ⇒ function

    Get batched ISIR corrections for a given start date and end date

    Kind: static method of isirs
    Returns: function - A promise. The promise will resolve with an array of objects containing the metadata associated with 0 or more ISIR correction files. Each array element is an object with the following properties: ' { name: 'file name', type: 'file type', content: file_content } If a targetPath is not provided, the content property will be a memorystream object contain the contents of the file (refer to https://github.com/JSBizon/node-memorystream). Any response with a status code that is not 2xx will result in a rejected promise.

    Param Type Description
    rootUrl string url of awardletter API
    authorization string header value
    startDate string A start date in MM-DD-YYYY format
    endDate string An end date in MM-DD-YYYY format
    targetPath string An optional target path in which files will be written

    sv-api~documents

    Kind: inner class of sv-api

    new documents()

    Represents functions associated with student documents

    documents.getMetadata(rootUrl, authorization, documentId) ⇒ function

    Get student document metadata.

    Kind: static method of documents
    Returns: function - A promise. The promise will resolve with the metadata in JSON string format. Any response with a status code that is not 2xx will result in a rejected promise.

    Param Type Description
    rootUrl string url of awardletter API
    authorization string header value
    documentId string The unique Id of the student document

    documents.getFiles(rootUrl, authorization, documentId, targetPath) ⇒ function

    [getFiles description]

    Kind: static method of documents
    Returns: function - A promise. Any response with a status code that is not 2xx will result in a rejected promise.

    Param Type
    rootUrl string
    authorization string
    documentId string
    targetPath string

    documents.get() ⇒ function

    Get student document metadata and associated file(s).

    Kind: static method of documents
    Returns: function - A promise. The promise resolves to an array of results. The first element will contain the metadata while the second element will contain the file(s). Any response with a status code that is not 2xx will result in a rejected promise.

    sv-api~requirements

    Kind: inner class of sv-api

    new requirements()

    Represents functions associated with student requirements/tasks

    Install

    npm i sv-api

    DownloadsWeekly Downloads

    0

    Version

    1.0.11

    License

    ISC

    Last publish

    Collaborators

    • john.manaloto