All Projects → mattn → Go Mastodon

mattn / Go Mastodon

Licence: mit
mastodon client for golang

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Go Mastodon

tut
TUI for Mastodon with vim inspired keys
Stars: ✭ 165 (-46.43%)
Mutual labels:  mastodon
Mammut
An Android Client for Mastodon
Stars: ✭ 41 (-86.69%)
Mutual labels:  mastodon
tootbot
Python tool for mirroring Reddit posts to Twitter and Mastodon
Stars: ✭ 68 (-77.92%)
Mutual labels:  mastodon
wordpress-ostatus
An OStatus plugin for WordPress
Stars: ✭ 21 (-93.18%)
Mutual labels:  mastodon
mastodon.js
Javascript Mastodon API for Web Browsers with streaming support
Stars: ✭ 32 (-89.61%)
Mutual labels:  mastodon
gobo
💭 Gobo: Your social media. Your rules.
Stars: ✭ 87 (-71.75%)
Mutual labels:  mastodon
Instagram2Fedi
Python script for crossposting from Instagram to Mastodon or Pixelfed
Stars: ✭ 45 (-85.39%)
Mutual labels:  mastodon
Social
🎉 Social can be used for work, or to connect to the fediverse!
Stars: ✭ 302 (-1.95%)
Mutual labels:  mastodon
tusky-api
Node.js server that proxies Mastodon notifications to an app's push notifications through Firebase Cloud Messaging
Stars: ✭ 17 (-94.48%)
Mutual labels:  mastodon
gotosocial
Golang fediverse server.
Stars: ✭ 400 (+29.87%)
Mutual labels:  mastodon
WhatYouarePlaying
An extension delivering what you're watching and listening to, to Mastodon and other services
Stars: ✭ 15 (-95.13%)
Mutual labels:  mastodon
humhub-oauth
Social OAuths built for the Social Platform HumHub
Stars: ✭ 16 (-94.81%)
Mutual labels:  mastodon
Mastodon-Material
Material Design Native Theme for Mastodon
Stars: ✭ 17 (-94.48%)
Mutual labels:  mastodon
activity-pub
API Platform ActivityPub Support
Stars: ✭ 63 (-79.55%)
Mutual labels:  mastodon
mastofeed
ActivityPub feed => iframe embed. https://www.mastofeed.com
Stars: ✭ 55 (-82.14%)
Mutual labels:  mastodon
mastodon-translate
Tampermonkey Script to add option to Translate Toots
Stars: ✭ 20 (-93.51%)
Mutual labels:  mastodon
mastodon-lite
Lightweight client for mastodon micro blogging service.
Stars: ✭ 12 (-96.1%)
Mutual labels:  mastodon
Tootle
GTK-based Mastodon client for Linux
Stars: ✭ 304 (-1.3%)
Mutual labels:  mastodon
gomphotherium
Gomphotherium (/ˌɡɒmfəˈθɪəriəm/; "welded beast"), a command line Mastodon client.
Stars: ✭ 22 (-92.86%)
Mutual labels:  mastodon
merveilles-town
Fork of Mastodon repository with modifications to make Merveilles a town of our own.
Stars: ✭ 23 (-92.53%)
Mutual labels:  mastodon

go-mastodon

Build Status CodeCov GoDoc Go Report Card

Usage

Application

package main

import (
	"context"
	"fmt"
	"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

package main

import (
	"context"
	"fmt"
	"log"

	"github.com/mattn/go-mastodon"
)

func main() {
	c := mastodon.NewClient(&mastodon.Config{
		Server:       "https://mstdn.jp",
		ClientID:     "client-id",
		ClientSecret: "client-secret",
	})
	err := c.Authenticate(context.Background(), "your-email", "your-password")
	if err != nil {
		log.Fatal(err)
	}
	timeline, err := c.GetTimelineHome(context.Background(), nil)
	if err != nil {
		log.Fatal(err)
	}
	for i := len(timeline) - 1; i >= 0; i-- {
		fmt.Println(timeline[i])
	}
}

Status of implementations

  • [x] GET /api/v1/accounts/:id
  • [x] GET /api/v1/accounts/verify_credentials
  • [x] PATCH /api/v1/accounts/update_credentials
  • [x] GET /api/v1/accounts/:id/followers
  • [x] GET /api/v1/accounts/:id/following
  • [x] GET /api/v1/accounts/:id/statuses
  • [x] POST /api/v1/accounts/:id/follow
  • [x] POST /api/v1/accounts/:id/unfollow
  • [x] GET /api/v1/accounts/:id/block
  • [x] GET /api/v1/accounts/:id/unblock
  • [x] GET /api/v1/accounts/:id/mute
  • [x] GET /api/v1/accounts/:id/unmute
  • [x] GET /api/v1/accounts/:id/lists
  • [x] GET /api/v1/accounts/relationships
  • [x] GET /api/v1/accounts/search
  • [x] POST /api/v1/apps
  • [x] GET /api/v1/blocks
  • [x] GET /api/v1/conversations
  • [x] DELETE /api/v1/conversations/:id
  • [x] POST /api/v1/conversations/:id/read
  • [x] GET /api/v1/favourites
  • [x] GET /api/v1/follow_requests
  • [x] POST /api/v1/follow_requests/:id/authorize
  • [x] POST /api/v1/follow_requests/:id/reject
  • [x] POST /api/v1/follows
  • [x] GET /api/v1/instance
  • [x] GET /api/v1/instance/activity
  • [x] GET /api/v1/instance/peers
  • [x] GET /api/v1/lists
  • [x] GET /api/v1/lists/:id/accounts
  • [x] GET /api/v1/lists/:id
  • [x] POST /api/v1/lists
  • [x] PUT /api/v1/lists/:id
  • [x] DELETE /api/v1/lists/:id
  • [x] POST /api/v1/lists/:id/accounts
  • [x] DELETE /api/v1/lists/:id/accounts
  • [x] POST /api/v1/media
  • [x] GET /api/v1/mutes
  • [x] GET /api/v1/notifications
  • [x] GET /api/v1/notifications/:id
  • [x] POST /api/v1/notifications/dismiss
  • [x] POST /api/v1/notifications/clear
  • [x] POST /api/v1/push/subscription
  • [x] GET /api/v1/push/subscription
  • [x] PUT /api/v1/push/subscription
  • [x] DELETE /api/v1/push/subscription
  • [x] GET /api/v1/reports
  • [x] POST /api/v1/reports
  • [x] GET /api/v2/search
  • [x] GET /api/v1/statuses/:id
  • [x] GET /api/v1/statuses/:id/context
  • [x] GET /api/v1/statuses/:id/card
  • [x] GET /api/v1/statuses/:id/reblogged_by
  • [x] GET /api/v1/statuses/:id/favourited_by
  • [x] POST /api/v1/statuses
  • [x] DELETE /api/v1/statuses/:id
  • [x] POST /api/v1/statuses/:id/reblog
  • [x] POST /api/v1/statuses/:id/unreblog
  • [x] POST /api/v1/statuses/:id/favourite
  • [x] POST /api/v1/statuses/:id/unfavourite
  • [x] GET /api/v1/timelines/home
  • [x] GET /api/v1/timelines/public
  • [x] GET /api/v1/timelines/tag/:hashtag
  • [x] GET /api/v1/timelines/list/:id

Installation

$ go get github.com/mattn/go-mastodon

License

MIT

Author

Yasuhiro Matsumoto (a.k.a. mattn)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].