agenda_lgo

package module
v0.0.0-...-1317de3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2017 License: GPL-3.0 Imports: 7 Imported by: 0

README

GoDoc

This is a simple program to download all of your salary statements from "Agenda: Lohn- und Gehaltsdokumente".


To run it, you need to specify the parameters "-a" and "-o":

  • -a: Path to the authentication-file
    This is a JSON file with the following structure:

    {
        	"Email": "",
            "Password": ""
    }
    
  • -o: Path to the directory, where all PDFs should be stored

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication struct {
	Email    string
	Password string
}

Authentication is used to login

type Document

type Document struct {
	Year         int    `json:"year"`
	Month        int    `json:"month"`
	Name         string `json:"name"`
	DownloadPath string `json:"downloadPath"`
	Type         string `json:"type"`
	Read         bool   `json:"read"`
	CreatedAt    int64  `json:"createdAt"`
}

Represents one salary statement

type DocumentResponse

type DocumentResponse []struct {
	ID            string      `json:"id"`
	Employee      string      `json:"employee"`
	Employer      string      `json:"employer"`
	ActivationKey interface{} `json:"activationKey"`
	DocumentList  []Document  `json:"documents"`
}

Contains general information about the employee & employer

type LGO

type LGO struct {
	// contains filtered or unexported fields
}

LGO represents the API of "Agenda: Lohn- und Gehaltsdokumente"

func NewLGO

func NewLGO(authFilePath, outDir string) *LGO

Instanciates a new LGO-instance

func (*LGO) FetchDocumentList

func (lgo *LGO) FetchDocumentList() ([]Document, error)

Fetches the list of all available documents

func (*LGO) Login

func (lgo *LGO) Login() error

Authenticates the user with "Agenda: LGO"

func (*LGO) SaveDocument

func (lgo *LGO) SaveDocument(document Document) error

Saves the document in the specified out-path

type URPResponse

type URPResponse struct {
	URP string `json:"urp"`
}

URPResponse The response from "Agenda LGO" which contains the session-token

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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