saf

package module
v0.0.0-...-85d3968 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2017 License: MIT Imports: 7 Imported by: 0

README

saf GoDoc Go Report Card Build Status

A set of nifty apps and utilities for Safaricom services. Mostly weekend projects.

Installation & Usage Demo

Installation

go get -u github.com/peteretelej/saf/...

Usage

saf
# gets remaining airtime & bundles balance 

Demo saf

License

The MIT License (MIT).

Documentation

Overview

Package saf provides tools and utilities for Safaricom services. The package can be used as a library for custom applications or individual saf projects applications can be run.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundles

type Bundles struct {
	AccType       string
	Bundles       string
	BundlesExpiry string
	Airtime       float64
	BongaSMS      string
	BongaBalance  string
}

Bundles defines the structure for bundles values returned

func GetBundles

func GetBundles() (*Bundles, error)

GetBundles returns the bundles for the line in use

func ParseBundles

func ParseBundles(rawBundles string) (*Bundles, error)

ParseBundles parses raw bundles html to Bundles value. Raw bundles html are as received from the Saf GetSubDetails http endpoint. Especially useful in processing data sent from clients (e.g. xhr)

func (Bundles) String

func (b Bundles) String() string

Directories

Path Synopsis
cmd
saf

Jump to

Keyboard shortcuts

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