Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/larrylv/go-weibo
Go library for accessing the Weibo API
https://github.com/larrylv/go-weibo
Last synced: about 2 months ago
JSON representation
Go library for accessing the Weibo API
- Host: GitHub
- URL: https://github.com/larrylv/go-weibo
- Owner: larrylv
- License: mit
- Created: 2014-05-30T03:11:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-05T01:21:13.000Z (over 10 years ago)
- Last Synced: 2024-06-20T12:10:49.841Z (7 months ago)
- Language: Go
- Size: 348 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
go-weibo
========[![Build Status](https://img.shields.io/travis/larrylv/go-weibo.svg?branch=master)][travis]
[![Coverage Status](http://img.shields.io/coveralls/larrylv/go-weibo.svg)][coveralls][travis]: https://travis-ci.org/larrylv/go-weibo
[coveralls]: https://coveralls.io/r/larrylv/go-weibogo-weibo is a Go client library for access the [Weibo API][], inspired by [go-github][].
**Documentation:**
This library is __currently under development__, please do not use it in production environment.
## Usage ##
``` go
import "github.com/larrylv/go-weibo/weibo"
```The go-weibo library does not directly handle authentication. Instead, when
creating a new client, pass an `AccessToken` that will be added to every request's
header, and handle authentication for you. The easiest and recommended way to
get an `AccessToken` is using the [goauth2][] library.For example, to update a weibo:
```go
accessToken = "access_token"
client := weibo.NewClient(accessToken)// Update a weibo
opts = &weibo.StatusRequest{Status: weibo.String("Hello, Weibo!")}
status, _, err := client.Statuses.Create(opts)
```See the [goauth2 docs][] for complete instructions on using that library.
For complete usage of go-weibo, see the full [package docs][].
[Weibo API]: http://open.weibo.com/wiki/%E5%BE%AE%E5%8D%9AAPI
[go-github]: https://github.com/google/go-github/
[goauth2]: https://code.google.com/p/goauth2/
[goauth2 docs]: http://godoc.org/code.google.com/p/goauth2/oauth
[package docs]: http://godoc.org/github.com/larrylv/go-weibo/weibo## License
This library is released under the MIT License.