namigo

package module
v0.0.0-...-9fd7924 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: GPL-2.0 Imports: 10 Imported by: 0

README

NaMi-Go

import "github.com/thisni1s/nami-go"

Package namigo provides a basic read-only implemaentation of the DPSG NAMI API. It also provides a lot of structs to work with the NAMI data.

Usage

Call Login("username", "password") to login to the NAMI. Then use the other functions to get data from it.

func GetActivityById
func GetActivityById(userid string, activityId string) (types.Activity, error)

GetActivityById returns details about a specific "Tätigkeit". This is more detailed then the ActivityListItem objects returned by GetMemberActivities

func GetEducationById
func GetEducationById(userid string, educationId string) (types.Education, error)

GetEducationById returns details about a specific "Ausbildung" entry. This is more detailed then the EducationListItem objects returned by GetMemberEducation

func GetGroupInfo
func GetGroupInfo() (types.GroupInfo, error)

GetGroupInfo returns info about the primary "Stammgruppierung" from the logged in User.

func GetGroupTagById
func GetGroupTagById(tagid string) (types.GroupTag, error)

GetGroupTagById returns details about a "Tag" of a Group This is more detailed then the GroupTagListItem objects returned by GetGroupTags

func GetGroupTags
func GetGroupTags() ([]types.GroupTagListItem, error)

GetGroupTags returns a slice containing all "Tags" available in a "Gruppierung"

func GetMemberActivities
func GetMemberActivities(userid string) ([]types.ActivityListItem, error)

GetMemberActivities returns a slice containing all current "Tätigkeiten" of a Member

func GetMemberDetails
func GetMemberDetails(userid string, groupid string) (types.Member, error)

GetMemberDetails gets informationa bout a specific user. This information is more detailed then the user info contained in the SearchMember objetcs returned by Search

func GetMemberEducation
func GetMemberEducation(userid string) ([]types.EducationListItem, error)

GetMemberEducation returns a slice containing all "Ausbildung" entries of a Member

func GetTagById
func GetTagById(userid string, tagId string) (types.Tag, error)

GetTagById returns details about a specific "Tag" entry. This is more detailed then the TagListEntry objects returned by GetTags

func GetTags
func GetTags(userid string) ([]types.TagListEntry, error)

GetTags returns a slice containing all "Tags" of a Member

func Login
func Login(username string, password string) error

Login authenticates with the NAMI and saves the auth cookies in a Jar to be accessed by other functions. This function should be called before working with any other namigo functions!

func Logout
func Logout() (bool, error)

Logout logs out the user from NAMI

func Search(searchValues types.SearchValues) ([]types.SearchMember, error)

Search searches through all Member visible to a user. Filters are specified by values set in searchValues.

func UpdateMemberActivities
func UpdateMemberActivities(userid string, activity types.Activity) (int, error)

Documentation

Overview

Package namigo provides a basic read-only implemaentation of the DPSG NAMI API. It also provides a lot of structs to work with the NAMI data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetActivityById

func GetActivityById(userid string, activityId string) (types.Activity, error)

GetActivityById returns details about a specific "Tätigkeit". This is more detailed then the ActivityListItem objects returned by GetMemberActivities

func GetEducationById

func GetEducationById(userid string, educationId string) (types.Education, error)

GetEducationById returns details about a specific "Ausbildung" entry. This is more detailed then the EducationListItem objects returned by GetMemberEducation

func GetGroupInfo

func GetGroupInfo() (types.GroupInfo, error)

GetGroupInfo returns info about the primary "Stammgruppierung" from the logged in User.

func GetGroupTagById

func GetGroupTagById(tagid string) (types.GroupTag, error)

GetGroupTagById returns details about a "Tag" of a Group This is more detailed then the GroupTagListItem objects returned by GetGroupTags

func GetGroupTags

func GetGroupTags() ([]types.GroupTagListItem, error)

GetGroupTags returns a slice containing all "Tags" available in a "Gruppierung"

func GetMemberActivities

func GetMemberActivities(userid string) ([]types.ActivityListItem, error)

GetMemberActivities returns a slice containing all current "Tätigkeiten" of a Member

func GetMemberDetails

func GetMemberDetails(userid string, groupid string) (types.Member, error)

GetMemberDetails gets informationa bout a specific user. This information is more detailed then the user info contained in the SearchMember objetcs returned by Search

func GetMemberEducation

func GetMemberEducation(userid string) ([]types.EducationListItem, error)

GetMemberEducation returns a slice containing all "Ausbildung" entries of a Member

func GetTagById

func GetTagById(userid string, tagId string) (types.Tag, error)

GetTagById returns details about a specific "Tag" entry. This is more detailed then the TagListEntry objects returned by GetTags

func GetTags

func GetTags(userid string) ([]types.TagListEntry, error)

GetTags returns a slice containing all "Tags" of a Member

func Login

func Login(username string, password string) error

Login authenticates with the NAMI and saves the auth cookies in a Jar to be accessed by other functions. This function should be called before working with any other namigo functions!

func Logout

func Logout() (bool, error)

Logout logs out the user from NAMI

func Search(searchValues types.SearchValues) ([]types.SearchMember, error)

Search searches through all Member visible to a user. Filters are specified by values set in searchValues.

func UpdateMemberActivities

func UpdateMemberActivities(userid string, activity types.Activity) (int, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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