An attempt to make a cli for dev.to in Go

Devto a cli for dev.to

Build status License: GPL v3

This is a work in progress so don't a expect a full support for Dev API(beta).

Table of contents

Build

make build or go build -o devto

NOTE: First make sure you have golang installed

Install

make install

Manpage

This is just optional

sudo make manpage

Bash autocompletion

Also optional

make bash_autocomplete
source $HOME/.bashrc

Operations that can be performed

Create articles

Create article

Listings

Listings

Articles

  • Get articles
  • Get articles by username
  • Get articles with queries
  • Get articles by ID
  • Get articles with videos
  • Get articles of authenticated user
  • Get all articles of authenticated user
  • Get published articles of authenticated user
  • Get unpublished articles of authenticated user
  • Create article
  • Update article

Comments

  • Retrieve comments on an article or a podcast.
  • Retrieve comments with its children comments.

Tags

  • Retrieve all the availables tags. An api_key is required, so make sure you provide one with auth command.
  • Retrieve tags that I follow. An api_key is required, so make sure you provide one with auth command.

Followers

  • Retrieve my followers. An api_key is required, so make sure you provide one with auth command.

Listings

  • Retrieve listing availables.
  • Create a listing.
  • Update a listing.
  • Reading a given listing by its id.

Organizations

  • Retrieve organization by username.
  • Retrieve users on an organization.
  • Retrieve listing on an organization.
  • Retrieve articles belonging to an organization.

Podcasts

  • Retrieve podcast availables.

Reading Lists

  • Retrieve reading lists availables.

Webhooks. Need to be authenticated

  • Retrieve webhooks they have previously registered.
  • Retrieve webhooks by id
  • Create webhooks
  • Delete webhook

Profile Images

  • Retrieve retrieve a user or organization profile image information by its corresponding username

Commands

Auth

  • Store api_key
    • ./devto auth <api_key>

Articles

  • Retrieve articles
    • ./devto articles
  • Retrieve articles with queries
    • ./devto articles -q
  • Retrieve articles by username
    • ./devto articles gealber
  • Retrieve articles by username with queries
    • ./devto articles gealber -q
  • Retrieve articles by id
    • ./devto articles <id>
  • Retrieve body of an article
    • ./devto articles <id> -b
  • Get articles of authenticated user
    • ./devto articles me
  • Get published articles of authenticated user
    • ./devto articles me -p
  • Get unpublished articles of authenticated user
    • ./devto articles me -up
  • Get all articles of authenticated user
    • ./devto articles me -all
  • Retrieve articles with videos
    • ./devto articles videos
  • Create an article
    • ./devto articles create
  • Update a given article
    • ./devto articles update <id>

Comments

  • Retrieve comments on article and podcast
    • ./devto comments -a_id <id>
    • ./devto comments -p_id <id>
  • Retrieve comments given an id.
    • ./devto comments -id <id>

Tags

  • Retrieve all tags. An api_key is required, so make sure you provide one with auth command.
    • ./devto tags
  • Retrieve tags that I follows. An api_key is required, so make sure you provide one with auth command.
    • ./devto tags follows

Followers

  • Retrieve my followers. An api_key is required, so make sure you provide one with auth command.
    • ./devto followers

Listings

  • Retrieve listing availables.
    • ./devto listings
  • Create a listing.
    • ./devto listings create
  • Update a listing.
    • ./devto listings update <id>
  • Reading a given listing by its id.
    • ./devto listings retrieve <id>

Organizations

  • Retrieve organization by username.
    • ./devto organizations <username>
  • Retrieve users on an organization.
    • ./devto organizations <username> -u
  • Retrieve listing on an organization.
    • ./devto organizations <username> -l
  • Retrieve articles belonging to an organization.
    • ./devto organizations <username> -a

Podcasts

  • Retrieve podcast availables.
    • ./devto podcasts

Reading Lists

  • Retrieve podcast availables.
    • ./devto reading_lists

Webhooks

NOTE: Need to be authenticated

  • Retrieve webhooks they have previously registered.
    • ./devto webhooks
  • Retrieve webhooks by id
    • ./devto webhooks <id>
  • Create webhooks
    • ./devto webhooks create
  • Delete webhook
    • ./devto webhooks delete <id>

Profile Images

  • Retrieve retrieve a user or organization profile image information by its corresponding username
    • ./devto profile_images <username>

Valid aclaration

The field body_markdown on operations like the creation of an article, expect a path to a markdown file. With the content of the article you want to published.

TODO

