Documentation ¶
Index ¶
- Constants
- func CSVReader(handle string, ext string, data interface{}) error
- func CSVWriter(handle string, ext string, appendFlag bool, data interface{}) (string, error)
- func DaysSince(d string) time.Duration
- func DigitsOnly(s string) bool
- func DotNucollPath() (string, error)
- func DownloadImage(id uint64, url string) (string, error)
- func Exists(x string, a []string) bool
- func FdatExists(handle string) bool
- func FdatWriter(handle string, ids []string) (string, error)
- func GMLWriter(handles []string, data interface{}, includeMissingIDs bool, cols []string, ...) (string, error)
- func GraphMLWriter(handles []string, data []types.UserObject, includeMissingIDs bool) (string, error)
- func QueryReader(handle string, firstHandleOnly bool) ([]string, error)
- func WriteConfig(config *NucollConfig) error
- type NucollConfig
- type TwitterConfig
Constants ¶
const ( // FdatDir friends file directory FdatDir string = "fdat" // ImgDir avatar images directory ImgDir string = "img" // DatExt Init files extension DatExt string = ".dat" // FdatExt Fetch files extension FdatExt string = ".f" // QueryExt custom list or query result extension QueryExt string = ".qry" // previously .twt // GmlExt network graph extension GmlExt string = ".gml" )
Variables ¶
This section is empty.
Functions ¶
func CSVReader ¶
CSVReader dynamic data loader Expect first row to contain struct field names preceded by comment hash '#'
func DotNucollPath ¶
DotNucollPath returns the location of the configuration file with CGO_ENABLED=0 golang throws user: Current not implemented on linux/amd64 so we look for alternatives including $HOME and current directory
func DownloadImage ¶
DownloadImage save avatar for user id
func FdatWriter ¶
FdatWriter spills list of friends to disk
func GMLWriter ¶
func GMLWriter(handles []string, data interface{}, includeMissingIDs bool, cols []string, label string) (string, error)
GMLWriter generates GML file for given array of handles using cols as node properties and sets label to given attribute spec from http://www.fim.uni-passau.de/fileadmin/files/lehrstuhl/brandenburg/projekte/gml/gml-technical-report.pdf
func GraphMLWriter ¶
func GraphMLWriter(handles []string, data []types.UserObject, includeMissingIDs bool) (string, error)
GraphMLWriter save with GraphML
func QueryReader ¶
QueryReader extracts twitter handles from query file
func WriteConfig ¶
func WriteConfig(config *NucollConfig) error
WriteConfig to .nucoll file in home directory
Types ¶
type NucollConfig ¶
type NucollConfig struct {
TwitterConfig
}
NucollConfig holds access details to all supported SNSes
func ReadConfig ¶
func ReadConfig() (*NucollConfig, error)
ReadConfig from .nucoll in home directory
type TwitterConfig ¶
type TwitterConfig struct { TokenType string `json:"token_type"` AccessToken string `json:"access_token"` }
TwitterConfig stores oauth2 client credential grants