You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/flaxrora/catchphrase-go-mongodb-rest-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/flaxrora/catchphrase-go-mongodb-rest-api

v0.0.0-20211225230633-be1bd5259d42
Source
Go
Version published
Created
Source

Catchphrase Fiber (Go) and MongoDB REST API

An API built with Fiber and MongoDB.

Tutorial available at: dev.to

API Reference

https://fiber-mongodb-rest-api.herokuapp.com/api/catchphrases

Get all catchphrases

  GET /catchphrases
Optional ParameterTypeDescriptionExample
sstringSerach Movie Name or Catchphrase?s=exmpletext
pageintPage number. Default: 1?page=2
limitintLimit number of catchphrases per page. Default: 10?limit=20

Get catchphrase

  GET /catchphrases/:id
ParameterTypeDescription
idstringRequired. Id of catchphrase to fetch

Add catchphrase

  POST /catchphrases
{
	"movieName": "AUSTIN POWERS: INTERNATIONAL MAN OF MYSTERY",
	"catchphrase": "Yeah baby, yeah!",
	"movieContext": "Austin Powers, conversing with his partner, Mrs. Kensington"
}

Update catchphrase

  PATCH /catchphrases/:id
ParameterTypeDescription
idstringRequired. Id of catchphrase to update
{
	"movieName": "AUSTIN POWERS: INTERNATIONAL MAN OF MYSTERY",
	"catchphrase": "Yeah baby, yeah!",
	"movieContext": "Austin Powers, conversing with his partner, Mrs. Kensington"
}

// All three fields are optional when updating

Remove catchphrase

  DELETE /catchphrases/:id
ParameterTypeDescription
idstringRequired. Id of catchphrase to delete

Demo

Tutorial

catchphrase-go-mongodb-rest-api

FAQs

Package last updated on 25 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts