hypem

package module
v0.0.0-...-43b53c8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2015 License: MIT Imports: 7 Imported by: 0

README

go-hypem GoDoc

Library for converting HypeMachine.com's mediaid's into streamable links.

Installation

go get github.com/9uuso/go-hypem

Example

package main

import (
	"fmt"

	"github/9uuso/go-hypem"
)

func main() {
	url, err := hypem.Stream("2a59t")
	if err != nil {
		panic(err)
	}

	// http://api.soundcloud.com/tracks/196680458/stream?consumer_key=nH8p0jYOkoVEZgJukRlG6w
	fmt.Println(url)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stream

func Stream(mediaid string) (string, error)

Stream fetches stream URL of mediaid. Mediaid's are five character

Types

type Page

type Page struct {
	MediaID string
	Tracks  []Track `json:"tracks"`
}

type StreamResponse

type StreamResponse struct {
	ItemID   string `json:"itemid"`
	Provider string `json:"type"`
	URL      string `json:"url"`
}

type Track

type Track struct {
	Key string `json:"key"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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