wbget

package module
v0.0.0-...-f0eb5bf Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2016 License: GPL-3.0 Imports: 6 Imported by: 0

README

weibo get√

GoDoc

Example:

package main

import (
	"fmt"

	"github.com/jqs7/wbget"
)

func main() {
	wb, _ := wbget.Get("1910069117")
	fmt.Println(wb.Name)
	for _, v := range wb.Posts {
		fmt.Printf("%+v\n", v)
	}
}

Documentation

Index

Constants

View Source
const WB_BASE = "http://service.weibo.com/widget/widget_blog.php?uid=%s"

Base URL of weibo page to fetch

Variables

This section is empty.

Functions

This section is empty.

Types

type Post

type Post struct {
	// the repost text of post
	Repost     string
	RepostFrom string
	// the link of post
	Link string
	Text string
	// the thumbnail of the post's image
	Thumbnail string
	Time      time.Time
}

Post is the struct of each post of the weibo user

type User

type User struct {
	Name  string //the name of weibo user
	Posts []Post //the posts of weibo user
}

User is the struct of weibo user

func Get

func Get(uid string) (user User, err error)

Get the latest weibo information by the uid of user

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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