iddigital

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package iddigital contains all logic necessary to interact with uspdigital

Package iddigital contains all logic necessary to interact with uspdigital

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPDF added in v1.5.5

func GetPDF(auth string) (*http.Response, error)

GetPDF sends a GET request to the auth API with the auth code

Types

type PDF

type PDF struct {
	Body         string
	Error        error
	CreationDate time.Time
}

PDF represents the pdf file retrieved from uspdigital See PostAuthCode for more info.

func NewPDF

func NewPDF(r *http.Response) (pdf PDF)

NewPDF takes the Grades PDF response object and creates a new PDF object

func (PDF) Parse

func (pdf PDF) Parse(DB db.Database) (rec Transcript, err error)

Parse takes the (already read) PDF and parses it into a Transcript object

type Transcript

type Transcript struct {
	Grades          []models.Record  `json:"grades"`
	TranscriptYears map[string][]int `json:"transcript_years"`

	Name string `json:"name"`
	Nusp string `json:"nusp"`

	Course         string `json:"course"`
	Specialization string `json:"specialization"`
}

Transcript represents the parsed data retrieved from the user's PDF file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL