Medium alternatives and similar packages
Based on the "Third-party APIs" category.
Alternatively, view Medium alternatives based on common mentions on social networks and blogs.
-
go-openai
OpenAI ChatGPT, GPT-3, GPT-4, DALL·E, Whisper API wrapper for Go -
goamz
Popular fork of goamz which adds some missing API calls to certain packages. -
webhooks
:fishing_pole_and_fish: Webhook receiver for GitHub, Bitbucket, GitLab, Gogs -
githubql
Package githubv4 is a client library for accessing GitHub GraphQL API v4 (https://docs.github.com/en/graphql). -
twitter-scraper
Scrape the Twitter Frontend API without authentication with Golang. -
lark
Feishu(飞书)/Lark Open API Go SDK, Support ALL Open API and Event Callback. -
openaigo
OpenAI GPT3/3.5 ChatGPT API Client Library for Go, simple, less dependencies, and well-tested -
gostorm
GoStorm is a Go library that implements the communications protocol required to write Storm spouts and Bolts in Go that communicate with the Storm shells. -
hipchat (xmpp)
A golang package to communicate with HipChat over XMPP -
clarifai
DEPRECATED: please use https://github.com/Clarifai/clarifai-go-grpc -
go-lark
An easy-to-use SDK for Feishu and Lark Open Platform (Messaging API only) -
go-trending
Go library for accessing trending repositories and developers at Github. -
simples3
Simple no frills AWS S3 Golang Library using REST with V4 Signing (without AWS Go SDK) -
go-tgbot
Golang telegram bot API wrapper, session-based router and middleware -
cachet
Go(lang) client library for Cachet (open source status page system). -
go-postman-collection
Go module to work with Postman Collections
Static code analysis for 29 languages.
Do you think we are missing an alternative of Medium or a related project?
Popular Comparisons
README
Medium SDK for Go
This repository contains the open source SDK for integrating Medium's OAuth2 API into your Go app.
Install
go get github.com/Medium/medium-sdk-go
Usage
Create a client, then call commands on it.
package main
import (
medium "github.com/medium/medium-sdk-go"
"log"
)
func main() {
// Go to https://medium.com/me/applications to get your applicationId and applicationSecret.
m := medium.NewClient("YOUR_APPLICATION_ID", "YOUR_APPLICATION_SECRET")
// Build the URL where you can send the user to obtain an authorization code.
url := m.GetAuthorizationURL("secretstate", "https://yoursite.com/callback/medium",
medium.ScopeBasicProfile, medium.ScopePublishPost)
// (Send the user to the authorization URL to obtain an authorization code.)
// Exchange the authorization code for an access token.
at, err := m.ExchangeAuthorizationCode("YOUR_AUTHORIZATION_CODE", "https://yoursite.com/callback/medium")
if err != nil {
log.Fatal(err)
}
// The access token is automatically set on the client for you after
// a successful exchange, but if you already have a token, you can set it
// directly.
m.AccessToken = at.AccessToken
// If you have a self-issued access token, you can skip these steps and
// create a new client directly:
m2 := medium.NewClientWithAccessToken("SELF_ISSUED_ACCESS_TOKEN")
// Get profile details of the user identified by the access token.
// Empty string mean current user, otherwise you need to indicate
// the user id (alphanumeric string with 65 chars)
u, err := m2.GetUser("")
if err != nil {
log.Fatal(err)
}
// Create a draft post.
p, err := m.CreatePost(medium.CreatePostOptions{
UserID: u.ID,
Title: "Title",
Content: "<h2>Title</h2><p>Content</p>",
ContentFormat: medium.ContentFormatHTML,
PublishStatus: medium.PublishStatusDraft,
})
if err != nil {
log.Fatal(err)
}
// When your access token expires, use the refresh token to get a new one.
nt, err := m.ExchangeRefreshToken(at.RefreshToken)
if err != nil {
log.Fatal(err)
}
// Confirm everything went ok. p.URL has the location of the created post.
log.Println(url, at, u, p, nt)
}
Contributing
Questions, comments, bug reports, and pull requests are all welcomed. If you haven't contributed to a Medium project before please head over to the Open Source Project and fill out an OCLA (it should be pretty painless).
Authors
License
Copyright 2015 A Medium Corporation
Licensed under Apache License Version 2.0. Details in the attached LICENSE file.
*Note that all licence references and agreements mentioned in the Medium README section above
are relevant to that project's source code only.