platforms

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Devto

type Devto struct {
	// contains filtered or unexported fields
}

Devto is used to interact with dev.to platform

func NewDevto

func NewDevto(apiToken string) *Devto

NewDevto creates a new instance of Devto

func (*Devto) Publish

func (d *Devto) Publish(title string, markdown string, tags []string, canonicalURL string)

Publish publishes an article on dev.to

type Hashnode

type Hashnode struct {
	// contains filtered or unexported fields
}

Hashnode is used to interact with Hashnode platform

func NewHashnode

func NewHashnode(apiToken string, publicationID string) *Hashnode

NewHashnode creates a new instance of Hashnode

func (*Hashnode) Publish

func (h *Hashnode) Publish(title string, markdown string, tags []string, canonicalURL string)

Publish publishes an article on Hashnode

type Medium

type Medium struct {
	// contains filtered or unexported fields
}

Medium is used to interact with Medium platform

func NewMedium

func NewMedium(publicationID string, apiToken string) *Medium

NewMedium creates a new instance of Medium

func (*Medium) Publish

func (m *Medium) Publish(title string, markdown string, tags []string, canonicalURL string)

Publish publishes an article on Medium

type Platform

type Platform interface {
	Publish(title string, markdown string, tags []string, canonicalURL string)
}

Platform represents a type for interacting with publishing platforms like Hashnode, Medium, Devto

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL