rss-explore

command module
v0.0.0-...-1f190d7 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 7 Imported by: 0

README

rss-explore

GoDoc Builds Go Report Card License

Tools to help you easily find and manage RSS feeds.

Usage

Convert a YouTube video URL in to the RSS feed for that video's channel:

curl --location --silent \
  --request POST 'https://rss-explore.revcd.com/youtube/convert' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "url": "https://youtube.com/watch?v=7LICrnxWd38"
  }' | jq -r '.url'
"https://youtube.com/feeds/videos.xml?channel_id=UCWaC58KxHxyCgZVl4cRDxSg"

Raycast

Import the raycast-rss-explore.sh file as a Raycast Script Command.

Screenshot of the Raycast Script Command

Development

Code Generation
# Install oapi-codegen
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest

# Generate the API models, server implementation, and spec
make generate
Production
  • Vercel deploys each .go file within api/ as a serverless function
  • Each of these are wrappers around a handler function within the internal/handler package, which holds the business logic of the API
Local
make run

API available at http://localhost:5691

  • main.go creates a single echo.Echo instance, and registers all the handler functions from the internal/handler package as routes
  • This is done via the api.ServerInterface that is generated by deepmap/oapi-codegen, to make sure that the OpenAPI spec is correctly implemented
  • This means that get a near-similar experience to production without having to mess about with Vercel's api/ directory structure

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
internal
pkg
api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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