Go to file
2022-11-20 22:32:23 +01:00
accounts.go add method to lookup accounts by username 2022-11-20 22:32:23 +01:00
apps.go final cleanup steps 2022-11-20 21:53:02 +01:00
compat.go Add support for /api/v1/push/subscription 2019-09-30 17:19:22 +09:00
filters.go oop 2022-11-20 21:31:59 +01:00
go.mod final cleanup steps 2022-11-20 21:53:02 +01:00
go.sum final cleanup steps 2022-11-20 21:53:02 +01:00
helper.go Fix to parse API error 2017-04-19 14:32:53 +09:00
instance.go simplify unduly by requiring client state to be initialized once 2022-11-20 20:36:27 +01:00
LICENSE remove dependencies and client 2022-11-19 20:02:47 +01:00
lists.go final cleanup steps 2022-11-20 21:53:02 +01:00
mastodon.go final cleanup steps 2022-11-20 21:53:02 +01:00
notification.go oop 2022-11-20 21:31:59 +01:00
polls.go oop 2022-11-20 21:31:59 +01:00
README.md oop 2022-11-20 21:31:59 +01:00
report.go oop 2022-11-20 21:31:59 +01:00
status.go oop 2022-11-20 21:31:59 +01:00
streaming.go oop 2022-11-20 21:31:59 +01:00
unixtime.go Add GetInstanceActivity and GetInstancePeers 2018-01-29 12:33:17 +09:00

go-mastodon

Fork of https://github.com/mattn/go-mastodon

Usage

Client

package main

import (
	"context"
	"fmt"
	"log"

	mastodon "git.gutmet.org/go-mastodon.git"
)

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

Status of implementations

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

License

MIT

Author of original (https://github.com/mattn/go-mastodon)

Yasuhiro Matsumoto (a.k.a. mattn)

Screwed up by

Alexander Weinhold (a.k.a gutmet)