From now on, I need to refactor.

  1. REFACTOR, REFACTOR AND REFACTOR.
Owner
Gealber Morales
A mathematician who has became a backend developer for fun 🙂.
Gealber Morales
Similar Resources

Make any Go function into a API (FaaS)

faas Make any (Go) function into an API with one HTTP request. This is a FaaS: functions as a service. But, in actuality, its more of a FaaSSS: functi

Dec 30, 2022

Make Link with Markdown Format

Make Link with Markdown Format

ml -- Make Link with Markdown Format This package is required Go 1.16 or later. Build and Install $ go install github.com/spiegel-im-spiegel/gpgpdump@

Mar 20, 2022

This repository contains utility functions that do not make sense in other packages.

Installation go get github.com/IQ-tech/go-utils Executing code before process exits AtInterruption receives a function that will be called once befor

Dec 9, 2021

This package to make it easy to work with env

Go Env This package to make it easy to work with env Example usage package main

Jan 30, 2022

Bofin - A command line tool that can be used by to make Weblink development more productive

Bofin A command line tool that can be used by to make Weblink development more p

Jan 13, 2022

A daemon to make your keyboard backlight smart.

keyboard-backlight-daemon A daemon to make your keyboard backlight smart. Features Light up keyboard backlight based on user interaction (keyboard, mo

Jan 17, 2022

Marshallable - Make generic data types marshallable

Marshallable Make generic data types marshallable! Features Implement methods: S

Feb 15, 2022

It‘s a cmd-line tool like `make` and `task`, supporting nested args and alias using `cobra`

It‘s a cmd-line tool like `make` and `task`, supporting nested args and alias using `cobra`. It's a makefile alternative and a shell wrapper.

Oct 18, 2022

Elegant CLI wrapper for kubeseal CLI

Overview This is a wrapper CLI ofkubeseal CLI, specifically the raw mode. If you just need to encrypt your secret on RAW mode, this CLI will be the ea

Jan 8, 2022
CLI and web app to convert HTML markup to go-app.dev's syntax.
CLI and web app to convert HTML markup to go-app.dev's syntax.

HTML to go-app Converter CLI and web app to convert HTML markup to go-app.dev's syntax. Installation CLI Static binaries are also available on GitHub

Dec 18, 2022
The Dapr CLI allows you to setup Dapr on your local dev machine or on a Kubernetes cluster

Dapr CLI The Dapr CLI allows you to setup Dapr on your local dev machine or on a

Dec 23, 2021
Dev-spaces - A CLI to help creating development environments using AWS Spot Instances

This is a CLI to help creating on-demand development spaces using EC2 Spot Intances.

Nov 9, 2022
Attempt at rewriting ltv in golang
Attempt at rewriting ltv in golang

ltv-go my attempt at rewriting ltv in go. Install and Usage Download binaries fo

May 5, 2022
Gopkg - Search go.dev packages by keyword

gopkg Search go.dev packages by keyword Usage Install go install github.com/luck

Apr 6, 2022
An easy to use menu structure for cli applications that prompts users to make choices.
An easy to use menu structure for cli applications that prompts users to make choices.

WMenu Package wmenu creates menus for cli programs. It uses wlog for its interface with the command line. It uses os.Stdin, os.Stdout, and os.Stderr w

Dec 26, 2022
Make Highly Customized Boxes for your CLI
Make Highly Customized Boxes for your CLI

Box CLI Maker ?? Box CLI Maker is a Highly Customized Terminal Box Creator. Features Make Terminal Box in 8️⃣ inbuilt different styles 16 Inbuilt Colo

Jan 1, 2023
Minutes is a CLI tool for synchronizing work logs between multiple time trackers, invoicing, and bookkeeping software to make entrepreneurs' daily work easier.
Minutes is a CLI tool for synchronizing work logs between multiple time trackers, invoicing, and bookkeeping software to make entrepreneurs' daily work easier.

Minutes is a CLI tool for synchronizing work logs between multiple time trackers, invoicing, and bookkeeping software to make entrepreneurs' daily work easier.

Aug 8, 2022
JOB, make your short-term command as a long-term job. 将命令行规划成任务的工具

job make your short-term command as a long-term job Install Shell Install (Linux & MacOS) # binary will be $(go env GOPATH)/bin/job $: curl -sfL https

Nov 12, 2022
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.

asciigraph Go package to make lightweight ASCII line graphs ╭┈╯. Installation go get github.com/guptarohit/asciigraph Usage Basic graph package main

Jan 8, 2023