gohinetradio

package module
v0.0.0-...-263a146 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2015 License: MIT Imports: 12 Imported by: 0

README

gohinetradio

GoDoc GitHub license

To install, run (only for mac with VLC.)

go get github.com/toomore/gohinetradio/gohinetradio

Or just pkg

go get github.com/toomore/gohinetradio

Documentation

Overview

Package gohinetradio is to get hichannel radio path and with token to play without flash.

Index

Constants

View Source
const (
	PLAYURL  string = "http://hichannel.hinet.net/radio/play.do?id=%s"
	LISTURL  string = "http://hichannel.hinet.net/radio/channelList.do?radioType=&freqType=&freq=&area=&pN=%d"
	LISTPAGE int    = 1
)

Base URL.

Variables

This section is empty.

Functions

func GenList

func GenList()

GenList is to output table list.

func PrintChannel

func PrintChannel()

PrintChannel is my fav channel XD.

Types

type RadioData

type RadioData struct {
	ChannelTitle   string `json:"channel_title"`
	PlayRadio      string `json:"playRadio"`
	ProgramName    string `json:"programName"`
	ChannelCollect bool   `json:"channel_collect"`
}

RadioData is the json of `http://hichannel.hinet.net/radio/play.do?id=232`

func GetURL

func GetURL(No string) (RadioData, error)

GetURL is getting radio channel url with token.

type RadioListData

type RadioListData struct {
	PageNo   int              `json:"pageNo"`
	PageSize int              `json:"pageSize"`
	List     []RadioListDatas `json:"list"`
}

RadioListData is the json of `http://hichannel.hinet.net/radio/channelList.do?radioType=&freqType=&freq=&area=&pN=1`

type RadioListDatas

type RadioListDatas struct {
	ChannelImage string `json:"channel_image"`
	ChannelTitle string `json:"channel_title"`
	RadioType    string `json:"radio_type"`
	IsChannel    bool   `json:"isChannel"`
	ProgramName  string `json:"program_name"`
	ChannelID    string `json:"channel_id"`
}

RadioListDatas is RadioListData.List type.

func GetRadioList

func GetRadioList() []RadioListDatas

GetRadioList is getting all channel list.

Directories

Path Synopsis
cmd
gohinetradio
Package main is to play radio with VLC(mac).
Package main is to play radio with VLC(mac).

Jump to

Keyboard shortcuts

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