Fix README
This commit is contained in:
parent
8fa4fc14e6
commit
b1152a55cd
34
README.md
34
README.md
|
@ -7,14 +7,45 @@
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
### Application
|
||||||
|
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/mattn/go-mastodon"
|
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
|
"github.com/mattn/go-mastodon"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
app, err := mastodon.RegisterApp(context.Background(), &mastodon.AppConfig{
|
||||||
|
Server: "https://mstdn.jp",
|
||||||
|
ClientName: "client-name",
|
||||||
|
Scopes: "read write follow",
|
||||||
|
Website: "https://github.com/mattn/go-mastodon",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
fmt.Printf("client-id : %s\n", app.ClientID)
|
||||||
|
fmt.Printf("client-secret: %s\n", app.ClientSecret)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Client
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
|
||||||
|
"github.com/mattn/go-mastodon"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -36,6 +67,7 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Status of implementations
|
## Status of implementations
|
||||||
|
|
||||||
* [x] GET /api/v1/accounts/:id
|
* [x] GET /api/v1/accounts/:id
|
||||||
|
|
|
@ -15,14 +15,25 @@ VERSION:
|
||||||
0.0.1
|
0.0.1
|
||||||
|
|
||||||
COMMANDS:
|
COMMANDS:
|
||||||
toot post toot
|
toot post toot
|
||||||
stream stream statuses
|
stream stream statuses
|
||||||
timeline show timeline
|
timeline show timeline
|
||||||
help, h Shows a list of commands or help for one command
|
notification show notification
|
||||||
|
instance show instance information
|
||||||
|
account show account information
|
||||||
|
search search content
|
||||||
|
follow follow account
|
||||||
|
followers show followers
|
||||||
|
upload upload file
|
||||||
|
delete delete status
|
||||||
|
init initialize profile
|
||||||
|
mikami search mikami
|
||||||
|
help, h Shows a list of commands or help for one command
|
||||||
|
|
||||||
GLOBAL OPTIONS:
|
GLOBAL OPTIONS:
|
||||||
--help, -h show help
|
--profile value profile name
|
||||||
--version, -v print the version
|
--help, -h show help
|
||||||
|
--version, -v print the version
|
||||||
```
|
```
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
Loading…
Reference in New Issue
Block a user