uststat

package module
v0.0.0-...-0b788f8 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2016 License: MIT Imports: 5 Imported by: 2

README

Ustream live status

Build Status

Get the ustream live status.

Installing

$ go get -u github.com/utahta/ustream-live-status/cmd/uststat

Usage

$ uststat -h
Usage of uststat:
  -name string
        Specifies the ustream channel name

$ uststat -name iss-hdev-payload
live
$ uststat -name momoclotv
offline

Example

package main

import (
	"log"

	"github.com/utahta/ustream-live-status"
)

func main() {
	c, err := uststat.New()
	if err != nil {
		log.Fatal(err)
	}

	live, err := c.IsLive("iss-hdev-payload")
	if err != nil {
		log.Fatal(err)
	}

	log.Print(live)
}

Contributing

  1. Fork it ( https://github.com/utahta/uststat/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(options ...ClientOption) (*Client, error)

New client

func (*Client) IsLive

func (c *Client) IsLive(name string) (bool, error)

Get ustream live status by channel name

func (*Client) IsLiveByChannelID

func (c *Client) IsLiveByChannelID(id string) (bool, error)

Get ustream live status by channel id

type ClientOption

type ClientOption func(*Client) error

func WithHTTPTransport

func WithHTTPTransport(t http.RoundTripper) ClientOption

WithHTTPTransport function

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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